|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 V2 W8 {! `9 E4 |: F" i0 M- ^) O' z& I9 S
% e8 ?' m: h. S0 b$ E; F% }Once you have fully tested your NXOpen API application, you should "sign" it* D1 e$ R) ?' c, ~ f6 P% g
before distributing it to your end users. Even if your end users also have
% \7 D5 X6 b; t3 K: l4 {, r2 kaccess to the Author license which is required to load and run an NXOpen9 u# E( Q8 S! ?! ~5 a: M3 M
application, signing it has its benefits.
6 l l1 K; T. L- u6 D' L( H; v
- Your application will load faster because NX will immediately recognize
' r2 o* v( ]0 N9 ]' N" q7 g that it has been signed.$ Z6 k! N( `" m0 }
- The syslog (Help-> Log File) will not be cluttered with the output from
& v w; J" _1 z( V the multiple checks that NX will do to determine whether it can load3 J# \, O/ W6 \& E* e4 g% u% h& @
and run the program.
) @" z& G+ f# @
' p! P! O0 y* t1) C/C++, C# or VB only (Java: Proceed directly to step 3): b: i1 p# q2 t$ K' l* z5 [
6 u$ R# r& Y. E: a- D
Add the NXSigningResource to your Visual Studio project
* r) j! S# v7 r5 H' y3 [$ v
: P/ R8 T( C0 `' p In the Solution Explorer, select the Resource Files folder and, | B0 G: N1 K7 _& q: k( d9 B
<RMB>Add-> Existing Item
# d, f" L( g \' G- q# }+ ~+ i# C& g% \# q+ v T
C/C++: @" o* q1 p5 [; s/ M1 R
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
6 H+ C* L% J; k4 q; j7 [3 M+ k. C C# or VB .NET:
) Y v J4 s! o1 k Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; B8 e3 a9 L$ s2 ? Select the newly added NXSigningResource.res and in set
0 Q% H2 ~9 b. v ^4 I4 n% }" W1 f Properties-> Build Action = Embedded Resource6 V F g9 y/ J' _/ O3 T
& D$ V5 U! ~+ h' {1 w2) Make sure the build configuration is set to Release then
: J* f' T b6 K' j0 o9 h4 {3 W# z Build-> Rebuild Solution1 R# v, {8 C# O7 K. ?7 f
2 y. }2 h& ^) W& K* ~( L$ K
3) Sign the executable from an NX Command Prompt window:
/ I+ T3 O1 \. @6 Y _. n9 P5 s You probably already have one open because you started the Visual! g2 s3 g2 ~/ K+ f2 i3 `/ `3 R
Studio or Eclipse from it. Otherwise:
& F$ c7 n0 y/ M" Q6 B) p Start-> All Programs-> NX#-> NX Tools-> Command Prompt. E9 z t6 P1 h/ I/ G
: ?- e& u# |& ^) a8 e( J Java:
. I( U3 Q* g) [$ O: j; C D signJar <path to your>.jar, D4 J0 x6 h( d+ r/ J- ^8 z7 c
7 f) Y) e0 C) k
C/C++:& U K# d# [- S, P8 i. n
NX8.5 and later:
/ g4 g; o" u8 Q" P2 b: }" F. m signCpp <path to your>.dll or .exe# o, j* H* t7 O$ x/ H
NX8.0 and earlier:8 d6 k2 d: T. m% S) D7 S: }
nxSign <path to your>.dll or .exe q$ n9 {) I+ V' T8 ~ @( b
: q+ L8 c- y6 d; l2 W C# or VB .NET:) W8 `+ Q1 O/ L7 D; n8 A* x: u
NX8.5 and later:% Q7 Z3 h8 v a9 _$ W
signDotNet <path to your>.dll or .exe' U/ K& E# n9 r5 }
NX8.0 and earlier:$ ^8 x3 B& v2 ]! M& T T, ?) ?
signLibrary <path to your>.dll or .exe
' Z; B- o. x3 Z: h4 E* h
& d \) {7 m& T3 V: D+ o" TNote: You do not need to use the path to the signing utilities because the. _; [! C4 W1 R) t, w) z; l
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII0 g7 y: ~' b9 Z+ n6 @* G4 F! V
folders.
6 e* ~; v4 Y1 }+ t: Y2 @
3 p* D9 l4 ?; G8 ?1 W |
|