|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, K( K& y4 S8 c3 }
* M2 [2 x* t$ y
' ]! w# ~7 @$ e( T. f. y& POnce you have fully tested your NXOpen API application, you should "sign" it* n X" G* ` t. n" r8 G6 l
before distributing it to your end users. Even if your end users also have! f/ A' i+ H% h& h+ F
access to the Author license which is required to load and run an NXOpen
) Y% v" Q5 y) t- B- Q9 _! Japplication, signing it has its benefits.
9 P2 S+ n+ l: O. m- {/ m$ c8 e; K" j) T6 c! M
- Your application will load faster because NX will immediately recognize
! R3 y; l( a+ J. p' @+ m( `& d that it has been signed.
$ C. ~( W, b. w - The syslog (Help-> Log File) will not be cluttered with the output from/ H5 c; i7 b8 Z2 U7 j4 K; h! e
the multiple checks that NX will do to determine whether it can load
- g: S4 ?9 W+ @$ E4 E* V7 ]$ E and run the program.$ f7 ]$ R9 p$ ^
j0 |* [. u. R1) C/C++, C# or VB only (Java: Proceed directly to step 3)) `- T; Z+ } `( b
6 o+ n. t Z. b( s
Add the NXSigningResource to your Visual Studio project
9 a+ z* V& I1 ^
; d5 \0 T% X2 l- w In the Solution Explorer, select the Resource Files folder and
/ H% g) b7 U: T <RMB>Add-> Existing Item
, [ G1 A1 s( O& {+ i+ |* t
/ H4 }, H! f: b% @$ I6 [. F C/C++:, J7 _& A/ E1 l* i
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp" E4 t1 V. V5 z" P r; Z
C# or VB .NET:
; B. O* Q) k, s4 j5 |% H Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; c3 V4 [- f# e, ~: Z: u Select the newly added NXSigningResource.res and in set+ \+ q/ x1 \; K0 k
Properties-> Build Action = Embedded Resource9 ` I5 O6 o0 M9 b5 [/ T: A/ z
8 J y" U2 P9 P2) Make sure the build configuration is set to Release then+ ]/ m0 a; s# r
Build-> Rebuild Solution6 W; c! ^9 a1 ?. `* b. i
3 _4 @9 N2 b+ L# E3) Sign the executable from an NX Command Prompt window:
1 u. @$ S$ I8 R' e! [4 G You probably already have one open because you started the Visual* B8 Z, k2 c$ v2 R9 a1 C0 D1 K. O
Studio or Eclipse from it. Otherwise:
2 L! Y( |5 N- d9 J9 h8 n Start-> All Programs-> NX#-> NX Tools-> Command Prompt) w# R& R: p+ Z
! f/ A/ O6 H1 ]4 X Java:
4 i, T: S# a8 D9 l: T signJar <path to your>.jar
4 C3 ]% Y3 w) l# n- ]/ b
) p1 w9 h' y. L C/C++:
) U1 i& K8 Y' p' h; _1 ] NX8.5 and later:
) d W0 Y* c; D0 _ signCpp <path to your>.dll or .exe5 z( K5 R; L. G/ K2 @7 x
NX8.0 and earlier:; |* I7 a. L9 g
nxSign <path to your>.dll or .exe' d7 h' k+ Q- L3 h
+ U; ~; l0 F5 J" `
C# or VB .NET:' q# A2 K, v. f' T0 Z. r$ H
NX8.5 and later: s! Q0 P' X" M9 j- j! H
signDotNet <path to your>.dll or .exe; p2 E5 j% Q+ X7 K
NX8.0 and earlier:
6 _9 t$ j! g% D! K5 [5 N signLibrary <path to your>.dll or .exe
1 ]8 v: q9 {; W5 L4 l$ v& t7 O
3 Y3 D. @' J. \ s( ~* b/ Z3 T" BNote: You do not need to use the path to the signing utilities because the4 m7 y8 s7 {) K( E3 B- E
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
0 j8 s ^ l: _8 x& C9 }folders.- t4 o) B3 b2 v" w& I$ o* Z
: g0 `# _0 O1 A: j |
|