|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 G8 C) ^1 n5 V+ H8 z
/ C) R/ o2 Q7 U* m* G
" s+ k* n- O- {8 fOnce you have fully tested your NXOpen API application, you should "sign" it/ R6 `% A0 y6 V; W
before distributing it to your end users. Even if your end users also have$ H w# `7 G5 i$ d, E
access to the Author license which is required to load and run an NXOpen
7 H0 J( w- S0 J) x2 V: Y. J8 ~application, signing it has its benefits.
. P# [1 ` U$ Q, L6 M; D# m8 `5 _
& h7 x! J& M$ ]4 O. A7 Z - Your application will load faster because NX will immediately recognize% Z4 P3 X1 e: y5 @# |; F& Q
that it has been signed.
$ W$ t$ V9 R8 x' k7 y, h - The syslog (Help-> Log File) will not be cluttered with the output from# e6 H' {6 G$ _
the multiple checks that NX will do to determine whether it can load
7 C5 |; l4 t2 N9 g0 r8 V3 _* @" q and run the program.' ?4 w: D [ B* W
! q7 J Q2 n& O5 ^ k1) C/C++, C# or VB only (Java: Proceed directly to step 3); X* w. y- k7 D _0 U; S. V4 y
3 U! [# U1 Z6 E" W% d4 T Add the NXSigningResource to your Visual Studio project
# { ^7 A8 Z/ w- f+ l- W2 Q0 ]- d( r
In the Solution Explorer, select the Resource Files folder and! | z: \5 v# p5 v' q$ M% z
<RMB>Add-> Existing Item
. f2 e& L% T* X
0 r H4 I) M1 b C/C++:
8 j/ e/ n& O$ h Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
: a7 Z( J) T! j6 D& W C# or VB .NET:2 R" V" y9 C! X) \
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res# X$ N" t5 G8 c3 }
Select the newly added NXSigningResource.res and in set q; g7 }* r; H
Properties-> Build Action = Embedded Resource
2 i; s' E! E) l; o8 a3 j2 a* f
% u: I8 C9 P& H& J& b7 z2) Make sure the build configuration is set to Release then
6 N1 L. G! H" W! E; b! f" n- o& S1 v Build-> Rebuild Solution, h: U8 D6 \! j
8 D" r( l; i* z/ a1 S9 e' f3 I5 k
3) Sign the executable from an NX Command Prompt window:
4 a8 {" j# e9 J' Z You probably already have one open because you started the Visual
0 E" Z2 I# a, C( z2 e, t Studio or Eclipse from it. Otherwise:
& T( R: H/ F# o/ O# F+ e Start-> All Programs-> NX#-> NX Tools-> Command Prompt9 y, H! \) w% t1 w/ i9 O3 O3 L! }
6 Q1 ]. T! p& S$ x% j) L: _8 i Java:+ A3 _+ d5 ]$ I+ f
signJar <path to your>.jar- k0 v+ a) `7 C, C) }4 I
0 h3 j5 \" T3 m+ m
C/C++:
9 r5 z, f' H5 V7 B NX8.5 and later:) H, Z4 x4 \* t8 J. R
signCpp <path to your>.dll or .exe
+ m/ J3 w: W% M* T2 V t, J! b NX8.0 and earlier:
5 D1 R' p0 d. x( E {/ A nxSign <path to your>.dll or .exe
) i S8 R% O% A: P! \
3 b" X2 @( @4 Z2 Y, G1 ` C# or VB .NET:
6 A5 H0 R' k8 [8 g: r$ _ l NX8.5 and later:, W r) L( n! l+ ?5 R6 h* h
signDotNet <path to your>.dll or .exe
% T; \3 H7 D3 v p# C NX8.0 and earlier:
% ]6 r1 F' O* I signLibrary <path to your>.dll or .exe
* Y0 z) b) n8 W% U1 r1 z. z% M* l. k
Note: You do not need to use the path to the signing utilities because the
* @! Y+ \4 |& K& ^( U. I; vPATH of the NX Command Prompt shell already includes both the UGOpen and UGII _1 b9 L. S, o( @, @) |
folders.5 ~/ i" K; c; F! ?! X! A
# s' Y' p! }* Q; I
|
|