|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, C- |) Z7 ?$ Q' m
! `2 ?) n" C" d% g1 M/ k3 }
b4 q( j: D. i( e% T" zOnce you have fully tested your NXOpen API application, you should "sign" it
/ y$ }, l) ~7 A+ Z& l/ `before distributing it to your end users. Even if your end users also have
. S) F W' D1 \3 Aaccess to the Author license which is required to load and run an NXOpen
$ t% @/ L6 Y& d1 i2 Fapplication, signing it has its benefits.3 }9 K+ H+ k0 J* F1 q
( `: Z: T( B3 Z( U0 N - Your application will load faster because NX will immediately recognize
5 R7 Z6 ]7 C$ w3 m# r9 ~' P( P that it has been signed.6 ?, ?5 {: @/ C" p
- The syslog (Help-> Log File) will not be cluttered with the output from
' t7 f2 [8 [# ^3 I the multiple checks that NX will do to determine whether it can load3 Y w' O0 X( L- }5 G) U3 X
and run the program.$ f: [" [# b0 X. ?* l4 U6 l: k
9 { t! h- L: }+ g
1) C/C++, C# or VB only (Java: Proceed directly to step 3)5 Y1 G- G* c6 ^1 b+ c2 {2 K" `
5 b- P8 m- A; ]4 z" D5 A Add the NXSigningResource to your Visual Studio project
|+ [4 G) @ r- [
$ y! f4 A2 u- A: Q" ~ In the Solution Explorer, select the Resource Files folder and& O: ], J% N1 v! }
<RMB>Add-> Existing Item
1 l( U U+ ~. L W& T% D
1 Y# L) C. B/ e; b9 c$ {/ y C/C++:( z C \/ y, f" O$ x e
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp! R. i6 h6 a! q3 x/ b) r
C# or VB .NET:
5 s$ s; ]& d* T Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
C6 S# B( L$ k2 r8 |: B* ? Select the newly added NXSigningResource.res and in set, f5 j+ e% f; f# x# P/ U
Properties-> Build Action = Embedded Resource
2 b9 `; d0 |9 N, d, d/ H1 ^1 n
" b, O& [% v/ b+ _/ P/ C8 Q2) Make sure the build configuration is set to Release then. K3 R1 P6 x6 h0 j% E
Build-> Rebuild Solution
* D( |4 f6 D2 |7 p& \+ t" _5 K9 ]3 y4 l/ G% X2 E7 W. Z5 i8 ~
3) Sign the executable from an NX Command Prompt window:
& U$ X: n* y& y, Z1 ?) [, A You probably already have one open because you started the Visual/ k4 [" D" q& F; [( ^/ o' _) s
Studio or Eclipse from it. Otherwise:
4 ^; v) x U- d/ i S. P& C Start-> All Programs-> NX#-> NX Tools-> Command Prompt7 E! |! Q( n: E' _
, P! A3 n6 Q' o2 y: ^6 { Java:" U) V! ~2 Y8 _' h A- c
signJar <path to your>.jar' X/ I9 ~' c" H
4 Z) ?( P6 ] a( ~
C/C++:! B: K2 ~! v* g# Y
NX8.5 and later:: V+ W" D" G9 F" i$ j7 ?( l
signCpp <path to your>.dll or .exe
m$ \- a5 t3 Y6 I2 b, T8 J8 z NX8.0 and earlier:( w4 `* e) Q1 N+ z; x- y3 ?: q
nxSign <path to your>.dll or .exe
4 _, g7 o( R! y7 w9 c
0 g( p0 ?$ a; i2 ~2 R+ I C# or VB .NET:
9 }- N2 D; b# f. S" \! F NX8.5 and later:
- B+ n0 Y" Z9 @% h7 @4 G9 E signDotNet <path to your>.dll or .exe
$ u) m) [9 y7 t6 z NX8.0 and earlier:5 Q. Q3 r, k9 e( q
signLibrary <path to your>.dll or .exe% R. J. H8 r. ?& J0 E5 F% a/ R5 l4 D
% G2 }4 q! D! ?
Note: You do not need to use the path to the signing utilities because the; S5 n$ {& _* g$ F7 Y
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
6 t% [! l7 y6 B0 X+ i% hfolders.
$ c$ K. L( ?8 r6 T! u+ z
6 A8 d' X# `! x! u' a6 o( c$ | |
|