|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
! s) j! D; ~' G6 _/ B3 k
: H2 k7 ?* t0 c0 d
; ]: O+ w, _5 `2 DOnce you have fully tested your NXOpen API application, you should "sign" it- Y& W2 u/ @" p* _
before distributing it to your end users. Even if your end users also have$ e# T4 Q( R" s7 t) w2 \8 P# |4 Z, \
access to the Author license which is required to load and run an NXOpen
1 j# Q1 d) g' D. h3 ]7 X! L, B Aapplication, signing it has its benefits.
6 t# A$ ~: `3 u2 F8 t p8 G; h
6 x% K/ S1 X' |, U - Your application will load faster because NX will immediately recognize$ W* T$ S9 J5 q- ?6 P- m; D: [
that it has been signed.( J e; s' e- r. K2 q0 m
- The syslog (Help-> Log File) will not be cluttered with the output from) ^! y+ k3 O5 m3 H# [
the multiple checks that NX will do to determine whether it can load. v( ^9 e( M' `4 h0 ^+ r
and run the program.! z# o& R# K" F' Y$ U
3 l2 C1 @; F, O+ k* @% V9 n
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
2 d# Z' J7 |( c$ C: R
0 J9 E+ M; } s* S- m7 a Add the NXSigningResource to your Visual Studio project
# s* X6 {3 O. ~( n) l3 F' R! }. c: L- g
In the Solution Explorer, select the Resource Files folder and
1 ^) L7 C6 A n( k: v <RMB>Add-> Existing Item
5 \3 k! c x5 u: P' u
" E) P# o9 `9 y# C) M5 Q+ | C/C++:
8 [) D4 L/ D% T. a" ]+ b6 O Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
! q1 V0 Z8 D6 v c% T. `% v C# or VB .NET:: P0 `( }8 L$ R& ]$ N
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res, O! B V; E+ P. t
Select the newly added NXSigningResource.res and in set y0 J/ r! Z- F4 k
Properties-> Build Action = Embedded Resource V+ r z+ Q, z9 o8 l" x: S
7 i9 c+ b# d. `( C! F2) Make sure the build configuration is set to Release then6 M& e; K( [. I. `
Build-> Rebuild Solution4 @5 A4 i0 _$ ?& _% @) f5 [
& P' M% ]! v* i6 I
3) Sign the executable from an NX Command Prompt window:
3 O. Y2 z) m' {; u You probably already have one open because you started the Visual
2 a; d% H# L9 Z: T8 E5 D: [* G Studio or Eclipse from it. Otherwise:
" Y! M" p, y2 V7 h& ^ Start-> All Programs-> NX#-> NX Tools-> Command Prompt! u6 S* |- ]8 k' {8 A! ~% U7 W
7 c t; u) s& m4 y Java:/ ~& A. B# g( `; J
signJar <path to your>.jar
. R) q5 }' T* \8 [# e5 I5 m" K2 V; h. L/ N& k7 D$ @
C/C++:
, s5 h+ F: l: S( I NX8.5 and later:
4 q# L& s, Q: B& f. a( x signCpp <path to your>.dll or .exe- T: S" ~) C* b' p
NX8.0 and earlier:
0 p9 M) P; ?1 t; m2 P$ V6 {! p nxSign <path to your>.dll or .exe
3 |% E7 K/ R5 U. q4 d2 S
0 @ R1 L5 M3 H C# or VB .NET:
. O$ t) H6 Y' P- n& J( T NX8.5 and later:7 ?! H, p- K; `6 x$ a8 q( o* ^$ W
signDotNet <path to your>.dll or .exe8 `% n- u+ V7 b( @0 f
NX8.0 and earlier:
1 w; k7 j1 T4 N) Z0 f signLibrary <path to your>.dll or .exe
9 ?* _; N \ t0 [/ r& B( U! f0 y: d# V: R% b' U y( L+ X$ Z
Note: You do not need to use the path to the signing utilities because the- r! S/ g; q b' d8 K5 i: O" N
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
. c: M4 s: y" |; p/ Wfolders.& U* K4 C* o. A: t9 `, H
' n+ T& w6 U. P1 k) @- _# J
|
|