|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
\) p! |* H) A9 a, W3 n
! q$ Z2 }& N4 O( h5 P/ ^# x
' _& l' n- S# _( H, G6 \1 x
Once you have fully tested your NXOpen API application, you should "sign" it
4 v, W9 H. }: G6 `3 Z1 ~' `4 }before distributing it to your end users. Even if your end users also have" n- o1 N9 K( i* }! q* C+ o+ R
access to the Author license which is required to load and run an NXOpen& i) y4 T. `/ a. W" A1 m
application, signing it has its benefits.
6 Y7 E' G2 L- y0 Q' `! b1 w5 @2 a x& J1 O
- Your application will load faster because NX will immediately recognize" H5 y' R/ r0 T6 I7 |
that it has been signed.; k" r* Z3 D3 {$ N# E, m! ]7 t9 f' E4 K
- The syslog (Help-> Log File) will not be cluttered with the output from
/ B0 @+ M0 X. \; z! P the multiple checks that NX will do to determine whether it can load, B/ c! q5 W+ F5 X ]5 M
and run the program.
" x' ]7 M0 Z8 y6 v4 K! Z6 o7 f, H; Z8 ^: d5 K$ T
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
0 r" A- f8 k2 f& ^2 l* ~
' B- Q1 S* x& ?( N% S9 W4 f Add the NXSigningResource to your Visual Studio project
( D" F8 S2 ~, B% Q @3 J3 K2 ]4 H
N7 r) m4 v' g, u) }% ] In the Solution Explorer, select the Resource Files folder and
0 ]! i" X9 x! R- \ <RMB>Add-> Existing Item6 L4 g% Q; [9 g# k' \7 I0 d
4 ]2 D8 e0 j% j6 u& ~0 j. {/ K. Q
C/C++:7 g! r8 Q j* E! g8 }2 U
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp& A. }* z- k( H% s7 _6 C( k
C# or VB .NET:
9 F! c0 a6 k, x% J Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
* ?: l8 h% Q) V Select the newly added NXSigningResource.res and in set4 h! Z% V/ z2 W0 c9 U1 v6 r
Properties-> Build Action = Embedded Resource* _ Y1 S8 ` {( Y+ @
( M0 B5 k3 P. O; x$ T. c5 A2) Make sure the build configuration is set to Release then
& @* C5 q/ e; _7 Y4 m Build-> Rebuild Solution
1 X' {: ~# K/ T0 f- v) `; [- ^8 A. \% Q; S; |
3) Sign the executable from an NX Command Prompt window:8 K6 ?9 ]0 Q @( z' y$ V
You probably already have one open because you started the Visual4 I3 w, w. K* O1 ~+ N/ N8 z
Studio or Eclipse from it. Otherwise:
- j4 w: D% ^4 ] Start-> All Programs-> NX#-> NX Tools-> Command Prompt) m, A5 t4 B$ ^' ]; o
) ]" j% W# b2 d* A0 t Java:* j n# S$ U# E! G4 O
signJar <path to your>.jar
: a: g j# `- \# ^1 C% V% H" w* L6 a* ^! N d4 q" e7 w
C/C++:
& q4 f* a6 T) z2 T NX8.5 and later:
3 E; b1 @4 \4 p! K+ Y signCpp <path to your>.dll or .exe
- ?' k! ]+ G7 K2 w* m) k& S* j$ k' R NX8.0 and earlier:# |3 z9 D* @. f$ x z7 P0 k3 x
nxSign <path to your>.dll or .exe
: B e f# z8 Z$ r! }3 S8 |
% _+ {0 |, t' X C# or VB .NET:* ]6 Q# F' A" p% ]% Z
NX8.5 and later: Q8 g: Q# a7 X: z
signDotNet <path to your>.dll or .exe
- @/ Z7 C; p' W* d( @: a9 b NX8.0 and earlier:5 }3 V6 O6 w C0 b8 Y
signLibrary <path to your>.dll or .exe
& Z. D+ |3 J- y3 D, }# b& R' F6 k
t$ w# Z9 B( A* M( ~8 JNote: You do not need to use the path to the signing utilities because the
# J+ ^, n. ~2 m7 X0 FPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
0 i- }, d0 G# i. ofolders.
0 G: T0 X, x! V$ r9 f+ h
8 {9 A- a D7 ^) o. v/ ` |
|