|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 j$ y/ @% |$ f- C: ^0 c$ [# N( J3 T% A0 R! @; m6 I
$ D2 v9 y( X! T+ UOnce you have fully tested your NXOpen API application, you should "sign" it
# q5 A$ u1 j1 j+ L1 ybefore distributing it to your end users. Even if your end users also have
# L$ z" d3 t% b+ ?access to the Author license which is required to load and run an NXOpen
0 g5 v0 _0 o! C# g! Dapplication, signing it has its benefits.
4 Z% e; }7 f( F; e* n) S2 C7 E# G% b; h0 e2 Y/ L) j
- Your application will load faster because NX will immediately recognize
/ W% u5 ]* ~* a, h) y) x' o$ @ that it has been signed.7 _* _# r0 A) T- U( ~8 m
- The syslog (Help-> Log File) will not be cluttered with the output from
|+ J% a/ B) D; @2 ?: p the multiple checks that NX will do to determine whether it can load
1 i: k% r) k0 c& J4 m- B and run the program.
1 N$ V+ [7 `: P. K! j/ p- \ Z
( K6 g7 s# V. U) ]. X4 J% r1) C/C++, C# or VB only (Java: Proceed directly to step 3)4 x$ D$ q/ c7 Y6 h) x9 ^9 w
$ w/ ~+ K7 a) d I* N
Add the NXSigningResource to your Visual Studio project
* l7 v. _# L, j6 o6 s9 P0 S! `/ `9 f4 S7 b4 g# [9 i
In the Solution Explorer, select the Resource Files folder and( t! x7 Q5 j- m* q7 ~8 S j
<RMB>Add-> Existing Item
$ k+ _: W8 M- a* p: i2 |# H( P* A4 z4 \# |2 L+ g
C/C++:
$ K+ `# }( A7 U0 z0 q Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
% {/ Q' a B0 b3 c% f C# or VB .NET:
+ Z4 ]% P/ {7 ]# ?2 y% g e Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
* N, X X- a, y- i: M3 P. U n- a4 @ Select the newly added NXSigningResource.res and in set) {: Q: {5 I) @. }4 ^
Properties-> Build Action = Embedded Resource
. N+ y) U4 R" W
# V# J9 \6 M7 G; g9 O9 m6 S* z/ _2) Make sure the build configuration is set to Release then- x, c$ F4 v5 Y0 u
Build-> Rebuild Solution
0 K9 r" [% F" K" k% s9 p- [- _4 G- P% t8 K+ j
3) Sign the executable from an NX Command Prompt window:. @8 R9 [5 r4 R
You probably already have one open because you started the Visual
. f% v/ X( R1 u4 T Studio or Eclipse from it. Otherwise:5 a* m$ J' P& J* D! \9 L
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
1 E# h, _4 _' z% }
/ z8 C& l' k; t5 p+ E0 v Java:
5 s" V( f) K4 X& ]$ [+ G: p! e( j signJar <path to your>.jar( }- U$ E) \# _$ K; w+ b
) I: B' a; }& F J) C( W
C/C++:: k! F/ A c' t+ Q- H1 T
NX8.5 and later:/ O- V6 t( O& p/ d4 S
signCpp <path to your>.dll or .exe
2 \+ e* v6 o0 v; F8 @. K NX8.0 and earlier:
/ m) T7 w4 [; \# H4 q; e nxSign <path to your>.dll or .exe8 j# a; R5 X: f2 ~
. ?% v n6 W c! b
C# or VB .NET:
8 z$ h- m7 ?& C/ D. w' w2 o& A NX8.5 and later:, Y A( j# ?3 g! Y
signDotNet <path to your>.dll or .exe
* W# Q. I7 J; _" l NX8.0 and earlier:
) `% ]( u% s# d signLibrary <path to your>.dll or .exe
! s6 O c, q2 A1 S$ a! ~! [$ N$ _. C! m+ m
Note: You do not need to use the path to the signing utilities because the
; k& B) E$ K0 l- f( O5 ~PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
3 o8 ]: x& R; @3 m6 m' o7 Afolders.
! n6 `* I( m2 X! U' |) m$ A! g4 D1 u9 ] l
|
|