PLM之家PLMHome-工业软件与AI结合践行者

[原创] NX二次开发签名的方法完整版本,详细步骤如下:

  [复制链接]

2017-4-21 08:17:55 8367 1

admin 发表于 2015-2-25 13:00:05 |阅读模式

admin 楼主

2015-2-25 13:00:05

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x

0 V2 W8 {! `9 E4 |: F" i0 M- ^) O' z& I9 S

% e8 ?' m: h. S0 b$ E; F% }Once you have fully tested your NXOpen API application, you should "sign" it* D1 e$ R) ?' c, ~  f6 P% g
before distributing it to your end users.  Even if your end users also have
% \7 D5 X6 b; t3 K: l4 {, r2 kaccess to the Author license which is required to load and run an NXOpen9 u# E( Q8 S! ?! ~5 a: M3 M
application, signing it has its benefits.
6 l  l1 K; T. L- u6 D' L( H; v
    - Your application will load faster because NX will immediately recognize
' r2 o* v( ]0 N9 ]' N" q7 g      that it has been signed.$ Z6 k! N( `" m0 }
    - The syslog (Help-> Log File) will not be cluttered with the output from
& v  w; J" _1 z( V      the multiple checks that NX will do to determine whether it can load3 J# \, O/ W6 \& E* e4 g% u% h& @
      and run the program.
) @" z& G+ f# @
' p! P! O0 y* t1)  C/C++, C# or VB only (Java: Proceed directly to step 3): b: i1 p# q2 t$ K' l* z5 [
6 u$ R# r& Y. E: a- D
    Add the NXSigningResource to your Visual Studio project
* r) j! S# v7 r5 H' y3 [$ v
: P/ R8 T( C0 `' p    In the Solution Explorer, select the Resource Files folder and, |  B0 G: N1 K7 _& q: k( d9 B
        <RMB>Add-> Existing Item
# d, f" L( g  \' G- q# }+ ~+ i# C& g% \# q+ v  T
    C/C++:  @" o* q1 p5 [; s/ M1 R
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
6 H+ C* L% J; k4 q; j7 [3 M+ k. C    C# or VB .NET:
) Y  v  J4 s! o1 k        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; B8 e3 a9 L$ s2 ?        Select the newly added NXSigningResource.res and in set
0 Q% H2 ~9 b. v  ^4 I4 n% }" W1 f            Properties-> Build Action = Embedded Resource6 V  F  g9 y/ J' _/ O3 T

& D$ V5 U! ~+ h' {1 w2)  Make sure the build configuration is set to Release then
: J* f' T  b6 K' j0 o9 h4 {3 W# z    Build-> Rebuild Solution1 R# v, {8 C# O7 K. ?7 f
2 y. }2 h& ^) W& K* ~( L$ K
3)  Sign the executable from an NX Command Prompt window:
/ I+ T3 O1 \. @6 Y  _. n9 P5 s        You probably already have one open because you started the Visual! g2 s3 g2 ~/ K+ f2 i3 `/ `3 R
        Studio or Eclipse from it.  Otherwise:
& F$ c7 n0 y/ M" Q6 B) p            Start-> All Programs-> NX#-> NX Tools-> Command Prompt. E9 z  t6 P1 h/ I/ G

: ?- e& u# |& ^) a8 e( J    Java:
. I( U3 Q* g) [$ O: j; C  D        signJar <path to your>.jar, D4 J0 x6 h( d+ r/ J- ^8 z7 c
7 f) Y) e0 C) k
    C/C++:& U  K# d# [- S, P8 i. n
        NX8.5 and later:
/ g4 g; o" u8 Q" P2 b: }" F. m            signCpp <path to your>.dll or .exe# o, j* H* t7 O$ x/ H
        NX8.0 and earlier:8 d6 k2 d: T. m% S) D7 S: }
            nxSign <path to your>.dll or .exe  q$ n9 {) I+ V' T8 ~  @( b

: q+ L8 c- y6 d; l2 W    C# or VB .NET:) W8 `+ Q1 O/ L7 D; n8 A* x: u
        NX8.5 and later:% Q7 Z3 h8 v  a9 _$ W
            signDotNet <path to your>.dll or .exe' U/ K& E# n9 r5 }
        NX8.0 and earlier:$ ^8 x3 B& v2 ]! M& T  T, ?) ?
            signLibrary <path to your>.dll or .exe
' Z; B- o. x3 Z: h4 E* h
& d  \) {7 m& T3 V: D+ o" TNote:  You do not need to use the path to the signing utilities because the. _; [! C4 W1 R) t, w) z; l
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII0 g7 y: ~' b9 Z+ n6 @* G4 F! V
folders.
6 e* ~; v4 Y1 }+ t: Y2 @
3 p* D9 l4 ?; G8 ?1 W
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

yejihu 发表于 2017-4-21 08:17:55

yejihu 沙发

2017-4-21 08:17:55

非常感谢您的分享和宽大的胸怀!
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了