|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
# j$ }; l M3 o) [
6 Z4 D, t/ M- Y- t! E2 I* I2 e7 N( _" S J' W
Once you have fully tested your NXOpen API application, you should "sign" it
- Q d# i! T; [+ |6 N7 T5 Ybefore distributing it to your end users. Even if your end users also have0 ]' s. H' L, ?9 e
access to the Author license which is required to load and run an NXOpen
5 V5 ~ C4 n# W, g- g, `7 fapplication, signing it has its benefits.# y7 F1 O4 q+ z
& o7 b- `: t( n4 ^) n
- Your application will load faster because NX will immediately recognize
, ^5 R5 ?- ?3 w% T; w6 O* a _6 J( N. I that it has been signed.
% N( o) { T7 e: Q0 v- \ - The syslog (Help-> Log File) will not be cluttered with the output from$ N9 K( b* V8 D: ]
the multiple checks that NX will do to determine whether it can load+ a! T( B7 `4 j( D+ f
and run the program.
; E9 A5 f0 o% |3 [
# X4 x0 a8 {' L4 c4 u/ Q. O3 P1) C/C++, C# or VB only (Java: Proceed directly to step 3)
. W% h4 {: q, }4 b( i) |/ D5 p' H( W+ D. o
Add the NXSigningResource to your Visual Studio project7 Q9 ?( A) d3 @; c8 r. @
$ d# I$ T1 _4 h In the Solution Explorer, select the Resource Files folder and" [* \8 m) N: y2 T$ e* J$ D
<RMB>Add-> Existing Item
I; b! F8 F( \' A& k
6 Z8 |" e9 ?2 ]: M. { C/C++:
' n" W2 K& M& x" y2 @) q( { Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
- l; [2 D& V7 _ C# or VB .NET:2 W: x: `2 i& S2 K* D4 H
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
) @ E4 J$ }. H Select the newly added NXSigningResource.res and in set
" x B: c8 s3 R! k Properties-> Build Action = Embedded Resource/ b, H' i3 ]/ U( ~3 r7 @
4 Q& y9 i; j$ J$ G9 s
2) Make sure the build configuration is set to Release then5 V# z4 P) T& B6 H+ B5 a
Build-> Rebuild Solution
1 R n+ v7 T4 ~. f, A, U3 T
: u1 A# ^; h& B- K4 [- i5 O& T P3) Sign the executable from an NX Command Prompt window:
3 S. {) W+ @( a# O4 @ b You probably already have one open because you started the Visual
/ Q) i+ t# K( R) j# l& r* L Studio or Eclipse from it. Otherwise:+ ]7 l5 n# i, {' F8 @5 `
Start-> All Programs-> NX#-> NX Tools-> Command Prompt2 v9 c; I& [9 E# U3 P$ v0 J
0 ?" N1 W+ |2 {! Y Java:6 T5 T- w5 b% a+ S2 B
signJar <path to your>.jar
, {4 R8 u# \ m5 X; D5 B; R: E: ]- q1 V, u* b% t7 R2 H0 R: q
C/C++:
2 }# n8 @* `1 O NX8.5 and later:
" |) d" I j7 N signCpp <path to your>.dll or .exe
- d5 v$ [4 T P& j- ^' T s7 f NX8.0 and earlier:6 k6 c K( a. ^& E6 L! a# ~
nxSign <path to your>.dll or .exe
! a3 N7 V" t3 G+ x# }% p0 a! L
) E2 m9 b1 A A F3 {3 x C# or VB .NET:; L' A+ O& G W' l" R) J% ?; x. H& h8 B
NX8.5 and later:( n) J2 o9 w' Q' z2 {
signDotNet <path to your>.dll or .exe
, ~ n% I# R7 O3 o, W NX8.0 and earlier:
$ w$ t2 B* ?- @ signLibrary <path to your>.dll or .exe
; v+ P* }6 Q# g
' r" h8 ^! c5 H# Z' z2 l( j6 J! hNote: You do not need to use the path to the signing utilities because the3 \: R2 y6 ~5 [2 I9 a
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
! }8 A0 ^+ O e/ ~% M! ?; E1 lfolders.( Z1 i/ G3 W u5 X9 j4 R4 Y
9 k2 a L& m$ O- }3 M0 U0 ^4 U |
|