|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
- M- I" d6 q, ^3 S3 O+ f. J+ r' _- }) l5 U
( n+ Z& }5 T, |: D- WOnce you have fully tested your NXOpen API application, you should "sign" it6 A9 y; ~6 c' D% d& T e
before distributing it to your end users. Even if your end users also have
5 ^. |- ?+ v1 ]5 s3 Gaccess to the Author license which is required to load and run an NXOpen
# }- `' w) U2 e) L0 j8 d: V3 |/ uapplication, signing it has its benefits. U' x7 o# R) |3 V/ Z: }$ X
. }' B3 z' s% X$ P$ V& s5 D - Your application will load faster because NX will immediately recognize9 C. p" P% y# B- ]8 q% p
that it has been signed.0 U, ]! Z! ]' h( z" W. e" r- O
- The syslog (Help-> Log File) will not be cluttered with the output from
5 i6 W. w+ K9 L' V the multiple checks that NX will do to determine whether it can load
6 ]1 c# P6 G) A" x5 z7 E and run the program.
9 Y+ E W3 }) S4 d# a: ~: S9 _4 a Z! d# P- I/ E
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
r" o0 i6 ~& D0 a0 T6 m2 i' W
" {8 V, n& m" s1 N6 D. r2 D; } Add the NXSigningResource to your Visual Studio project) K) L) y X* Q( _% f
0 a- t& T1 K8 B; J" ^# i In the Solution Explorer, select the Resource Files folder and
& ]5 D, j% N! B <RMB>Add-> Existing Item" j0 L0 _/ `% F1 m; q [/ A
; |; P y6 o9 {3 n0 h' e C/C++:
! ^0 U9 F, D7 f' D Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp( @, E/ y& I8 F3 _$ t. X% J) r
C# or VB .NET:
$ {/ s$ ~) m6 i0 N Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res2 S1 C0 s8 C3 g# Q# ?( Z6 n! o/ W
Select the newly added NXSigningResource.res and in set
j# w3 C0 H) N Properties-> Build Action = Embedded Resource' g5 |1 F# Q4 C
9 j. F9 t8 F! D) q5 Y2) Make sure the build configuration is set to Release then. u) L2 s+ _4 K' _; g8 b/ t
Build-> Rebuild Solution
7 U9 f$ h- U* O4 n. k0 X$ h2 j% ]
3) Sign the executable from an NX Command Prompt window:0 c+ x' N/ `3 l8 c, p2 U8 Y; U1 Y
You probably already have one open because you started the Visual' S3 e. J8 C$ c9 F2 ?" z
Studio or Eclipse from it. Otherwise:2 H# A0 {6 J! X" |/ g8 z8 t2 p' U
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
3 @" `7 C9 ^ F- z# d: @: E2 q
* ~) x" ]% b& X6 ?6 ~ Java:; W5 H' Y) i2 M
signJar <path to your>.jar: F& h& p( Y3 j3 l
! o) |9 m8 e4 N+ U1 a
C/C++:
9 G8 y" u4 X, h& R2 _ NX8.5 and later: o' n' {6 u% j8 F' Z1 |
signCpp <path to your>.dll or .exe
# `" x/ _0 H" k$ q9 g NX8.0 and earlier:2 r0 k1 M! _( X7 ]! B2 }6 O
nxSign <path to your>.dll or .exe' I3 y* o4 A1 ]+ T% t
: A! B" f* ]" u' Y) [+ G+ {. w C# or VB .NET:: k$ ?4 a; L( X% w9 S( q: E
NX8.5 and later:% a# z# j: d0 Y0 F( Z% n. [
signDotNet <path to your>.dll or .exe
9 G9 O! i/ n$ S3 F. t& j NX8.0 and earlier:4 p/ N9 \9 a, o7 H8 t
signLibrary <path to your>.dll or .exe
+ f( S1 X' r8 n/ q4 I0 W3 J( a
* V" @. i' |, T& r3 fNote: You do not need to use the path to the signing utilities because the
6 i. \0 d( ~2 J( z; F$ N" GPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
# D8 w! [% E2 U& {' {1 @folders.0 j& S: w% ]" R2 N
! K2 B+ v& h0 O, F/ z: u |
|