|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
3 n% Z+ C" i: P
9 B9 K* q0 W4 y; g- j; O' U, C, P4 j
Once you have fully tested your NXOpen API application, you should "sign" it' T3 `, H1 h, C4 E" j
before distributing it to your end users. Even if your end users also have
7 I+ z3 p9 b+ s) P& i, B$ N* Zaccess to the Author license which is required to load and run an NXOpen
" t. g4 P7 B2 g) a; Eapplication, signing it has its benefits.
3 |4 |' e# a& e+ X6 P4 s8 S' }# m ^" [( r
- Your application will load faster because NX will immediately recognize& O$ r- J" d. h z) z
that it has been signed.
8 ?: _1 `# `$ z. w; Z- `9 C - The syslog (Help-> Log File) will not be cluttered with the output from
* T$ M4 P p* x; l+ z the multiple checks that NX will do to determine whether it can load
! ?, `/ H( X3 o# H% p7 `; V9 M and run the program.
: J0 { }- R2 m2 W/ @# w6 \& ~" h* G K1 W, s3 P# f6 r
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
' A6 @! m1 q8 t. J; j0 B0 W X2 @
Add the NXSigningResource to your Visual Studio project
* _- ~& l. ?9 @; w4 T; X0 E: f$ U
! X' r. l% b' N) |7 \ In the Solution Explorer, select the Resource Files folder and
5 X3 m0 a% b! X8 Z( O <RMB>Add-> Existing Item
8 S- B* A* K2 k: i( W; J' n0 i( S+ t. f5 r) M0 f
C/C++:
4 ~1 K& |; q% |8 h* u7 ] Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp, M- |5 D: |/ o G
C# or VB .NET:( q/ t- |7 K1 R% V6 k0 @& l" |: W
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res0 [) n6 G% s: E8 Q4 @( i5 P
Select the newly added NXSigningResource.res and in set3 P/ ]( X& S F. H8 F) q# k
Properties-> Build Action = Embedded Resource
4 w1 b b" _2 T Y
+ R6 b4 d( Z" l' D- e2) Make sure the build configuration is set to Release then8 ~) D. ?! v5 N; o% ]- s
Build-> Rebuild Solution
1 _% k: j- \: w5 ?
, L C1 X( U7 |1 R; v0 }3) Sign the executable from an NX Command Prompt window:& U) P' A% X! `/ L. E
You probably already have one open because you started the Visual
0 ]' n9 l% Z8 j' M3 p7 ^$ X5 t Studio or Eclipse from it. Otherwise:) u" r* |4 M$ Y( |. I0 {7 U8 u; u
Start-> All Programs-> NX#-> NX Tools-> Command Prompt: Y# Z( _4 k3 P
5 A7 |) G/ q/ ^8 A$ `( a
Java:/ E& o. ~- t8 t4 V, y. i
signJar <path to your>.jar% H9 Y0 ~5 H/ ?7 E7 W3 } I$ ^* w
! [" k8 h* X5 ^; l2 m; P C/C++:
9 |5 \( L* t L1 K8 w* B' T NX8.5 and later:
. |+ H/ o" Q7 ~ signCpp <path to your>.dll or .exe% }( L5 X6 ]6 J" N
NX8.0 and earlier:
+ C- Z2 T# i8 J& V& v' ]8 P nxSign <path to your>.dll or .exe6 g* D& P) p/ C# s' _5 R5 @( N
9 Y0 b( @* l" i" M! R. m( O C# or VB .NET:
2 A# d, d7 c# F, Y+ l NX8.5 and later:
" b4 `) [5 q0 m2 r* l. z1 V& ~ signDotNet <path to your>.dll or .exe
2 D, W1 Q& o( W: z2 J NX8.0 and earlier:; \/ x4 ^: u4 `$ J
signLibrary <path to your>.dll or .exe
' C3 P' y8 n: I: R
* q, @ v3 j0 r8 Z6 g( \4 e5 N1 fNote: You do not need to use the path to the signing utilities because the
8 s. _) _+ y" C* H3 L2 |0 FPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
6 c4 r: f' S9 E1 _$ x& Mfolders. ^8 g M8 Z& v. O& @5 j; T+ Q
. {) P8 O! ]% Z/ X% ^
|
|