|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
e# b- k' E+ L1 w' D0 K. o+ l+ x
6 h; X: k' o6 G0 `; H/ A
5 r7 U1 X2 n( j6 f% E, WOnce you have fully tested your NXOpen API application, you should "sign" it
2 L! y5 u0 M$ \2 s& T7 Bbefore distributing it to your end users. Even if your end users also have& a) D$ _5 a! V% U% h% v
access to the Author license which is required to load and run an NXOpen- H0 I, W. _0 a4 i5 P2 E4 P
application, signing it has its benefits.0 F5 A: X$ q; U5 u
# a7 b/ X- ^8 |; Q' Y - Your application will load faster because NX will immediately recognize9 b8 [6 d8 T1 P$ i
that it has been signed.
2 V- ?4 }9 C5 P! Y- o" ^ - The syslog (Help-> Log File) will not be cluttered with the output from
9 J9 a2 s% A1 r$ ]) e: N8 j the multiple checks that NX will do to determine whether it can load0 m l6 @9 X! Q, ]* j% g" x# T
and run the program.
' L" n4 D( m0 S8 }0 k3 H- X9 \/ Q9 V$ k1 q& X! k' w+ ~! j
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
/ X$ d' a; O1 p7 @3 f; q/ `4 e# \# `
Add the NXSigningResource to your Visual Studio project U+ Q& b! s8 \. n* C
2 [* d8 t) S& n
In the Solution Explorer, select the Resource Files folder and" X: E5 F- V- p) K5 {
<RMB>Add-> Existing Item7 z. N9 i2 A, \
, y9 @/ u) h5 Z* H/ E- X" V+ o
C/C++:
' b6 d2 t0 Y; a* L7 \ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
3 S" q1 [4 y. \0 T0 @ C# or VB .NET:
3 S5 C2 D6 c' u, p! y9 i Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res2 K2 U3 Z' e/ E5 @0 m( e
Select the newly added NXSigningResource.res and in set
: q: ~9 @7 R: G+ j8 T Properties-> Build Action = Embedded Resource
' z1 D) C( m/ c) ^# ^. |% r4 `+ w' l5 f
2) Make sure the build configuration is set to Release then
" e5 b! u, V3 o0 `. n1 i Build-> Rebuild Solution* f7 r, C0 M. d# e- X9 w
8 {/ m' @$ ~, C1 k9 B4 G
3) Sign the executable from an NX Command Prompt window:
8 N; w& z- i& C I6 O: [, ` You probably already have one open because you started the Visual
7 w+ o1 E4 n) G* m- } Studio or Eclipse from it. Otherwise:
8 H% B7 g9 B- U( C4 [ Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 Z9 i) h6 {; u
/ Y: x& \7 ?. q) ?; L" u Java:
, y* d6 m5 ~/ Y$ ?% e* r0 u S signJar <path to your>.jar
1 F% }4 t* _' A) |3 k* x- j
# Q& x( A0 a! z, v, ? C/C++:
2 `# k# P3 W2 S& q, D NX8.5 and later:- {* L; y4 F) c+ M! S
signCpp <path to your>.dll or .exe$ B+ W, ?1 Q+ P3 A
NX8.0 and earlier:
! h s3 n3 z5 R, Z nxSign <path to your>.dll or .exe
1 r: o$ l' [3 T0 o/ p: R' X6 U0 U3 _, d4 K' A) p
C# or VB .NET:
1 ^5 B2 V6 n4 m/ m7 H/ i NX8.5 and later:
6 Z4 d- H1 ~) S* k: M) \+ ~ signDotNet <path to your>.dll or .exe
- r- q3 R* ^) O) ~$ I T NX8.0 and earlier:/ R p/ E7 a. j$ y
signLibrary <path to your>.dll or .exe1 q& W5 q9 j Y2 G' a
0 G7 w: M i4 s$ W0 ?! y, R6 PNote: You do not need to use the path to the signing utilities because the, O @" j" g: c2 p: W
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII- d+ l$ j" t' @3 y
folders.
! i" Z0 y) c8 o& o$ X! U, u
& g6 d% g) Y2 b# c' W v a+ Z |
|