|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 b- Z3 d8 b7 Z {! {
( u& a e5 R/ B+ y7 S0 s: H9 [$ f8 X* Y; N5 |
Once you have fully tested your NXOpen API application, you should "sign" it7 V: z4 p4 q) q! Z0 X3 a5 s( q- x
before distributing it to your end users. Even if your end users also have
* ]7 \0 O; a- p; f jaccess to the Author license which is required to load and run an NXOpen% K, L5 H9 B M6 ^$ z5 E
application, signing it has its benefits.
- O" R( d+ ?% I- ~0 t
! \! Q& R* |2 t! N4 J& H0 }! N. O - Your application will load faster because NX will immediately recognize! l% ]# ], c# N+ X) q/ L) A; r# A% c; `
that it has been signed.
/ u# `# J2 G6 O4 \* z) C- x( F5 M - The syslog (Help-> Log File) will not be cluttered with the output from9 b( M* v, X# h
the multiple checks that NX will do to determine whether it can load
0 i6 r4 _7 ^( ?7 d/ {9 h and run the program.
- \: o2 u2 ]" m$ ~
2 E# a' f D, D" C \4 c# Q1) C/C++, C# or VB only (Java: Proceed directly to step 3)
1 @1 \; O) ^: L
1 W# K+ X. c; l) w! c Add the NXSigningResource to your Visual Studio project- L0 \$ P, [( U1 ?$ w' N9 z
" }4 e( W6 e* C0 V In the Solution Explorer, select the Resource Files folder and1 q; w4 v5 `; q
<RMB>Add-> Existing Item
+ m1 g& i8 {/ j* }4 A* D, O
; o9 ^- k; s- X8 H' e C/C++:
0 M8 _/ u9 n4 k( b& ?2 b$ u5 y6 u) j Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
' c( A7 i* |& ^- | C# or VB .NET:
4 x/ I4 B Z1 x! I Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
( f4 c, Q5 g u7 F0 m Select the newly added NXSigningResource.res and in set
4 ^! C; x' c* [) _ Properties-> Build Action = Embedded Resource
4 ^6 |" |* X, S8 Q
1 ]; T d" }9 \' c- |1 t2) Make sure the build configuration is set to Release then- O% S& ]% [. ~( y% w
Build-> Rebuild Solution
: z8 Q, D2 `9 k* ~, Q! ?% b( M4 W. B1 O. N$ l
3) Sign the executable from an NX Command Prompt window:
5 N3 N! J) i8 E You probably already have one open because you started the Visual5 S; E3 ^6 m( G9 C
Studio or Eclipse from it. Otherwise:: B. ^3 D: n2 T$ X% H; z7 Y4 E) |
Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 l3 E; B3 _ G8 M8 |0 K3 `- t* U) j
0 C3 U$ b( N; p# h) r5 ?$ m
Java:. v7 I1 t* K+ k! J3 ]4 _* `) Z }
signJar <path to your>.jar; u7 q' H- x" ]% P# W
1 t* f. d0 b8 s3 s4 e ` C/C++:! Y0 V0 y. Z. R
NX8.5 and later: @; u; V% j/ }. E# c, b, R P
signCpp <path to your>.dll or .exe
1 J0 ?: `( G" r/ r9 T( \ NX8.0 and earlier:
+ e# ?# J* ^/ c- s7 s1 I nxSign <path to your>.dll or .exe. ?* ?9 X5 N( ~
. l4 c- u$ Q+ u- S
C# or VB .NET:: T3 ~9 J( J7 j7 M( e4 T- H
NX8.5 and later:* p6 P8 n6 E5 F+ t" u% l5 O0 n
signDotNet <path to your>.dll or .exe
+ A. m* H4 `; P0 U* a NX8.0 and earlier:
5 ]$ |5 n% i G, t0 _' m signLibrary <path to your>.dll or .exe. n6 u9 J6 q( O# Y& {; i! C
5 S: F, M3 \- A" v/ s8 zNote: You do not need to use the path to the signing utilities because the
% e: H4 I9 ~; l) I: C) t3 EPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
/ R0 \# d5 F7 xfolders.
* Y; f9 X3 b+ b/ p6 _
0 z1 r- P9 J0 m% Q/ \ |
|