|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
: A( N, ^+ v' G: _. k1 L# o
% Z, O2 F3 r" B5 G2 J, s2 w
0 f0 h0 S- S- i, e; O7 c4 M
Once you have fully tested your NXOpen API application, you should "sign" it1 O, Y' O, J- V5 k0 P
before distributing it to your end users. Even if your end users also have! m+ v i, J* d
access to the Author license which is required to load and run an NXOpen- j X7 y* x: b W
application, signing it has its benefits.
2 N8 d* Z" H+ B
$ V* `! f0 x: ]+ u$ Z$ P n - Your application will load faster because NX will immediately recognize1 X1 K% X" |" ~
that it has been signed.
+ x. l- H1 S2 P - The syslog (Help-> Log File) will not be cluttered with the output from
$ O; X% _) s. [" G4 t the multiple checks that NX will do to determine whether it can load$ q; }$ Z; a; x; `
and run the program.
! p% e: @, h5 L, [" u
1 R5 b) Q- v4 j: J1) C/C++, C# or VB only (Java: Proceed directly to step 3)/ T7 g0 h6 Y6 |7 a& o+ ?+ b. a
1 X5 L$ w& ]$ Z' Z5 u& u3 d# v
Add the NXSigningResource to your Visual Studio project, Z; i7 w ^, a& r/ M0 z2 K) Y
% E: ^3 l! K0 f8 l) ? In the Solution Explorer, select the Resource Files folder and0 w9 h( s% S8 e3 u/ ]# e7 k: B
<RMB>Add-> Existing Item ~' T0 T C! l' x5 f
; Z: B, A& y: U5 Z8 B0 n6 h$ I
C/C++:- R: \6 ?, r5 ~1 T
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
9 G S- l, o6 ^2 B0 o* ? C# or VB .NET:
. a: z9 {5 J9 a) L Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
- P$ w8 T4 l+ Q+ c* J/ [" i Select the newly added NXSigningResource.res and in set
8 A# T. q- Z- v$ y( r6 t1 U8 R3 ~ Properties-> Build Action = Embedded Resource8 \0 L, g9 p& J) w4 N1 x
' Q. T/ ]& ]6 [% [& g: s2) Make sure the build configuration is set to Release then) J( h' ]; p+ H
Build-> Rebuild Solution
$ }8 d) [& \: r0 \: @/ _" Y; {8 b! [% T: k; ]( \
3) Sign the executable from an NX Command Prompt window:; x/ u1 I, X2 m- v
You probably already have one open because you started the Visual
" ]) C. k* ~( T* e7 h# z Studio or Eclipse from it. Otherwise:- l4 `; Z- H* K! _6 u3 d+ @+ [, o
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
6 _, R% O2 H+ P9 V9 w a# F. V6 c# p9 b, h- V+ t( @
Java:2 {+ v& X& l* g- y. u8 w
signJar <path to your>.jar
( E3 S& f9 P7 u5 Y \( s n m5 V
C/C++:4 Y2 Q6 ? O' E& Q' L4 k. m
NX8.5 and later:5 k; ^4 |* B+ L0 t
signCpp <path to your>.dll or .exe0 ~/ J3 x. `2 q' B5 _
NX8.0 and earlier:* M+ v) R& }* Y+ X# p. [
nxSign <path to your>.dll or .exe) D) F$ [( C$ d( e% N- G7 q
Y1 s& G1 x; ?, }% q( i: J
C# or VB .NET:
% q3 V8 p5 @6 D5 o0 v4 b ^ NX8.5 and later:
F+ @; \- |/ w: ^ signDotNet <path to your>.dll or .exe! N# k& h! N& C0 u5 j& g
NX8.0 and earlier:
* {+ K, C" w* p& x signLibrary <path to your>.dll or .exe) U5 S5 S4 C0 V, ^9 h
& O' ^# W* G& S/ v' p: J
Note: You do not need to use the path to the signing utilities because the1 U; K2 w6 D- H( r$ l
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
9 i' i6 S$ f) j8 N. o% zfolders., L0 C. k+ k4 B/ e( h
0 M0 k+ V+ d" Y2 h5 J! t" D |
|