|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
9 _3 Q3 ~# J; c2 A: ?# a
, _8 s3 Y. ~5 T1 @8 A) \2 y5 l; ]3 Z. O3 H
Once you have fully tested your NXOpen API application, you should "sign" it
$ M8 S; a7 r: r* Nbefore distributing it to your end users. Even if your end users also have
$ Z! f" q j/ R" n1 O- D7 Q" Taccess to the Author license which is required to load and run an NXOpen
4 T/ n6 B! E9 mapplication, signing it has its benefits.3 T Z6 V" a+ C- i/ ~" O+ [) W
: b% f4 Z( d& T; V
- Your application will load faster because NX will immediately recognize
x8 \9 ? b. p+ \ that it has been signed.
5 ]" \8 H3 q$ P7 D" H - The syslog (Help-> Log File) will not be cluttered with the output from6 x i v/ L% P e0 ~) `0 S
the multiple checks that NX will do to determine whether it can load7 N e5 m' `: v' [2 H' v
and run the program.
1 h0 Q, Z& q% \' L M1 U1 C s1 U2 I6 O& U" ~2 r
1) C/C++, C# or VB only (Java: Proceed directly to step 3)2 T& w, B8 j* z# W( [7 {% @. f
$ d; m/ T+ P9 z) f0 j& h
Add the NXSigningResource to your Visual Studio project6 Y& b7 C* O/ e# o0 o
& s6 a6 Q# E/ o2 `; k3 R$ c In the Solution Explorer, select the Resource Files folder and
/ K5 b* S; D a, ^( e$ L <RMB>Add-> Existing Item
1 }) g8 q6 @- }! ~- Q* N% b% g N( ^2 e7 D' i3 o# D$ L4 V N
C/C++:# @/ V1 s% F) T3 Z* ]1 d- [
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp; G; z7 K% {: z6 a
C# or VB .NET:
, v3 f# [$ ~; ~ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
8 \9 h3 ]5 H) F2 e Select the newly added NXSigningResource.res and in set: v0 D" z0 P9 K* J7 C P& n
Properties-> Build Action = Embedded Resource
# ^' t6 J; Y" M# P, g, b# I* q; @4 Z
" ?( B' u$ {6 }3 |" M2) Make sure the build configuration is set to Release then8 \7 V0 [. z! F) V# {3 p: m1 Q3 t
Build-> Rebuild Solution# ]* R1 m* x" f% G
' p( D3 \; z( @4 Z1 i$ g; h5 j
3) Sign the executable from an NX Command Prompt window:# M: |' [& { E+ y E( @
You probably already have one open because you started the Visual
# f1 ^7 p4 q, x' F+ a8 r Studio or Eclipse from it. Otherwise:/ s, W% y. Z6 p6 H, ]( F
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
' N T Q: n! }! c1 n Y+ P! Q5 k2 t* r/ I9 \. z! G* w
Java:& q f: Q% M% T! K; ~
signJar <path to your>.jar
8 s, y. m; ?! L% ^0 `* ^
+ v/ P% j+ p& S& _4 o t6 @ C/C++:
* u6 |5 R! N) [ NX8.5 and later:
& z, Z. v# M1 d( l3 z5 C( m7 ? signCpp <path to your>.dll or .exe9 H/ j* z( s; B8 v% ^6 Y! j& z
NX8.0 and earlier:7 V3 N, ` ~9 q3 B5 Q$ b+ b2 B
nxSign <path to your>.dll or .exe
+ E7 i( n. [) r ^; q9 w7 E* S6 p$ J4 ^- n2 e( X: J
C# or VB .NET:
; x4 O( W* p* [' ?$ ^& Y8 J6 K NX8.5 and later:3 ^: Q% i; N. t) g% T4 p9 V% ~
signDotNet <path to your>.dll or .exe
' I2 g$ ^$ z2 N+ [ NX8.0 and earlier:' n8 B* b4 l$ ~! n' N
signLibrary <path to your>.dll or .exe
# v& o6 P" q* t' z s# D$ t, N/ G9 r& y3 d. D
Note: You do not need to use the path to the signing utilities because the" m1 J; ?7 ^ T/ b" G! Q
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII, h+ w4 _0 c. d$ T' ~
folders.
. ^" g* Z4 x, }7 A+ l
" h% S: [$ l3 F) X) z; w! G- Y |
|