|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
: H3 E& B' E5 @; E1 J
8 i. v, `+ I% }! V1 e: `- W
3 P- X# ?. W2 vOnce you have fully tested your NXOpen API application, you should "sign" it0 L- K8 ~' p$ ~# a- `7 {# `
before distributing it to your end users. Even if your end users also have
. } x0 Q+ g& @+ O A) jaccess to the Author license which is required to load and run an NXOpen }1 l: q; X, I1 C, b
application, signing it has its benefits.
8 z7 O0 i* p9 Y' W$ _' h
' {3 k9 |7 B2 N - Your application will load faster because NX will immediately recognize9 w2 t* T% V( ^8 W
that it has been signed.- J' D5 v9 M8 Z7 N
- The syslog (Help-> Log File) will not be cluttered with the output from& N# [ ?& Z6 B' k: ` f+ \
the multiple checks that NX will do to determine whether it can load
0 m$ U( i& I+ x! ^2 z7 I: Q1 _/ _% s+ J and run the program.5 N; L# k2 V+ F4 {0 x
6 z2 _9 c# o' k$ F6 W8 D7 i. R
1) C/C++, C# or VB only (Java: Proceed directly to step 3); l% q2 B5 c6 T
0 P" e( Q5 ]3 y8 r( x. \! D2 `
Add the NXSigningResource to your Visual Studio project" B- Y5 ~5 [; {) p
3 J7 _, I" E3 X: V4 h6 t$ C
In the Solution Explorer, select the Resource Files folder and
E$ v- _# s9 m. E% }2 T <RMB>Add-> Existing Item
/ E Y- t6 g. l. P3 b
" [$ }5 ?( e; P' c$ T/ k7 A C/C++:
/ |$ t$ }: ]" x7 P5 c Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
( }' C: d6 j, M C# or VB .NET:
' R- z# H. s5 `) q' }" X& v: l Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res3 g9 p b/ M' S1 E8 D6 v
Select the newly added NXSigningResource.res and in set+ N( E8 G8 k2 p& h" c! C
Properties-> Build Action = Embedded Resource$ h) H3 t' {2 l3 T F1 j0 h# r' R2 _
3 {4 {) y6 e7 T* f6 u, }. T, f2) Make sure the build configuration is set to Release then
6 ], _# Z9 w/ n Build-> Rebuild Solution
- x9 q+ z6 S1 V. S* |$ |4 k2 e: H3 v' n) ?0 `" H
3) Sign the executable from an NX Command Prompt window:1 N6 V4 U6 y0 a5 L% r/ h1 J
You probably already have one open because you started the Visual$ v. [* E+ M( A$ Y. P- v1 S, k
Studio or Eclipse from it. Otherwise:
6 d1 V( _9 T* F6 X" I% v- C Start-> All Programs-> NX#-> NX Tools-> Command Prompt# g8 @. u: o ~3 ~* a. N
7 H/ X; \( E, e7 v7 E! a Java:+ W" g% \; g$ i" a. }
signJar <path to your>.jar! c; _# a! _# \2 j
6 B5 W3 M. K. S4 L C/C++:+ M# R4 A- y, e, n0 R/ S( K0 Z
NX8.5 and later:# S# Q c+ ~; s! u6 z
signCpp <path to your>.dll or .exe4 l2 v" x% Z" @, Q8 ?! B1 `
NX8.0 and earlier:
7 q Z6 F% Z L0 h6 d nxSign <path to your>.dll or .exe) E7 ]' Q. W. Z
* u& t2 N; e* F P$ k6 z
C# or VB .NET:
' |# U5 x1 m( ~, v6 M# q NX8.5 and later:; R, W! ?. B2 F& w5 x( H0 C! _
signDotNet <path to your>.dll or .exe
t2 `$ X8 ~ @: ~+ T* } NX8.0 and earlier:
5 {5 A; M1 m* m) ]$ Y, P signLibrary <path to your>.dll or .exe
3 V8 T4 }+ F# L7 k+ v2 y1 J9 l x# u9 y2 M1 N; G1 V% z3 i
Note: You do not need to use the path to the signing utilities because the0 {7 d- ~7 @) \3 o
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII& ]7 p4 y& P \2 ?% V/ ^6 r
folders.2 O+ C4 l& v; v a& g; k: A# x
. d- |% e5 y% a& r/ r; i9 G |
|