|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
# N( S( |7 X* p: |/ e" V3 g' v% E1 o
1 k* ]9 R" v& Y% T, W7 EOnce you have fully tested your NXOpen API application, you should "sign" it
3 R) T4 e l& H5 E; hbefore distributing it to your end users. Even if your end users also have. R2 l& A) M( C5 r. o
access to the Author license which is required to load and run an NXOpen
a+ {& m0 a" Q z7 J* [$ Japplication, signing it has its benefits.
. `# \; O4 q4 W2 R! L
# l5 }6 T( P! ^: I7 E/ ~0 `: X - Your application will load faster because NX will immediately recognize
( A! W3 U0 S, D# ^ that it has been signed.
9 i8 O4 b% z: E( g - The syslog (Help-> Log File) will not be cluttered with the output from
9 `8 }4 G p6 D H the multiple checks that NX will do to determine whether it can load) }! E/ W1 d- B- Z3 g
and run the program.
, ]# p4 g, V; u0 H* u5 h
; k, D r/ w# g1) C/C++, C# or VB only (Java: Proceed directly to step 3)
T4 g' i% x# f# _/ R: ?- W- ^! v* @/ \% r
Add the NXSigningResource to your Visual Studio project
9 q% A0 T; T5 t" [8 X) s" M. z) D3 d
In the Solution Explorer, select the Resource Files folder and& W6 m% W- R# R
<RMB>Add-> Existing Item+ k+ R" E6 R& W3 k h0 I; H
% z: V ]" K( W
C/C++:: G8 b/ Y+ e* i% T/ p# k: }: d. z
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp0 _1 z: m+ |' u8 {4 V. h
C# or VB .NET:, k) ?& R: n }5 P, f( [/ \+ S& S
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
' i& o7 D8 n! H8 C& U Select the newly added NXSigningResource.res and in set
5 ^- o& O5 @0 D* y4 M$ d3 ? n Properties-> Build Action = Embedded Resource# @' Y( z/ O6 l
5 c7 u* d( g. o' I( {0 `* Q
2) Make sure the build configuration is set to Release then% M% }; C6 ~0 ?! \
Build-> Rebuild Solution
% N- l6 q8 [. R1 H3 u: q0 a* [ S7 K+ k3 H
3) Sign the executable from an NX Command Prompt window:- |, I, k5 u$ c x$ m R
You probably already have one open because you started the Visual; ?! S9 X/ p1 P* H8 y( [
Studio or Eclipse from it. Otherwise:
* P# j) H& W* F6 T8 V Start-> All Programs-> NX#-> NX Tools-> Command Prompt
+ H( }- H8 h; t) O: S8 ^* s+ K3 Y6 |% n$ r$ O, I. R
Java:
# I9 ^' L- `" A' y0 O# l) g signJar <path to your>.jar; P$ C% A S- D4 Y
" J. K2 @: u) L1 N C/C++:
* f/ \0 b/ m0 R1 W- O NX8.5 and later:
/ I7 V `9 ?. I+ w& ^: t0 x, | signCpp <path to your>.dll or .exe
4 c9 ^- y% k0 w8 w3 F; r2 \- O; k9 N NX8.0 and earlier:8 a3 ?9 e: n5 o& {/ x
nxSign <path to your>.dll or .exe
9 J" U1 s5 B# n/ B* W
) X) ~, V, ~) q C# or VB .NET:
2 g4 [/ D- |: O! M" f3 e8 i NX8.5 and later:. R: n5 I/ G6 o. P
signDotNet <path to your>.dll or .exe5 Y6 p7 K5 l: ?4 D$ E; `$ f
NX8.0 and earlier:, g5 Z2 b& Q0 w( i- }
signLibrary <path to your>.dll or .exe: E9 t: G+ Y0 X5 j) k1 R% i& D- n1 W
' L5 D4 Z. Z9 b( m
Note: You do not need to use the path to the signing utilities because the
8 X8 P# U/ K) k! T- ~/ u' U) ]PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
/ O" d }9 ]; C$ w$ a/ G4 M Pfolders.
4 b/ `, m' }; C+ c4 |* S3 _5 m7 Q& ]0 x* h* F# H& G
|
|