|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
. m; u r# K3 Q/ m: Y5 P
, N' m8 Y5 s# w% G9 N2 r0 V9 W
* y, K* C( z* R3 v5 y
Once you have fully tested your NXOpen API application, you should "sign" it
! x/ u- c5 p/ ]3 X! B# cbefore distributing it to your end users. Even if your end users also have+ L& e. Q! W- m& q2 O
access to the Author license which is required to load and run an NXOpen
) \$ o& o: W) b+ ]! A; [4 Sapplication, signing it has its benefits.
B8 ^; u5 {. N: @& l, v; W0 Q
2 I7 O- z. Z' Y - Your application will load faster because NX will immediately recognize
- X; P: b$ ~. q. n( t- T that it has been signed.
5 @. B0 i, z+ K5 a& ~$ h% N) Y - The syslog (Help-> Log File) will not be cluttered with the output from
. ?. c2 w2 R) v$ _* J3 ^4 R the multiple checks that NX will do to determine whether it can load e! J- T, X9 w2 U% ?1 b
and run the program.3 o2 [: e- q( T
0 t" i# {- n( e. ~6 M0 W1) C/C++, C# or VB only (Java: Proceed directly to step 3)+ ?$ S5 q; l- v3 u2 c% A
+ {$ d6 p+ Z# a+ ~( j. c6 K2 b
Add the NXSigningResource to your Visual Studio project
* k. d2 @8 U7 V( f% F4 ~% `2 B v
1 Z% M7 o8 f: C5 S In the Solution Explorer, select the Resource Files folder and
7 j4 |8 S9 W R* B# Z, a <RMB>Add-> Existing Item
- f6 S& [2 I; M, K* g. s$ s( l+ r: b) m4 r
C/C++:; _3 u% ^- o' ~3 C+ k
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
0 w N; ]6 c0 r# P: ] C# or VB .NET:
) M) o' a8 z! C0 D! I Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
4 A% z" _% r' g9 u: U0 A Select the newly added NXSigningResource.res and in set+ l) R$ p3 P. w; Z
Properties-> Build Action = Embedded Resource
7 ^& M6 V3 a0 f7 x, U4 E* G4 w0 T s0 w, V6 e, }8 U
2) Make sure the build configuration is set to Release then
( d4 e+ ~( A+ [1 C7 k' M& U Build-> Rebuild Solution( l0 P: e' J& z" V
4 y0 K! l" ?- P) s4 p7 C& e
3) Sign the executable from an NX Command Prompt window:- n2 ~1 N# P1 R9 z: M
You probably already have one open because you started the Visual& X0 m. l4 i- Z! j# Z9 a# w1 T
Studio or Eclipse from it. Otherwise:
* G! i, V# y! K1 W; w6 s( G1 [ Start-> All Programs-> NX#-> NX Tools-> Command Prompt
6 ~# [" E% f; z: B& d9 W! ~' p
2 x! C3 X: m3 C) q9 D1 \3 i Java:
. l; A# U; e6 i2 N signJar <path to your>.jar
$ u$ `" f1 C& P% w1 @8 W
9 h2 S; }" M" b0 E+ M* D$ H0 { C/C++:" I) m' [0 q. f
NX8.5 and later:$ j/ P& D1 y, O% Y
signCpp <path to your>.dll or .exe4 y" s# n+ e W# t' v8 [9 O9 a R
NX8.0 and earlier:
/ @( D1 t/ H ?, y nxSign <path to your>.dll or .exe
* |" x: l& N9 \2 o6 a) j8 `3 f' C5 P C: B1 L% E5 p9 @6 {* C; i
C# or VB .NET:0 V6 u% ~/ w8 T7 w: ?8 }
NX8.5 and later:( ?% @! j% K- X* u
signDotNet <path to your>.dll or .exe
' w( F& W; r" D NX8.0 and earlier:/ ]& }$ E5 f5 G/ x1 \1 B
signLibrary <path to your>.dll or .exe
( K7 b" f4 R# Q9 m7 n8 l' i: g3 l. ~$ g4 B* D
Note: You do not need to use the path to the signing utilities because the- m2 [) v7 k( j5 a5 ]
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII6 D9 m" Q4 ` ^0 \3 f; t& x& s
folders.
( L$ \6 q' R4 w: D1 p- b' p8 G) \: r) B1 }; q$ s8 c. b
|
|