|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
$ l) ?9 s; m4 i2 K( x
# t0 L3 c" i* C4 U- ^
+ q& s% I; q7 |$ o0 j, ?Once you have fully tested your NXOpen API application, you should "sign" it0 A- X; x2 W! O
before distributing it to your end users. Even if your end users also have( w) Y& }' [( T# Y4 j8 X( O( A" `- I; {- w
access to the Author license which is required to load and run an NXOpen+ a3 U C/ |0 t. B+ x% d6 t
application, signing it has its benefits.
/ k+ y* K9 |- Q/ Y/ o# a' r
7 P1 d. z8 y1 d3 W - Your application will load faster because NX will immediately recognize
, A \3 B9 t* a: q0 q1 y0 v: q9 y1 d that it has been signed." F" S/ v6 F. x! u
- The syslog (Help-> Log File) will not be cluttered with the output from% @8 ^ I# `! w3 |2 _/ v
the multiple checks that NX will do to determine whether it can load; N1 N9 g6 n! B+ V
and run the program.' l& N9 [* _# l
) `( T; m$ Z0 G1) C/C++, C# or VB only (Java: Proceed directly to step 3)
. L$ W; Q# Y3 A) _! C( G1 z! x: S5 A6 e6 X4 H% p: n& @
Add the NXSigningResource to your Visual Studio project6 o8 s% c8 k0 P: F9 A( H# t
! P: B `3 S8 e& z( K! J S* D
In the Solution Explorer, select the Resource Files folder and% S# K' }& G. N2 z+ P* N
<RMB>Add-> Existing Item# H! k, u3 r8 S% Y
+ l& d# Q! t6 D! V( H4 Z f C/C++:8 q) e" H; M) r' @' Y% v6 g
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
: p; i* S0 ~( z& b C# or VB .NET:
* B. K; |( O. C0 I N Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res5 \! A( F8 F3 U( w9 O' P, y& ]
Select the newly added NXSigningResource.res and in set7 V: V0 t& T( W& p
Properties-> Build Action = Embedded Resource' d: U. a4 [9 Y. M* M
2 K7 E2 d- n$ K+ S! I, @" W R2) Make sure the build configuration is set to Release then: l5 ?( x2 C+ A' D" N0 p/ L
Build-> Rebuild Solution! Z# f4 B: ?# z* Q' f
|6 K1 X( g1 ~ Q3) Sign the executable from an NX Command Prompt window:9 ~% ~0 L$ U u
You probably already have one open because you started the Visual+ C8 H5 a7 r3 C/ P" _9 C: n) B
Studio or Eclipse from it. Otherwise:- q# F$ _0 f* z& P( S1 F7 t0 o
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
, u( j; t, Q- |/ C5 K6 G
8 d6 g8 W4 R3 \5 d0 i Java:
+ J* F8 x5 U5 |. M& |3 r$ ^ signJar <path to your>.jar# d: z/ `' C9 c# q0 x
% Y( y b5 S( G C C/C++:5 L, I, S& N$ A% V1 ?6 V# b& m
NX8.5 and later:, P" f9 I7 Z6 h( O% y0 i! ]5 p/ O \
signCpp <path to your>.dll or .exe. H) K8 M$ A" P. ]. ~7 k/ b* q
NX8.0 and earlier:9 R1 k) n1 E: ]) }3 ^
nxSign <path to your>.dll or .exe# g r$ C( d7 i( f9 G! P
2 m& x( Z n% q- B* f: L/ c C# or VB .NET:
4 a1 [( R \! }/ |# H# w9 j( O8 Q NX8.5 and later:( e& I8 Z. t+ ]* _# s! g6 L
signDotNet <path to your>.dll or .exe+ Y+ D1 g" G; S( z9 v. j
NX8.0 and earlier:- Z0 e' i& s) ~* R; |
signLibrary <path to your>.dll or .exe6 B {. Q; c$ ]+ J2 @' Q- K
! a- |2 P! D9 ?; S& kNote: You do not need to use the path to the signing utilities because the
: j2 I9 ?) G1 P' F* r0 aPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
, B3 ^- y" r3 |& z( L: zfolders.
3 @/ m7 v- p3 k1 [- }
6 A, d& k* X2 _2 \$ F' `' J% H |
|