|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
. D7 { u; P2 f
% @. R1 s! `: ^8 h7 b- M& O
/ \. t' H5 r [" C
Once you have fully tested your NXOpen API application, you should "sign" it
$ l( o2 a( ?' f0 Zbefore distributing it to your end users. Even if your end users also have
6 G1 ^' c) [" C& xaccess to the Author license which is required to load and run an NXOpen
9 ?9 O" I9 `% X3 gapplication, signing it has its benefits. m+ ?0 i q' w3 ]; Z Q
+ [0 V( h! M) U1 E4 j
- Your application will load faster because NX will immediately recognize# H7 R5 [. C& N0 P
that it has been signed.
4 y/ g+ v1 [6 [+ v - The syslog (Help-> Log File) will not be cluttered with the output from
9 }3 [& D/ M. Y; s9 r |; L, j the multiple checks that NX will do to determine whether it can load9 J2 y% I4 _; |
and run the program.
4 n0 @0 p6 W1 `0 A; a M# ?) x: O& _- m8 w% X. E* s
1) C/C++, C# or VB only (Java: Proceed directly to step 3)( e# ?" b. j2 Y- h; h7 R
/ R' N, j6 j7 @& @" ]( t Add the NXSigningResource to your Visual Studio project
/ Y8 i) ]' o+ y0 k d w
4 P& m. h/ z9 [ In the Solution Explorer, select the Resource Files folder and) V6 ?3 N" O H- p) ^4 T
<RMB>Add-> Existing Item: S. ?. r+ `. o/ x [4 m
% K- p3 ]6 ?% v! @$ s; {! x% }$ @
C/C++:4 O4 {( A7 n x& x: w
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp+ z+ A6 ^% n3 h: W3 {6 U
C# or VB .NET:8 }. c: p+ K1 i9 T$ Z6 }
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
. U5 J( v4 `. _# t Select the newly added NXSigningResource.res and in set. Z! P& o$ S, s' |( w: |
Properties-> Build Action = Embedded Resource
- R9 [! J& }( ]4 r
/ y5 F6 `& Z: O2) Make sure the build configuration is set to Release then
* E; P: C' |2 v- j3 o( m; y7 { Build-> Rebuild Solution( W' K/ u$ Y. O" j
/ t/ Z6 M1 R# w$ Z3) Sign the executable from an NX Command Prompt window:+ p& j% D5 J" C
You probably already have one open because you started the Visual
1 ~0 l, L t8 q8 ~" s/ F1 z8 I Studio or Eclipse from it. Otherwise:; q: h! W; f, r. w
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
3 e" k- V* w" y+ Y) L' y
+ D! [* k- k ^7 E1 D2 z Java:
- d% c7 Q- V$ D, | signJar <path to your>.jar, w* j, Q+ X1 ?- @0 `
, z- f0 g: Q0 Y9 Z C/C++:+ f/ Z+ |1 M9 d" v8 O5 U; ~
NX8.5 and later:
( m* L) Z9 c: i9 ]: A4 F signCpp <path to your>.dll or .exe- Q% @* H o1 v
NX8.0 and earlier:
b. Q8 r. f1 u+ O# D# t1 F+ A nxSign <path to your>.dll or .exe
$ S7 G, Q( ]. }. K
9 R6 g% k( B; V$ y/ s: i% p C# or VB .NET:; z8 m4 z# h& [- X" ~
NX8.5 and later:% C5 v. Z6 \3 L) u+ o' d6 f1 H
signDotNet <path to your>.dll or .exe
+ d( ^6 S% k3 w6 i! X& E% z! R& M NX8.0 and earlier:6 z4 \0 D: d- o
signLibrary <path to your>.dll or .exe+ S E, I8 l- M; o- I2 j
' P5 D- i! {) Y4 {9 A$ l: B* G1 q
Note: You do not need to use the path to the signing utilities because the) Y! v& V% g# g7 U
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII8 A- g/ T& [- o$ V
folders.; W: r. F" s c" ?
8 a+ ?3 x( e. ?1 u$ L |
|