|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
×
( j, ?& S1 Z% Q
% @+ A5 f) d" y2 h/ T o* o. m5 A' U m/ m4 ]
Once you have fully tested your NXOpen API application, you should "sign" it
- G$ Y/ i% k2 h% Q( G: bbefore distributing it to your end users. Even if your end users also have
$ j& R8 _0 X$ _2 f% e& Zaccess to the Author license which is required to load and run an NXOpen
# C+ T4 s& |$ tapplication, signing it has its benefits.3 l/ F. D) S" B; z
/ j" `3 C7 P5 H) I7 G - Your application will load faster because NX will immediately recognize
! e! q( C" e9 W, `, {4 \3 h* y that it has been signed., a/ s# [. R: Z: o! i
- The syslog (Help-> Log File) will not be cluttered with the output from
- I) t, R/ ]/ M* I the multiple checks that NX will do to determine whether it can load
4 |' f$ U! K$ W. K ?+ W! w and run the program.& F/ I) C% e l8 a) d G
. R1 v' d$ V. L% Z9 |
1) C/C++, C# or VB only (Java: Proceed directly to step 3)' C/ O. e( E; V- R) l( h7 B. g. f
W& c' T; G' s* y+ t, H: K/ V Add the NXSigningResource to your Visual Studio project
; m0 ?) | v5 Y2 Y7 [( d! g! Y, u/ S. m2 f# p/ r) s
In the Solution Explorer, select the Resource Files folder and8 j" E9 \3 n7 W
<RMB>Add-> Existing Item
2 Q$ l" |: L. P$ W# V2 c
' c5 q7 o- H5 _- T' Z0 b4 S& z9 N C/C++:
% E( @* \! {+ j2 e9 O Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
: H$ p; a' U3 L$ T& h4 v C# or VB .NET:. X$ g2 l- D& X
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res1 d. j' s _7 W4 p3 R- Y
Select the newly added NXSigningResource.res and in set
- M" Q i' N+ D3 \6 y Properties-> Build Action = Embedded Resource8 G- V3 |/ G4 u# {0 E' j5 a$ g
- {* m3 i. o6 G% `
2) Make sure the build configuration is set to Release then
' x9 M. m" z6 Y! o! A; m6 G Build-> Rebuild Solution. n7 H a9 ]+ Q
6 v5 ~+ A3 V8 m' c, v- o9 l! l/ Y3) Sign the executable from an NX Command Prompt window:
, i. V/ [( m: G! o- ]9 r" G You probably already have one open because you started the Visual
$ E& }$ Y0 m; L7 j- P( e Studio or Eclipse from it. Otherwise:
2 ]3 S; I, j6 K* H7 y6 [8 e Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 D( H- {8 J3 p8 q! S) ?
+ a$ u7 a! d7 a; e1 C( Q. j Java:/ c7 j* ?0 @* w r2 O5 f
signJar <path to your>.jar8 s# B" E: x D
1 g v( m! v+ s1 g$ a C/C++:
* u# _8 R/ f( e- A NX8.5 and later:0 X9 f# C \/ i8 ]
signCpp <path to your>.dll or .exe
# d$ T3 U/ h: m2 j+ R$ H( H0 Z: Y NX8.0 and earlier:
! P l6 [, a* a0 E nxSign <path to your>.dll or .exe! E+ P! Y% \/ D9 @" Z
$ Q, T; T$ [9 x- x* K% V1 ] k C# or VB .NET:0 f; P3 @% n" @1 }* f
NX8.5 and later:
/ m6 q9 d; O& K2 K1 w8 l signDotNet <path to your>.dll or .exe
" _& d# E5 k$ |, W NX8.0 and earlier:+ W6 A9 x8 E4 r, T0 `6 g7 ]
signLibrary <path to your>.dll or .exe
7 v+ M" G$ z, }7 N* l$ c, e1 i% J# ?: `; t6 n8 k; ^% g! i
Note: You do not need to use the path to the signing utilities because the
$ q* R/ e% h0 GPATH of the NX Command Prompt shell already includes both the UGOpen and UGII( ^8 A& T- Z7 k6 G: W
folders.1 `9 o7 J [- P0 u# u& t
# S2 {4 s5 u$ d4 q
|
|