|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
% h- U3 W1 H2 V1 m, S3 k9 r
1 d( c) c% s! ~+ e" n) ?+ Q
+ T" s* g, w+ V3 O+ x. jOnce you have fully tested your NXOpen API application, you should "sign" it" s6 |' ?/ P3 {" m
before distributing it to your end users. Even if your end users also have: `# {) L) e: h0 s* u- h
access to the Author license which is required to load and run an NXOpen
" ?% b; i8 ]2 j4 c1 x3 Sapplication, signing it has its benefits.
9 Q' }6 d3 A5 [0 W ?4 A3 v1 Y8 s8 L
- Your application will load faster because NX will immediately recognize
& O9 f6 j. V# c( j, C* i that it has been signed.
b3 w: w0 p4 P: @% n - The syslog (Help-> Log File) will not be cluttered with the output from2 `5 V: P& _7 v' d
the multiple checks that NX will do to determine whether it can load n9 [% V% I; a8 U+ J$ B
and run the program.& _; x8 L# |; O) G, a3 \- _) G
* W( b' E# l- {7 T1) C/C++, C# or VB only (Java: Proceed directly to step 3)
( a& W: ?2 |& v, z! i V) n0 V7 H
$ v" Z/ S9 u: R0 M2 T( l c( O8 U Add the NXSigningResource to your Visual Studio project
/ O% H3 r: p- J- b3 X- U' q; Q* j: w! c- s) X7 ]( E- q) D& G
In the Solution Explorer, select the Resource Files folder and% k9 ?' V) ~( W. J+ M; K' d! R; b& V
<RMB>Add-> Existing Item
4 r9 A3 q4 O8 `9 b5 T1 J4 P7 t1 {- m3 m6 k! j2 o& ]
C/C++:- v& \' B+ u! g5 R$ N: m1 G
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp' b: p& J4 f; R4 v: `: T5 M6 i) i2 L' }
C# or VB .NET:
5 y1 ~2 c1 z- I3 f- a3 x1 M Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res% G/ F0 I5 @* f, Y% O
Select the newly added NXSigningResource.res and in set9 j' e: c& i. g$ y0 j" X9 B
Properties-> Build Action = Embedded Resource
% w% d8 u) b: l! Z# X- T( W' a; m4 m4 S& H/ z
2) Make sure the build configuration is set to Release then. F' k+ {( s0 L' L
Build-> Rebuild Solution
! I6 K; P& Y+ a% v9 ?/ T" H
) F( u4 h* Y6 l& U3) Sign the executable from an NX Command Prompt window:6 C) u( d$ _: m4 o0 M& Y9 d
You probably already have one open because you started the Visual
! U* \- |# k* l$ N1 } Q1 u. A/ q Studio or Eclipse from it. Otherwise:3 w# n, _% l% ]% T: M6 M) _6 e
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
8 [8 r2 Z* t( g- d) I; C" S% H. |7 G' M* G* i7 o; k
Java:, y$ {. |8 l7 k" K
signJar <path to your>.jar5 k/ ^1 A9 M6 [% y9 c
6 T3 V6 q( b, B6 \1 q
C/C++:
7 J2 m1 H# c2 D6 K1 G9 ]: Q NX8.5 and later:
# r% L: a! H( h# _# o signCpp <path to your>.dll or .exe
: r# u1 y# M2 }* S. Y9 M2 y4 i NX8.0 and earlier:
5 s8 w7 h1 U$ S/ \" d) V1 B$ _ nxSign <path to your>.dll or .exe
) L H, `: f4 Z4 d# ]7 r
6 F/ X* g1 T- v( y, o C# or VB .NET:
/ T l* @8 z/ m NX8.5 and later:
6 L) B! m2 J6 B, a7 E9 _/ | signDotNet <path to your>.dll or .exe
0 c* x @2 A$ A9 t NX8.0 and earlier:+ n G9 z5 `9 ]: {
signLibrary <path to your>.dll or .exe
4 H/ }! R+ O5 s" Q
1 M. y$ O& x. G. Z) e7 q9 SNote: You do not need to use the path to the signing utilities because the( t" d% A* N0 a( a* |8 t
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
: k g6 N3 y& P, o' O, q. w, Qfolders.* I( m: \3 s1 t# V! y' c0 ~
8 `6 F5 Z) e: b
|
|