|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
+ u5 g; R- J; A- n) G+ z4 C
& z4 o8 C% K# M N) g4 ?
3 s8 b, Z0 S! D' a# m7 X
Once you have fully tested your NXOpen API application, you should "sign" it
2 I% M, @' H9 ?. h% w- qbefore distributing it to your end users. Even if your end users also have
8 b" k9 p& y3 |) taccess to the Author license which is required to load and run an NXOpen
2 r: Y, ^" X* t2 r6 ^' Kapplication, signing it has its benefits.( A8 J [* M$ q/ ~- F5 x0 a( j: Q
! `. \8 W$ v) K3 b - Your application will load faster because NX will immediately recognize
( M8 [) b. C$ U# D9 L* M+ g that it has been signed.
! ~& e+ G, A q- E& M2 Y6 S - The syslog (Help-> Log File) will not be cluttered with the output from" k+ M5 L- G4 @$ I' E
the multiple checks that NX will do to determine whether it can load
' n9 \, R6 w, J2 ] and run the program.
* Y! P; A' u$ F& M+ a% F7 r" X8 R: I" o- A! G3 M l
1) C/C++, C# or VB only (Java: Proceed directly to step 3)# u3 g% V j# Z2 L( \0 c
0 x! X6 I h" d! c Add the NXSigningResource to your Visual Studio project
; [* V4 q$ K# R4 l. P A% S0 v9 A2 k, e3 Z2 r
In the Solution Explorer, select the Resource Files folder and
' u4 b7 C5 B6 H+ L$ Y$ E. g <RMB>Add-> Existing Item6 g- C5 v2 I4 c6 D. c1 j6 s
3 V, D' t9 }. k: Y) G C/C++:8 ~+ J0 J- l" K: ^! \
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp& M1 L. b2 ?2 V8 }5 a; q X
C# or VB .NET:
, i8 f9 J+ ~4 q2 q/ N& C2 G# S% e Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res. ?% h) \# \2 _# M( a; B! b; ]9 }' o
Select the newly added NXSigningResource.res and in set
3 I2 |/ w! O( F* ?3 ^ Properties-> Build Action = Embedded Resource
1 h+ v) s: e; Z" }' ^8 |$ s2 n) T- M: k8 D
2) Make sure the build configuration is set to Release then% d2 |3 U$ h* e
Build-> Rebuild Solution
g. j: r7 J; h7 D7 b
: n1 {# x- s g3) Sign the executable from an NX Command Prompt window:. ^+ q7 l: }7 a. H/ o8 a
You probably already have one open because you started the Visual
# p' @9 N; ]( D; E4 Y7 V' b Studio or Eclipse from it. Otherwise:% y' d& ]% V2 X# I S' I3 }& |
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
3 _+ I7 V" Q6 \- u; U+ }6 @: R: w$ K$ W$ H7 ]7 p, x( n. a
Java:# }7 g3 m3 Q$ w2 j) \: P
signJar <path to your>.jar5 a3 r* M3 V0 R# R0 C
- x7 `5 k W0 Q' C
C/C++:2 b; T, K, J1 l& i. {$ x: S" }' O
NX8.5 and later:
$ g. x F8 H) G3 Z* I/ q signCpp <path to your>.dll or .exe- x/ |) J) \2 a
NX8.0 and earlier:
: c, X6 _$ E( I# t* W nxSign <path to your>.dll or .exe
' }" @6 j) m- z6 I' X {" I
/ r$ L" j; N- Y1 m/ M- R$ l) c C# or VB .NET:$ H3 F' ]- ~1 y: G9 C0 {8 ~: L4 O
NX8.5 and later:- C) w' c# g& _2 U' k5 O7 P0 `
signDotNet <path to your>.dll or .exe# x6 O* j& W6 k0 k: s1 D% j& e! t4 i
NX8.0 and earlier:; R- M! B. _5 A, f8 @6 r2 n% D2 i7 {
signLibrary <path to your>.dll or .exe" k" S& f% _+ E
5 u( M" s/ X s* n
Note: You do not need to use the path to the signing utilities because the( N3 w% `1 T. ~' J5 Z9 e5 V
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII' N: X8 T$ b; }8 R# h/ p
folders.2 K- {- q6 l* `6 c. L& w, q
# z: a5 w# v, y0 Q" u: ~
|
|