|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
×
/ W# w7 ?9 g$ r* k) d6 M$ E' _6 c. S4 F+ _9 G$ }( l# e6 q
( e1 G) r# i( }3 [- c* o1 B; ?
Once you have fully tested your NXOpen API application, you should "sign" it) t& l! W9 i7 g2 l
before distributing it to your end users. Even if your end users also have8 ]; t7 D' L( y9 [
access to the Author license which is required to load and run an NXOpen& m/ P6 A. s) d( A8 l
application, signing it has its benefits.
$ V7 a' r: C- s; s( u- l
8 H) {0 K; h3 C* t: Q/ ` - Your application will load faster because NX will immediately recognize# j4 A; C5 x' e( x- v+ ^
that it has been signed.
U# T' r6 Z6 \' P2 u5 g - The syslog (Help-> Log File) will not be cluttered with the output from
h, y& Z( ?* u+ |; Y0 Z# a# S; I the multiple checks that NX will do to determine whether it can load9 Z% K! \+ t4 C, C
and run the program.8 a0 Y* q& Z2 p7 C& B
+ C7 v) _. H' {: `0 V9 W" @
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
8 }2 X( x$ Y4 ?$ @8 c. X% P
; G* A7 u$ i) j" E4 J K Add the NXSigningResource to your Visual Studio project
1 I/ I' ^2 w! n9 j: M$ t! z: i0 x1 ^( E7 e) U! m- {+ S0 U
In the Solution Explorer, select the Resource Files folder and/ L7 k/ {. y z& ^
<RMB>Add-> Existing Item
: |6 C, k7 v3 P: N, n) a. ?0 e- J+ P6 P
C/C++:
, `3 i5 i; n( J. \; }7 x Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp# }4 D0 m/ T( P. v
C# or VB .NET:) P, A# N2 q# C {
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res4 C. O! M( v7 F r" L( l+ Y1 k
Select the newly added NXSigningResource.res and in set
- r2 m6 ?! o9 J6 r5 k2 }' t8 t Properties-> Build Action = Embedded Resource0 v6 q! R6 A, b: E8 ]7 m) \
; G. ^4 p. Q) K& G2 Y. E- c# {
2) Make sure the build configuration is set to Release then2 G3 S5 K* ?! W, e8 I
Build-> Rebuild Solution% C1 e, s8 x# w! L; b# t
' p: C4 D I0 L, J, q" G% O
3) Sign the executable from an NX Command Prompt window:$ [9 n$ a0 n' f0 t
You probably already have one open because you started the Visual
/ `2 v* _4 p6 h# k Studio or Eclipse from it. Otherwise:# n7 M& T7 A) J. X
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
! [, {$ A" t7 x# |8 X8 x5 k+ C
( H8 ?5 w$ Z. R& i* _0 F Java:3 k5 ]+ E" Y# m5 I* [
signJar <path to your>.jar
, D4 c2 E3 L" F0 ~% Z9 Y; H( m* s$ K6 h! a( g% K$ |
C/C++:& x% j( n# m2 V6 }5 k3 _ R6 j' G
NX8.5 and later:3 ^/ ]: |. u/ e% c' D* [& [! t
signCpp <path to your>.dll or .exe2 D3 b( y# n2 L8 l) ~. r; {% [
NX8.0 and earlier:
+ y! A6 T6 l& G( u/ H) M nxSign <path to your>.dll or .exe9 T) X; G( m) J- V% |
+ F. E& ~4 ~. e5 {4 \3 i) n
C# or VB .NET:. [ S- b6 s5 n+ W% D* i
NX8.5 and later:
: y. s# S. O5 D& A signDotNet <path to your>.dll or .exe: [# h1 \1 z j! Z: b
NX8.0 and earlier:
5 S, U! v" V7 `" G' d* A signLibrary <path to your>.dll or .exe( _& c; S u/ }1 }* ]& V; e. ?
! Y5 {3 T+ S# s, f* E) J
Note: You do not need to use the path to the signing utilities because the' c% w- o3 o2 k7 y& s
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII% B7 {+ s1 n+ Q- v- y! U- ]4 Q, k
folders.1 N4 V l. ^6 J. G# k
" r- p2 a8 G' d4 M7 O
|
|