|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
~8 O* j& r" B7 X ~' b
* A' i L: i, m* X( M& [ E3 r
, \: n( G- b& A; h7 COnce you have fully tested your NXOpen API application, you should "sign" it$ B1 r8 O* y+ } @# B. D/ S& s
before distributing it to your end users. Even if your end users also have3 @; g/ u7 }3 k0 `6 s* B
access to the Author license which is required to load and run an NXOpen& _! @' p I% X' I% ^6 F2 _3 Y
application, signing it has its benefits.5 L: I. L+ ~9 | m c
# w2 i) X+ J9 ^ - Your application will load faster because NX will immediately recognize
: c8 d; w4 Y0 j) R6 X4 T* F that it has been signed.
& X4 J! p( y# g - The syslog (Help-> Log File) will not be cluttered with the output from
/ F' Z. \. A" i0 w+ O# r the multiple checks that NX will do to determine whether it can load
' ^. [% ?# }6 Q+ q5 W and run the program.
& T/ m) @$ Q4 U6 ]/ d5 W
) A/ V; X2 t% W( k, y1) C/C++, C# or VB only (Java: Proceed directly to step 3), n* m G# m; F
; L& ? M1 q, J9 e
Add the NXSigningResource to your Visual Studio project) _( W0 v' K* Z& F. P2 a! `7 L' P
2 v: {$ t) \+ U
In the Solution Explorer, select the Resource Files folder and
; K5 x) c2 u6 _" r <RMB>Add-> Existing Item: a3 s. d$ z" p+ N' h. C
( q2 F. u1 E) Q9 B' g C/C++:
& d2 Q) S6 C& |$ Q Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
+ D2 N! z! V% O5 @ C# or VB .NET:
! [# v! [( ~1 j# T, R Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res' ~' P+ q( ^" T7 s/ Y: F. M
Select the newly added NXSigningResource.res and in set5 w8 A" q" j2 x. J( v
Properties-> Build Action = Embedded Resource: p9 }8 i j( G
2 r) L( f- x1 X; K5 n2) Make sure the build configuration is set to Release then- ~" s [9 w0 ~1 M% Q
Build-> Rebuild Solution8 Q4 @8 y5 W8 k3 Z
: i+ f* o4 ^) M/ H! ~3) Sign the executable from an NX Command Prompt window:
4 }' b m0 d% n3 i F0 U You probably already have one open because you started the Visual
+ X6 @& G- z3 ? Studio or Eclipse from it. Otherwise:
( q0 h) v/ I1 B3 s# o Start-> All Programs-> NX#-> NX Tools-> Command Prompt. M/ U* c2 |! D) k" s" w7 b: a
9 Z$ t5 @% O; n$ E
Java:
5 E f3 |* d$ S% z signJar <path to your>.jar
2 |7 Y" J: A/ k; Z4 ]
3 X7 s$ J* E$ p8 V: V5 x C/C++:
0 d0 R, m( u2 T& z( P; r NX8.5 and later:
: Q: k3 S8 @8 k, q signCpp <path to your>.dll or .exe S p- c6 i6 G7 u+ L
NX8.0 and earlier:
* a; w5 a7 @- e# ]/ s& c: C nxSign <path to your>.dll or .exe, L( K% `1 r/ }, b( g) h4 G- A
. }+ F2 S! Z8 _3 w C# or VB .NET:- n* c& q6 S3 g. Q. A
NX8.5 and later:
. E; ^+ T0 g p G signDotNet <path to your>.dll or .exe" E5 |1 k4 ]: I/ _% H' ^
NX8.0 and earlier:8 i: {3 `8 h9 ?7 `
signLibrary <path to your>.dll or .exe" l- Z& n1 ~2 p; g3 H' L2 f
( U' I( c M6 L$ a
Note: You do not need to use the path to the signing utilities because the
1 n5 u- P3 A) S' l7 l( A8 EPATH of the NX Command Prompt shell already includes both the UGOpen and UGII0 a9 c B4 s* |2 _9 f9 c' w
folders.
5 O4 M# x/ G6 n# k/ K. e. c& L' R ^2 `: @( {
|
|