|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
# a) `' Z! _5 N
9 V2 L7 [/ A6 j9 k8 ~9 M$ q1 c. p$ y9 U4 k/ ~
Once you have fully tested your NXOpen API application, you should "sign" it
4 O, d! B) w- O8 t$ ^before distributing it to your end users. Even if your end users also have
; n+ x3 |! a; Z3 Saccess to the Author license which is required to load and run an NXOpen+ H! k( c4 d8 S8 b1 r6 z# ?
application, signing it has its benefits.
5 F" h5 r0 o* C) g5 b: ?
. M7 w( W) c' W& w% L9 N - Your application will load faster because NX will immediately recognize
7 a# r' b+ e; Y% d# D- Z1 C that it has been signed.
) g2 @# u1 K0 U; i - The syslog (Help-> Log File) will not be cluttered with the output from
0 G: f8 b' J; u; n# M3 o! \ the multiple checks that NX will do to determine whether it can load5 k0 Y# c: m) u4 n
and run the program.+ [+ @% v2 O1 | N% [
3 n. r1 G: n! U! Y7 {1 ^* W
1) C/C++, C# or VB only (Java: Proceed directly to step 3)9 d% W* h4 {: _- g& J8 A: D
( T" p0 ?' n- t; m* c/ G0 A: h5 f" d
Add the NXSigningResource to your Visual Studio project
* |' j+ o) r. B, Z4 K, a3 z3 R8 a# g8 R& v( J0 B0 S
In the Solution Explorer, select the Resource Files folder and+ \- ~( t4 m# m* }) ^9 K
<RMB>Add-> Existing Item* ]; j8 t! }8 v, ^/ i8 U
9 n' } m3 @9 M! s6 H' S: R9 V
C/C++:# x1 _. f! p4 X
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp$ h: s9 h9 d% u! e/ t, V n0 n
C# or VB .NET:
2 G# h3 g' n: ] Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res+ g! |+ g% y; a, ~' w
Select the newly added NXSigningResource.res and in set& d3 D/ ^8 b) }+ Q+ p7 n; `, d; a: ^
Properties-> Build Action = Embedded Resource" e% O7 r# A( @: a
8 x" T7 F, t* {; z4 M u2) Make sure the build configuration is set to Release then
( H( q" \; P$ o" X- d( n Build-> Rebuild Solution
4 y4 w* ^7 m! y0 h% S" j
/ u7 i4 c% h1 P3) Sign the executable from an NX Command Prompt window:. F, y7 c( n$ f9 m! Y2 P4 F
You probably already have one open because you started the Visual
- ?- l/ j9 }( l, H0 Q: N Studio or Eclipse from it. Otherwise:
7 U+ T8 W7 T* w9 _& v5 \ Start-> All Programs-> NX#-> NX Tools-> Command Prompt7 K" D) G0 ]) E% ~. v
" `- g4 i2 U0 V9 A$ q
Java:
/ B5 x# K/ u- w1 I L; U signJar <path to your>.jar
1 |0 R# t5 |- b" A
; `) M3 \/ m% \" \6 ~% S% N C/C++:/ ~ L- ^9 o4 f* j; d
NX8.5 and later:
; [3 p8 L( l& j, D: u/ g signCpp <path to your>.dll or .exe
! s6 {* A" m! v5 l5 y NX8.0 and earlier:+ e& K2 k: D4 p+ `
nxSign <path to your>.dll or .exe% m& J" ^8 n+ I- Z2 B
. J5 I/ L# l' f
C# or VB .NET:
; s$ _: T f! e7 [0 m NX8.5 and later:8 F7 N2 M: @: J) T
signDotNet <path to your>.dll or .exe% m6 Q! W% \. _" K" j$ I+ V
NX8.0 and earlier:! l( V/ A% Z4 B
signLibrary <path to your>.dll or .exe
& K- R/ _# ?- F! a8 ^& L# @! H+ E. q# P1 l/ X% z$ D# p
Note: You do not need to use the path to the signing utilities because the
! B4 }0 r& _# o8 B) lPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
8 Q) w9 S f8 t6 cfolders.% z% q+ w% P# J* E2 E
5 U8 E1 C+ e7 g; ` |
|