|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
6 L' U c* s2 M% I# U( |) Q/ C* h" f% @! ^: _
- {8 D/ i& C) N* i% VOnce you have fully tested your NXOpen API application, you should "sign" it9 h B$ ~3 E$ \$ C5 ?
before distributing it to your end users. Even if your end users also have q% e8 h1 [. K. c) o4 }
access to the Author license which is required to load and run an NXOpen
" W. T& ?* c4 e' o+ Japplication, signing it has its benefits.9 J9 a0 [- \) q1 ]' Z
6 _: E, ?, M0 j" N7 E
- Your application will load faster because NX will immediately recognize" e( k5 q3 F* P/ L* ~& g
that it has been signed.
/ m6 G$ i7 `& N0 a- T6 o; A, G - The syslog (Help-> Log File) will not be cluttered with the output from. R: h, p/ A; \- M$ m9 b( F
the multiple checks that NX will do to determine whether it can load% G8 [3 C' A- F! y( m+ f4 I0 ]
and run the program.
1 a9 a/ Q- |- _' c1 T
$ ?+ F" ~' j+ @% p6 I& [* a1) C/C++, C# or VB only (Java: Proceed directly to step 3)6 V5 h; I( @0 W2 M% v) h
/ Z. n- {: g8 U8 C- \: w
Add the NXSigningResource to your Visual Studio project
1 f& h/ P6 P* X% _+ U$ B6 D6 s1 J& f2 w. m
In the Solution Explorer, select the Resource Files folder and
8 Z7 x) \0 M% W; @- _: j6 m <RMB>Add-> Existing Item
/ }% H/ G- L* j1 D1 u
* q8 j, T6 ~% O5 J, t C/C++:
. }. V" r- m) p/ R4 a4 y) Q$ \ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp. b& [8 \' J1 ?
C# or VB .NET:7 E( F: z4 b/ ~# i! K7 w
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res9 h N. o$ u, a8 {
Select the newly added NXSigningResource.res and in set
: l* q/ j( d1 o9 ] Properties-> Build Action = Embedded Resource% @+ D+ h2 \7 N2 J4 N/ l C3 v
2 U7 s; H4 I% G
2) Make sure the build configuration is set to Release then
9 R) I3 ]( c* l" Q: N2 H% K4 x) m- L Build-> Rebuild Solution; n$ l" V6 T i8 u0 R/ J. w
9 W; M3 W: U8 C! D
3) Sign the executable from an NX Command Prompt window:
9 P! p% ?/ N% O: A0 w- D& q$ w You probably already have one open because you started the Visual0 m. |( p8 k0 P( q* B
Studio or Eclipse from it. Otherwise:+ n2 H5 x1 K; q) n- R
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
2 a# \: U4 n) L% y8 n% R9 Q
* i( C" ?% u: v2 d k/ _* \ Java:
: D: `: }9 z6 X7 D. V signJar <path to your>.jar, c( e' p% \9 a! H" b3 X
7 c( g5 l5 f2 Z# } C/C++:
$ c9 x0 L+ C8 a% l NX8.5 and later:, u- \( X% r N+ u0 x
signCpp <path to your>.dll or .exe
% B9 r( N4 S. L- K3 X* u) @ NX8.0 and earlier:
8 e Y9 n& `6 B( M8 W' J# [4 z nxSign <path to your>.dll or .exe/ J- l6 K5 ~2 X' {+ T- f% m3 A
* F# t0 y7 U' R. p2 t) L5 w9 i C# or VB .NET:
5 ~) t8 |8 u7 j- O# ^! z' n, p NX8.5 and later:
9 X X9 c8 D* M2 {8 ? signDotNet <path to your>.dll or .exe- v5 B$ U0 ~; ^- _' |5 A8 N; ?0 c. d
NX8.0 and earlier:
; ]& I5 N7 w( q6 ~4 l signLibrary <path to your>.dll or .exe9 z" t2 ~1 Q( ?( e3 v( ~
8 C: b/ Z2 m# D% UNote: You do not need to use the path to the signing utilities because the ^% c7 P9 s. ]; r) Z3 }3 z1 _
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
( V4 e' L7 h0 }/ a2 ^$ n2 Kfolders.
8 R% p( N' Y9 D. J7 y& F4 c
) D! o2 Q9 u8 c+ l |
|