|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
7 s) x/ ?+ h$ @0 R
2 X1 d, D0 y8 s& o
# p S! C5 _( z/ d) b' H
Once you have fully tested your NXOpen API application, you should "sign" it1 l2 @: `$ i) k( J
before distributing it to your end users. Even if your end users also have/ @7 k* M& `* R. i+ G
access to the Author license which is required to load and run an NXOpen& \7 ~) a8 R& v+ t. ^( V
application, signing it has its benefits.7 M5 [2 E7 B! J1 x" W9 S! o* H
& J5 c+ a: T- ^9 C - Your application will load faster because NX will immediately recognize. @" T; h+ D! F( j& j7 y& ^
that it has been signed.4 y x) M; B" O! T% `4 A1 B
- The syslog (Help-> Log File) will not be cluttered with the output from+ G/ I$ j* b1 B2 ~3 a- w
the multiple checks that NX will do to determine whether it can load! r/ Q9 y. X8 w2 A& a+ G" |
and run the program.8 g* x. p$ I, w
, {# V5 k% M$ b! G( E9 i; ?1) C/C++, C# or VB only (Java: Proceed directly to step 3)
; i* w, D9 g4 D; w* I: }. e# D
. H$ f" q @4 `8 K Add the NXSigningResource to your Visual Studio project: Q% \4 C9 D# U8 }- A
0 z% P' |0 n U8 X* a" a& `/ \( F
In the Solution Explorer, select the Resource Files folder and
! ^# {6 X( L( a7 ]# J# u <RMB>Add-> Existing Item
5 j/ U! p& F" @# t( \6 n; D' g# m0 z( g, |
C/C++:" z6 \0 O8 m: Q; g( W
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp* h' T, o' A! `+ i: o
C# or VB .NET:
1 }! O& a3 {8 ~ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res6 J' H0 u0 }! l, j, T: X3 S
Select the newly added NXSigningResource.res and in set5 ]; c4 w7 x X6 K% z/ d$ d3 H
Properties-> Build Action = Embedded Resource2 A {7 O+ C$ d/ Z
9 @" f7 J {" K: r% p+ A! X/ T
2) Make sure the build configuration is set to Release then
: _; s2 }/ C7 j$ F8 ] Build-> Rebuild Solution
3 F! ~% o( R( m& P; I0 {& ]6 Q! i' v8 P+ N: \% [( a ^
3) Sign the executable from an NX Command Prompt window:+ o( G6 Q. s4 y# |5 ^
You probably already have one open because you started the Visual
: M$ @' L: S) F/ x1 D Studio or Eclipse from it. Otherwise:
& k% m, F/ O1 {* s# ?" X2 G. n Start-> All Programs-> NX#-> NX Tools-> Command Prompt
" R1 L4 ^+ C! n/ Z" @1 L/ w4 d
Java:8 S' _% p1 r# d, S' b0 h
signJar <path to your>.jar
' F4 l% Q2 X# [8 O* }$ R) r$ ?% v# X$ { G7 @& l6 S/ e4 m
C/C++:
9 g3 x2 y' k- m4 O E$ L NX8.5 and later:/ k( r* w$ Y8 x, R2 y
signCpp <path to your>.dll or .exe
0 w- T. d5 p o NX8.0 and earlier:
" z2 K) _: B- x nxSign <path to your>.dll or .exe
, r# D5 j- Z3 v! J: }, p$ H
- |% c; Z9 q d' s9 k C# or VB .NET:
/ }$ o( O3 C. n NX8.5 and later:5 j. u( r% k5 |% |. q6 S& v
signDotNet <path to your>.dll or .exe
' b+ s+ v, v4 y2 I6 p7 n$ h' r( y; A NX8.0 and earlier:
" k% x0 s1 J; [: O3 y: e/ q P signLibrary <path to your>.dll or .exe
2 K) S; x0 k9 Z9 U' m% w/ S2 x. \/ {6 @- g# m- ]
Note: You do not need to use the path to the signing utilities because the
7 y. s! B: g* F7 Q2 NPATH of the NX Command Prompt shell already includes both the UGOpen and UGII% G9 n+ c! t5 a6 B0 F
folders.
, z; V) S% V8 ]) _
# a6 z! J, ?) m! {3 b( ? |
|