|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 e, [+ g0 V1 J4 `) _- _+ `4 M0 l# U. @9 c# k
" z+ j# |3 h/ ]; k
Once you have fully tested your NXOpen API application, you should "sign" it
! ~5 S1 |' |3 u. S2 c9 u2 L C+ Nbefore distributing it to your end users. Even if your end users also have
+ b, `% ~3 e8 o: n! G5 q5 {7 \access to the Author license which is required to load and run an NXOpen5 }4 @5 D2 w( D
application, signing it has its benefits.0 s$ W& \$ F+ ]) `2 u, N
7 I9 K( J4 o3 c$ j - Your application will load faster because NX will immediately recognize/ b" e% ]/ m$ F0 G9 k |
that it has been signed.
4 |8 O. t. k2 d2 N0 P - The syslog (Help-> Log File) will not be cluttered with the output from, Z/ Z. L" \( J( v+ [
the multiple checks that NX will do to determine whether it can load
( b3 `/ T" F' e/ D1 [" s# A; k and run the program., |* \) u2 d1 j- A1 f. J3 _7 o/ Z
: W. E% v/ g0 F
1) C/C++, C# or VB only (Java: Proceed directly to step 3)9 M: k: z9 e" K: K- ^
" _. G& G( h% D! h2 G" J
Add the NXSigningResource to your Visual Studio project5 Q5 _4 ^6 { G' K
6 V% N& h, ^/ b& _& p0 @
In the Solution Explorer, select the Resource Files folder and$ r- p0 v6 o7 n1 \; E
<RMB>Add-> Existing Item& |, e- U- d2 I3 M
+ w0 u0 t( u* ~+ c+ Y
C/C++:
' T k% I9 w" k; }( o( K$ b. t) S Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp4 G( I* H& F* Z; g
C# or VB .NET:& |+ c: I! x" e/ @) o1 t/ K* C
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res5 G: V- A) |6 ]' @7 W8 k/ U, \( M
Select the newly added NXSigningResource.res and in set& R& N; U9 K6 s4 w/ N! R
Properties-> Build Action = Embedded Resource
+ Y4 B- H6 R. p7 X3 f% f' I
# R# p6 e$ d0 E q2) Make sure the build configuration is set to Release then
; D. t6 d& K2 h O Build-> Rebuild Solution- y$ r U' _% Z' B1 I6 X2 }
/ j. `( G8 P8 x5 r2 P3) Sign the executable from an NX Command Prompt window:/ X) V5 o, K$ _7 N" W2 O; @% I
You probably already have one open because you started the Visual Y7 n. ^+ L& H6 p& Q
Studio or Eclipse from it. Otherwise:
8 k" p7 i! E& J: r Start-> All Programs-> NX#-> NX Tools-> Command Prompt; e! b9 o# [( g% `9 @$ i3 ~
/ l+ d3 Z# H6 ~8 T& n
Java:
% {8 V( _/ [/ q6 K! t signJar <path to your>.jar- L% n0 r; `) _8 ~! c \: `8 M3 d
# Y) q8 L! \/ m- ?9 t6 S
C/C++:
2 g( ~* Z# _( f2 u" h9 R( C NX8.5 and later:1 H5 j- S/ z. k' a- i
signCpp <path to your>.dll or .exe
/ O; s( F+ R* g! N" G! G* P0 p NX8.0 and earlier:3 P/ b* c7 F9 ?
nxSign <path to your>.dll or .exe/ V9 y C# p: q; o
6 ^0 r3 d a7 ~2 A7 W! U) S
C# or VB .NET:
: I* t# t2 F+ ? NX8.5 and later:2 n9 w$ w1 ]$ V5 U; e
signDotNet <path to your>.dll or .exe
4 R% S- E4 E( x! w NX8.0 and earlier:( r- K$ |2 O6 H3 z/ E9 B$ j( L$ V
signLibrary <path to your>.dll or .exe) d4 _4 m5 @2 C" b
& g9 m' q2 r; |: G! U
Note: You do not need to use the path to the signing utilities because the
! K+ P. ], J' s% p0 H5 J5 n4 FPATH of the NX Command Prompt shell already includes both the UGOpen and UGII0 ]* [& o6 q V- J; }8 z
folders.: b, E) b, l" j/ f: Y" ~# t# K
! _" O8 O4 O5 x: j% W. M |
|