|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
; {9 z1 w) `* o
& \5 a; q6 o: E2 {1 y) @, ^5 Q Z6 i2 \$ n2 \$ C
Once you have fully tested your NXOpen API application, you should "sign" it( U T/ v& @6 c# @* ~
before distributing it to your end users. Even if your end users also have4 `+ E+ P/ K3 Z& }" a; E
access to the Author license which is required to load and run an NXOpen4 T, ~" G% _6 {5 l3 z. D1 E
application, signing it has its benefits.4 F1 q) j2 C8 M# X
- N* C2 z/ m+ W - Your application will load faster because NX will immediately recognize+ W- ` ~/ O& F: R" R' H' ?8 i) s
that it has been signed.! z8 @) A$ d0 v3 p
- The syslog (Help-> Log File) will not be cluttered with the output from3 D% g- R" ^: @1 _9 n# A
the multiple checks that NX will do to determine whether it can load: u( ~: q1 g' Y1 [7 Y2 |
and run the program.
1 M2 W+ }$ P% y/ [( C2 J; S2 o h0 |4 l( Q$ w- {+ S+ w Q* \
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
, G$ n+ x& v! T7 }% y! Y+ L+ M/ F* l3 Q8 u0 q" F' Z9 o9 A, \
Add the NXSigningResource to your Visual Studio project* m# x2 S' t( Z7 y+ t( O( h
& Z7 T2 T$ q" C+ A
In the Solution Explorer, select the Resource Files folder and* |' ]* P, Z) u9 t
<RMB>Add-> Existing Item
8 X' k; `" e4 X
$ d) m. \; Q6 _) p! w C/C++:9 S6 r( X+ B0 K; q! v
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
' V1 b/ g W0 o6 w& @ C# or VB .NET:! H) [" f' ?/ D j, V _
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
! J+ \9 {+ m: @ Select the newly added NXSigningResource.res and in set
- M# A! h, {# ~# D6 J) G- b7 I Properties-> Build Action = Embedded Resource6 }0 b7 m+ o/ N5 [! r7 N5 w% L' ~
. Y. x! v+ l( f
2) Make sure the build configuration is set to Release then
( i2 f( j1 c4 m: f" u2 @6 W& G Build-> Rebuild Solution
* @/ {8 |. C& r, f" W( p: E# X# W' s6 k& D& f+ B+ a- b
3) Sign the executable from an NX Command Prompt window:
' X/ D1 i' |! {( [% }# x+ n6 x You probably already have one open because you started the Visual. Q/ A- w# U' r% }
Studio or Eclipse from it. Otherwise:0 {/ C4 F: ^. Y( @
Start-> All Programs-> NX#-> NX Tools-> Command Prompt/ w! V# v6 |) X+ b* |
& n& r* p! H7 F Java:
( b4 q- h5 a- T; Q, [- \5 K signJar <path to your>.jar
" u E$ a# i+ C9 ^
; ?1 C: Y, ]+ }# ] C/C++:
& k* J& A, G; B0 Z' Z0 w NX8.5 and later:
2 f/ b _2 }- v9 ~6 c1 e" o* |2 v2 O4 K signCpp <path to your>.dll or .exe
* `! J% P7 L( X4 U! W" E NX8.0 and earlier:
$ h7 _; G) z A/ M2 t1 S4 ~ nxSign <path to your>.dll or .exe$ i. l* U1 B$ Z$ @
* e6 N. `" e+ A$ ^0 E
C# or VB .NET:2 w' v+ g4 ~7 O
NX8.5 and later:
" ^4 ~8 x' k0 s5 t: G0 w signDotNet <path to your>.dll or .exe1 h }" A) K0 z, `) j, H6 u
NX8.0 and earlier:3 M t/ Z2 b. }' ?) X
signLibrary <path to your>.dll or .exe
! Z4 `; \ d* ]" j: X1 |% P" F# s' f1 F3 m' v
Note: You do not need to use the path to the signing utilities because the
8 H& V' F8 E- _% N4 LPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
! y; Y2 L0 z% X7 r5 c; sfolders.
& |! g$ j/ k' w S+ H" J# T% l- B$ _. L
|
|