|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
3 r9 u$ b- F' d" W
4 X: w1 R9 ]4 Q1 P0 H/ t
" V" I1 F, @2 r7 I, m7 `# VOnce you have fully tested your NXOpen API application, you should "sign" it- S" A* R1 k4 Y1 t4 T0 t
before distributing it to your end users. Even if your end users also have
. Y. q/ z& H, V+ c' Faccess to the Author license which is required to load and run an NXOpen
4 ?# A( W4 J+ y2 f' j5 vapplication, signing it has its benefits.# }- s% X3 r; O* e
" V9 r) b, n* x8 U
- Your application will load faster because NX will immediately recognize0 r7 M; N, N% E; z
that it has been signed.
S: \& P, x; { - The syslog (Help-> Log File) will not be cluttered with the output from! s2 v$ M+ K2 s- B1 E9 c, ?& n" G) b4 W6 v
the multiple checks that NX will do to determine whether it can load' {. h! A% g- k/ ?9 l
and run the program.
( @! r' t9 o2 h
* m) g! t# T( T1 A1) C/C++, C# or VB only (Java: Proceed directly to step 3)" W/ l6 x! x- t
& i: H; R0 W4 d& L+ Z) D+ a
Add the NXSigningResource to your Visual Studio project& z5 {, P2 _+ _5 F" K
; F' c N2 }" V4 y: [: ^; {; d In the Solution Explorer, select the Resource Files folder and! D! u! j( O8 m/ Y2 w4 `* g
<RMB>Add-> Existing Item
8 K* m4 \- V! S' g* P. X: i+ o" t0 ~* p
C/C++:/ d% n8 V; z2 }* p# ~8 y. _
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
$ L: t5 R+ F0 f' J5 c: G0 B: J C# or VB .NET:
7 h/ P6 S2 _2 R2 Z% N2 |! A Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
) x z- k, ^- j' Z5 w3 e) Y Select the newly added NXSigningResource.res and in set
" A w" X& c8 T0 I* F Properties-> Build Action = Embedded Resource
$ S; Q$ j* t0 t# ]" e) J8 z7 v9 a/ r. J; ?
2) Make sure the build configuration is set to Release then o. H, N7 O8 M
Build-> Rebuild Solution' j4 b g/ W! P5 T& @
" ?4 g- [( V/ D+ k: c' Z% f3) Sign the executable from an NX Command Prompt window: p% U$ Q& C1 x* L4 y8 B; Q
You probably already have one open because you started the Visual
2 S' |- ~. F. V5 J: @: h' |4 s Studio or Eclipse from it. Otherwise:2 B, D# h/ N/ S* f" k8 U
Start-> All Programs-> NX#-> NX Tools-> Command Prompt/ f' e0 k* P! G9 ~7 F
# l& ] p# F& h9 Q" Q& R+ z Java:. {, {/ ?5 q: l f# C- z- K
signJar <path to your>.jar
. t- _3 ]% { q" I+ t* l4 b) D3 a1 W' ^- t( k5 F; |. R
C/C++:
9 c% J* @( j# b/ ^ NX8.5 and later:
5 C, o$ A$ g! c$ n7 F. Y# h( ~: r- E& l0 N signCpp <path to your>.dll or .exe
6 {2 B2 w1 Y( g NX8.0 and earlier:
1 n7 G) I& Z" {$ E# |# y5 N4 n' _ nxSign <path to your>.dll or .exe. Z# z. `* I! i; {- ?$ W1 s# ~
" ~3 B. R+ i. j6 o z. F
C# or VB .NET:5 m- @* Q. Q. u! D
NX8.5 and later:$ a% E5 n5 m4 O" _: O
signDotNet <path to your>.dll or .exe0 n3 Q g( n& i z
NX8.0 and earlier: T: o) u# M2 W
signLibrary <path to your>.dll or .exe
! @0 q: r9 n- U) T* B: W: I- {9 K" a+ r: h- J
Note: You do not need to use the path to the signing utilities because the
# d5 e1 B8 o' S i8 \4 `PATH of the NX Command Prompt shell already includes both the UGOpen and UGII% R0 j/ s' [. n$ T1 A4 X
folders.( K" y& X8 ?/ P
g. ~8 J. C6 M
|
|