|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
$ N9 [/ Q' k# U/ [3 P9 L! _" r$ I" c, }- c4 @, e8 \
! m! D$ w; R( w5 G& kOnce you have fully tested your NXOpen API application, you should "sign" it
& ?. C8 S1 p6 W0 N1 v( x2 Gbefore distributing it to your end users. Even if your end users also have/ i: |0 u" _+ Y* s# V y
access to the Author license which is required to load and run an NXOpen
0 b3 H9 R( {0 s! @application, signing it has its benefits.( Z1 _3 n" R/ A" C* [
2 e/ v! L) }, q3 w6 m- d, I) Q
- Your application will load faster because NX will immediately recognize
8 ]3 }: i- Q& P( C# y8 }: ^ that it has been signed.
" [0 @" d9 w/ Q2 | - The syslog (Help-> Log File) will not be cluttered with the output from7 r# S0 G: h# F) I5 @9 w/ L& D2 x
the multiple checks that NX will do to determine whether it can load6 s* K0 e; A2 _# V
and run the program.
+ x! `- q p! a9 ^( a
, f- Y: `$ G& q y' T, N4 ^1) C/C++, C# or VB only (Java: Proceed directly to step 3) q8 y% ^' U- U2 Q2 [3 u
! e9 {( a* O6 A8 L8 o) C2 O
Add the NXSigningResource to your Visual Studio project
" N- }5 b3 E0 v4 q! V+ y2 G& o
0 [. [$ d* j0 [/ B" r3 N) [& s In the Solution Explorer, select the Resource Files folder and
- r6 ~2 A( w# b <RMB>Add-> Existing Item: q. }) [- S) F$ }
7 z, [; _- d( E0 l0 | x8 L C/C++:
) b, D) z) t; e {1 W8 x1 h* M Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp# x% v" i' X: f; w& B
C# or VB .NET:
5 t# h2 _# F9 T1 n! b+ o. M Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
3 R; c* r" v/ Y4 {1 r. ? Select the newly added NXSigningResource.res and in set, k) N+ k* i l. b- _; A- G
Properties-> Build Action = Embedded Resource
( T8 p: o1 a( Z V, ~; |
- }! P7 P7 q+ J, ~2) Make sure the build configuration is set to Release then) W2 W. `) Y; Y) Q' U4 _
Build-> Rebuild Solution6 `7 h3 t( X" X/ A
# E9 i( K( P+ r) p! x
3) Sign the executable from an NX Command Prompt window:* l4 l6 i& H6 Q) z- E
You probably already have one open because you started the Visual2 u' r7 L; y! i, `/ ~, a0 u
Studio or Eclipse from it. Otherwise:! M) ]8 B( K! e3 |% U0 o
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
s4 ]( m! F# D9 S
# E3 K/ ~! ], z5 n, ] Java:
3 ~$ m1 `5 \' U$ s/ L' l7 A- S signJar <path to your>.jar: D1 S7 Z4 b! j0 {0 Q
' B7 J6 I4 v# `# M- R3 ^ C/C++:' E+ E4 D2 l- w$ l! g8 |, Q
NX8.5 and later:+ H7 K1 V# t4 z6 X% m- h6 ?; o
signCpp <path to your>.dll or .exe8 D; W' ]4 b/ N9 S2 G4 s
NX8.0 and earlier:. Z" {- j9 u' j
nxSign <path to your>.dll or .exe+ P- i- ^7 H& e8 h! V# N1 S
& i4 n: h$ K7 v( y2 {/ n1 q C# or VB .NET:- U& H% {) p/ e+ Z
NX8.5 and later:- [% w9 a8 i/ r
signDotNet <path to your>.dll or .exe7 @; I6 O; V5 A, I- h0 S7 o
NX8.0 and earlier:1 P/ w' R/ e3 R5 C
signLibrary <path to your>.dll or .exe, g! T5 w! \+ @" b- M4 I
) e" ?) ]6 k$ x# h* f+ `
Note: You do not need to use the path to the signing utilities because the2 H- j& {* ^2 l% C# W0 u) N
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII3 l2 T s, x% k6 j
folders.. ?3 Q- ^, Y: T s
$ V& R1 g+ X4 S' i |
|