|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
E/ e* G& ? Q+ K$ s
4 W( R1 v* E: U. l4 J4 x1 N0 r( P/ x# e( Y/ ]7 U
Once you have fully tested your NXOpen API application, you should "sign" it
/ {7 W% _) [9 @6 `5 kbefore distributing it to your end users. Even if your end users also have
1 g2 R7 Y! Q, o9 |' b" [' _access to the Author license which is required to load and run an NXOpen& E) z. D5 r. b9 p1 T
application, signing it has its benefits.) A- j% _7 x, k
" }* b- E9 j% R3 O* ]' a4 b
- Your application will load faster because NX will immediately recognize
( d% O% K' k) G: J that it has been signed.' L% p6 d0 h4 K* c9 \
- The syslog (Help-> Log File) will not be cluttered with the output from
! a- q+ g* M) H8 x9 h% R the multiple checks that NX will do to determine whether it can load1 ^( W& A C3 e) u
and run the program.
5 r4 {$ z p6 C E, d( Q
% c( V$ n8 S2 U- Z( J1) C/C++, C# or VB only (Java: Proceed directly to step 3) d; V' k5 I3 s: w6 s3 R5 G
) G7 \' X* \$ L* C+ w
Add the NXSigningResource to your Visual Studio project
/ W" W# |6 l |. r/ u5 K* Y# [# @0 t8 _& N8 a. F% b3 d+ w' Q
In the Solution Explorer, select the Resource Files folder and7 z4 ~7 ~8 ]" B
<RMB>Add-> Existing Item8 E7 z0 X0 G5 E. q
" B' Z8 ^! u! ?9 g
C/C++:- F6 ]4 s3 W4 {( I" D
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
7 i2 ?4 ]/ v4 q4 Q C# or VB .NET:
# u6 Q2 h* r% ~ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
3 `' w. W0 Z8 F Select the newly added NXSigningResource.res and in set
9 Y8 O& X9 I$ h Properties-> Build Action = Embedded Resource
) {/ v% m# p! C0 L7 [: T& g4 @* Z c3 T8 a3 e; `1 c5 X
2) Make sure the build configuration is set to Release then) }4 u$ t% j) y6 Y) l. [2 ^
Build-> Rebuild Solution0 S9 n8 W$ z$ H
) y; f2 R% |" p$ L' X3) Sign the executable from an NX Command Prompt window:# u; E( M# b3 ~# F z8 d
You probably already have one open because you started the Visual
& E3 _9 y6 a8 z6 S ?; F$ t0 y Studio or Eclipse from it. Otherwise:
; v6 t9 H: a. {, n' L$ X Start-> All Programs-> NX#-> NX Tools-> Command Prompt- ?) E! w6 t; {8 l* ~
5 @6 l v3 E: @& S/ \6 m- i Java:0 J' H/ v) p+ g" A1 m3 X# q
signJar <path to your>.jar' ^: O9 \7 h1 v% k# p! ~
s! v2 w, R O9 o. b/ i
C/C++:2 x* A+ i4 r9 ~9 ^4 ]: {& f A
NX8.5 and later:
' b5 B! [3 Q+ }- ~# n9 Q signCpp <path to your>.dll or .exe
! C7 w1 u' N3 Q- Y% S NX8.0 and earlier:7 P2 R9 `8 I, I% B5 b
nxSign <path to your>.dll or .exe
+ V1 N/ J) f, B8 g" p" Z3 S; X+ I. X7 {* P5 }
C# or VB .NET:/ a: E% i$ ?" p2 e" `; Z
NX8.5 and later:4 @9 O. m- J# f" v! w- [( ~* S
signDotNet <path to your>.dll or .exe3 q: v6 T, s6 Z/ j" V+ B
NX8.0 and earlier:) n% r+ G- j7 |' x+ p- e
signLibrary <path to your>.dll or .exe
: V2 r4 O' O( |' W1 W% F1 s: I `# B g; l! R; E1 }2 i/ A# |
Note: You do not need to use the path to the signing utilities because the3 J( z. J. |$ g) p' a0 Z
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII# k. C$ y V0 @, [ y `2 B
folders.& m# _% I2 L: s3 N. L) x f
6 C. o1 ?3 G$ P4 ~/ T$ Y- V |
|