|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
4 C3 b+ x, [/ w3 o' P( |; g% g: B6 ]
/ C/ r0 R& t. ?
Once you have fully tested your NXOpen API application, you should "sign" it
9 a5 I8 U; D) h$ {8 \before distributing it to your end users. Even if your end users also have
2 e* y' L- v5 G! v+ k) Z( t+ x. Oaccess to the Author license which is required to load and run an NXOpen; o. T! o4 C6 a: O* Z+ t0 e
application, signing it has its benefits.
5 b' S3 x5 P2 a
7 {! X8 V W. m+ Q4 R - Your application will load faster because NX will immediately recognize
( `* ^3 _1 b5 Q* s6 ~( X$ L5 h, l that it has been signed.8 C" i- e X; h8 D7 L: r. f
- The syslog (Help-> Log File) will not be cluttered with the output from! F0 H: @( X4 \
the multiple checks that NX will do to determine whether it can load
1 ^. C3 A! r. Z/ ~( j7 { and run the program.* I' u1 U! Y7 O) B1 F8 J
6 w& w0 B) N [( g0 h' ^5 ]) V1) C/C++, C# or VB only (Java: Proceed directly to step 3)
% _: \1 X/ [: k- h# L! `
4 k6 ^, }9 L+ y4 ~ A3 a Add the NXSigningResource to your Visual Studio project9 n4 m! l0 ^' h. w1 I: E
' I. N, e: O) G6 u3 h' U7 F
In the Solution Explorer, select the Resource Files folder and
& O: z' k6 W; v <RMB>Add-> Existing Item
3 D/ f t* v+ A. f2 X) o, O4 i" `! Q2 N6 q m* u. |( @2 g% }
C/C++:
" D) p# Y( d# J Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
\4 Q* J* o# I4 L C# or VB .NET:
/ C$ i/ F8 a$ \7 }- d3 F Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
$ `" V, S+ j5 q; k$ q, p! }% \% O/ c Select the newly added NXSigningResource.res and in set% A H+ r# k5 u, p1 ~3 h6 V1 s! [
Properties-> Build Action = Embedded Resource
' M5 n; I8 c/ s. j' M; p1 ^( Q( z3 L" T
2) Make sure the build configuration is set to Release then9 C ?2 {% z0 p, T" D* O) U
Build-> Rebuild Solution
/ W, O4 V( J, K* Y i, c0 f
/ d8 K# v- W! F b m. B5 w7 l3) Sign the executable from an NX Command Prompt window:4 _( `* P0 a2 u [, a8 O
You probably already have one open because you started the Visual9 r8 {% b- P& w, ^
Studio or Eclipse from it. Otherwise:
! T# y. B# h& X$ k$ J# ]* S Start-> All Programs-> NX#-> NX Tools-> Command Prompt0 u% j5 ~8 `0 t& A; w9 J+ [
+ V4 O& j2 x# A# Y; s! [: A
Java:% }- P `% H! i, Y
signJar <path to your>.jar
3 e2 a+ L, N9 O) S' d
& K' n8 j. |) Y" M7 [, @4 d C/C++:
* I0 f) k" ~* g; N" m7 }8 Q NX8.5 and later:
1 p9 r) l" c# v2 j( D& y/ q signCpp <path to your>.dll or .exe
% G6 P. l h/ j4 T& r" G% h: j% b1 K NX8.0 and earlier:
" g H* g. v: X* \/ H7 u+ S* ^( M nxSign <path to your>.dll or .exe- L. Z3 Z% H) C' E1 m, J
$ a, R$ F5 V) j3 Z: V
C# or VB .NET:5 K8 S: W& r1 V- s. J
NX8.5 and later:3 _. O& P1 T/ l3 x" K
signDotNet <path to your>.dll or .exe
9 }9 u' m$ B( k7 t NX8.0 and earlier:
, i0 F, Q$ x, y! Q3 r( g5 @ signLibrary <path to your>.dll or .exe
" y6 A0 h2 f" g7 r' H$ V7 [; l0 t
8 M/ X; E" N+ s5 X2 i! M) c# LNote: You do not need to use the path to the signing utilities because the
2 D# Y H9 J7 G" @2 m. NPATH of the NX Command Prompt shell already includes both the UGOpen and UGII' x4 f6 o, U, B- @! R! y8 t
folders./ V4 U% m( U& B2 x% W* Y" z1 b' i
+ U) W4 w3 _, j5 s* y |
|