|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, Z: V4 C7 w% O& e
4 q: M' |8 ]$ X3 v. p- a; ]8 d1 x& @7 ]4 w9 i9 w' J
Once you have fully tested your NXOpen API application, you should "sign" it3 A" c+ n8 I/ X/ I/ K: S6 O( r
before distributing it to your end users. Even if your end users also have
& C7 @8 \- [( X6 |! r; caccess to the Author license which is required to load and run an NXOpen
C G& o: W0 S1 Z2 Napplication, signing it has its benefits.: \* H) m! U/ m b
7 }: @9 k L l0 Q6 |% _5 Z+ R - Your application will load faster because NX will immediately recognize
+ m- C9 \5 l! _6 H. u that it has been signed." Q r) e- l0 V, ]8 h8 k' s d
- The syslog (Help-> Log File) will not be cluttered with the output from
, r0 |# B/ C3 \1 v the multiple checks that NX will do to determine whether it can load
/ u9 l; T$ B/ w! }, A and run the program.! c9 S; B4 ]& k2 w9 _9 c: L& J
" g. g) b- i' q! ` M1) C/C++, C# or VB only (Java: Proceed directly to step 3)( p) L- z; }- g/ ?* c) T) f$ L
, o) c! V: p1 I1 q/ V Add the NXSigningResource to your Visual Studio project, l' s) ~% `4 B( A
/ _- R8 o* @# y& u7 D/ g2 G4 \ In the Solution Explorer, select the Resource Files folder and
% d g* c7 Q7 q- m: {3 P% [) E. J* A <RMB>Add-> Existing Item# D6 F5 q6 P$ I/ F" _
- L" p2 H9 W. v: d" C3 }$ t C/C++:8 j8 B/ I0 J2 r! p$ J
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
; L7 _' Q# g3 T C# or VB .NET:1 t/ @" f5 s" g7 l- @
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
$ Y+ ^* n: h4 L Select the newly added NXSigningResource.res and in set
# b1 W0 z. n) x4 G$ P3 } Properties-> Build Action = Embedded Resource
/ O5 R1 J% @+ S+ {3 W8 ^; }, K- j
1 C' a: X' @ ^( w% e2) Make sure the build configuration is set to Release then
3 Y' Q# |# z) ^ Build-> Rebuild Solution8 u4 ?$ P- {( Q# J4 V3 R
2 A1 y: e) I$ Z. o9 D
3) Sign the executable from an NX Command Prompt window:# B0 ~- T* ]" v$ m
You probably already have one open because you started the Visual
4 A" M5 N" m) B: l' y Studio or Eclipse from it. Otherwise:4 ~9 U, }. W8 ^# {% P L* {
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
! n( @9 U/ D# m* G8 U
6 v) ^) h' U+ z# t# _' Y8 l Java:
9 O. ?( m0 g Y! W signJar <path to your>.jar+ D2 @* O# n: k2 y& z. {2 K4 v; Q& c% l
, w9 q: H; l( I+ |* Y C/C++:
5 V3 p9 G9 \( B' A; J% k NX8.5 and later:' u0 e/ s6 [: C
signCpp <path to your>.dll or .exe) M5 X; x5 l* C2 W0 u
NX8.0 and earlier:
8 ?, m# H8 M2 ~7 _9 |4 u% J nxSign <path to your>.dll or .exe. M P& D' a5 G* ~7 h+ r: Z9 R
/ ?' Z, i* G7 @. f+ e1 e6 M6 M3 [9 F
C# or VB .NET:
! R; Z) {; w0 Z/ Y) B NX8.5 and later:$ h- y) t7 N2 |# R, y+ S) s
signDotNet <path to your>.dll or .exe0 s7 w1 p1 S4 ^4 X: T; D* Y1 ]
NX8.0 and earlier:3 M7 r9 E! c$ X, B* \
signLibrary <path to your>.dll or .exe
4 G q6 p- C1 K( k9 y7 K
5 |* w; l3 w- d0 t$ F1 l. ]# ~$ \Note: You do not need to use the path to the signing utilities because the
( t7 n2 i' M) h# U O, _; nPATH of the NX Command Prompt shell already includes both the UGOpen and UGII7 b5 s2 b& L: f# w, ~
folders., _( P2 _' f- y& b: C
; }6 T: q, j/ Q3 P |
|