|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 c/ H1 c* m0 K2 M
% z' t0 f- N* o
: R3 K' D! w* j4 i# B' KOnce you have fully tested your NXOpen API application, you should "sign" it7 f9 ~0 k# P8 e$ i7 `. o
before distributing it to your end users. Even if your end users also have
: U% G( B x; g+ u. J' l w5 baccess to the Author license which is required to load and run an NXOpen7 [ p8 C2 k4 G% z5 C
application, signing it has its benefits.4 p. F3 H6 r3 ]4 n1 @, r
0 h/ E) E9 @! \# x: ]+ z
- Your application will load faster because NX will immediately recognize& r' {4 v" G& r9 q, j
that it has been signed.
! |1 X& [0 Q% C: \6 N, J - The syslog (Help-> Log File) will not be cluttered with the output from
2 {$ {" a7 J' ^; y/ Y the multiple checks that NX will do to determine whether it can load
) Z% G; V- ~( T& U$ K. y' K and run the program.; V6 J! h, n( v/ ?. K
# E" {# t$ }, {( v+ @% i3 d
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
5 O& U, i! F; d0 N0 r& j' ~! \
! V7 A1 c, D( s+ J/ M& r* k7 \ Add the NXSigningResource to your Visual Studio project
- Y L4 ]0 S+ C, E8 q; l. I1 c% Q
In the Solution Explorer, select the Resource Files folder and7 b4 R' K8 V: I- h m
<RMB>Add-> Existing Item
# T! X" [% n1 @7 {9 t6 C8 D! R* M+ @ e2 g9 w3 P, g
C/C++:
% K" w. M& W1 w. r) ^7 L# G( ? Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
4 f2 C2 q3 t$ {; i Q+ l7 P1 {# V. U C# or VB .NET:/ M1 T2 F! d- `) f; Q5 m1 U
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res) W) C, B( `9 i: L* |! j6 k
Select the newly added NXSigningResource.res and in set
* e! E$ t. O7 z7 c Properties-> Build Action = Embedded Resource
/ Z l: W0 I3 Y& T1 F$ v: i" T2 v$ m, e# R6 M
2) Make sure the build configuration is set to Release then! i6 B2 V/ e3 j
Build-> Rebuild Solution! ~! N0 d+ H" f+ y
+ f$ g, M- n& K+ ^3) Sign the executable from an NX Command Prompt window:" W+ P) a) J8 K. H
You probably already have one open because you started the Visual
1 Y' q- B% l$ N v7 k# _$ P1 `% { Studio or Eclipse from it. Otherwise:
M: y- \; g/ p2 {* `+ v Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 Q" u9 Z; n! ?4 o$ T
' _+ a" f$ H1 k% P' J Java:
0 a" [- Z+ p: {8 {( x* { signJar <path to your>.jar
4 A1 e& z# _9 a7 Y; c; X7 `- K2 b% d! j( v+ F' m+ ]$ n
C/C++:
* Z% T7 h+ u! y$ C1 p NX8.5 and later:2 c. L+ q7 c* E! z1 E0 f2 f+ T
signCpp <path to your>.dll or .exe
, r: K* f; \" `. V) o% |- P NX8.0 and earlier:
; Z# E3 g$ v' l, h! M* c nxSign <path to your>.dll or .exe
' y) r1 T5 R! M a8 \/ b8 v8 i1 t* F0 q5 W8 T
C# or VB .NET:
; ?. |0 W4 s1 d( P* a NX8.5 and later:
2 W$ W0 P3 u# o" u- |6 u+ o* q signDotNet <path to your>.dll or .exe
- G' ?8 J8 X/ Q! y8 X- c NX8.0 and earlier:9 Q+ `! @6 {; X) h/ W! P
signLibrary <path to your>.dll or .exe2 J8 ~ o% a$ ?+ o+ K! T x4 \; S5 t: l N
4 c( {3 _ v9 V1 c" V: b- U
Note: You do not need to use the path to the signing utilities because the
4 B% A4 S+ r# T: m% l/ S, @PATH of the NX Command Prompt shell already includes both the UGOpen and UGII: g/ `7 P1 R; f
folders., r% U8 M) @) L+ s0 ?
* U. n/ w6 U6 S. B$ |2 R
|
|