|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
' h" C2 B: c1 X5 k# T6 I! N2 {
8 ]) `& X% ~/ M* \' y0 S
. J8 V- C( i4 S/ T7 F- b5 u2 }- {Once you have fully tested your NXOpen API application, you should "sign" it
' U, ~ s4 z- V! b Bbefore distributing it to your end users. Even if your end users also have
: y4 X: c) Q$ K: Taccess to the Author license which is required to load and run an NXOpen% T" W1 }0 w) K* |; I \
application, signing it has its benefits.0 X) D3 c+ ^0 [, f! q0 W% z
" D3 v* o/ ~" N# C
- Your application will load faster because NX will immediately recognize
# p, h5 d: v" K- r- r that it has been signed.7 _ H3 B$ V, D% I) M
- The syslog (Help-> Log File) will not be cluttered with the output from, e, q& A* d" O1 E% v
the multiple checks that NX will do to determine whether it can load
' a/ h$ x3 W" S( i$ |0 F and run the program.
7 O! E. \! q/ ~8 V: `* l' ?4 D9 N. {" i, K" T% [: s
1) C/C++, C# or VB only (Java: Proceed directly to step 3)! k T8 w0 P/ z! ~ Y
3 h k" o' }% @; u9 Y
Add the NXSigningResource to your Visual Studio project
8 w0 s( G- U4 V% m) W+ l X4 R4 O) G d3 g, l1 e
In the Solution Explorer, select the Resource Files folder and
+ o) `) Z# P, O0 U2 U( G" N <RMB>Add-> Existing Item
, f/ @" \- J- x7 R6 _+ @( R( a9 U* |! ~* @
C/C++:
: m) v# z1 F# G0 K Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp% q' Z* b$ R3 j6 Q8 Q6 w: u! ]
C# or VB .NET:
8 P$ ?9 U, }4 q. e6 q: ] Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res7 V$ ^" K7 b. l1 p2 r6 s
Select the newly added NXSigningResource.res and in set% i$ Q0 V* {- P+ w X" l
Properties-> Build Action = Embedded Resource
- [9 d% z( b' A2 x8 I
4 A) y: p/ t4 t/ v2) Make sure the build configuration is set to Release then
% E& F8 g4 |- o3 n" u9 e7 ~5 N Build-> Rebuild Solution
$ h, @, y/ F; j4 f/ ~6 Q9 L
( m. w7 J6 O( @2 Q3) Sign the executable from an NX Command Prompt window:
6 u+ h2 N: p3 i( F f1 X You probably already have one open because you started the Visual
9 G" H8 R: ` K" I; J0 z3 @ Studio or Eclipse from it. Otherwise:% A6 ?! k T/ \8 D% ?0 M1 D0 M
Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 g) {. q& r: w- i: ?& ?/ B
, I, D8 u. k$ Y# E9 m7 [
Java:
/ N+ V& q( n5 X signJar <path to your>.jar! i' u- f: O G* }* ~) R. f
% Y. e2 R$ E8 w- m2 ~) M2 C
C/C++:
( H, F) n; b( p8 T3 H5 }$ p NX8.5 and later:
; M8 u* o' w1 {/ i+ a. d ]( D signCpp <path to your>.dll or .exe- v# ^4 o5 ~. K
NX8.0 and earlier:
( X+ q8 d3 B" Z2 T: L nxSign <path to your>.dll or .exe
4 V) p9 n9 U9 ^3 j# o! g0 m S+ t$ e6 e4 i
C# or VB .NET:
9 ], Y. [6 y m* W3 V NX8.5 and later:8 [9 {: X- F8 j" p" h' g" N4 [" S
signDotNet <path to your>.dll or .exe2 @# F' c% p1 A. Q1 \/ y
NX8.0 and earlier:
0 Q$ g r ?( s6 v; z8 e7 k. r+ k signLibrary <path to your>.dll or .exe6 L; o- k' i' h9 B2 E% P+ O
8 \- Y) u' f# G7 k8 c2 h
Note: You do not need to use the path to the signing utilities because the
' V/ T. k/ B* p, RPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
* Q2 Q- S3 n. Yfolders.
; e, s4 E$ n# |1 P5 L0 T- i1 k' ]2 o; n
|
|