|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
8 ^; b! F2 W2 E% T" k( y+ x$ ~. k6 B5 f# o
# o' Q' ]( k1 H3 T& ^# lOnce you have fully tested your NXOpen API application, you should "sign" it% t' A+ U7 e7 Y3 h% [; N8 r
before distributing it to your end users. Even if your end users also have
( V- q" s3 L. U6 Q3 K8 V1 I. maccess to the Author license which is required to load and run an NXOpen
# |( a, D! \, D0 a. japplication, signing it has its benefits.
: @3 [9 g! r% `& v# ?9 E
: ]* N. F/ w5 t. n - Your application will load faster because NX will immediately recognize
- D9 C @5 {) H V' D+ m that it has been signed.
3 H% G; u8 r' B - The syslog (Help-> Log File) will not be cluttered with the output from ]$ ~% D& `% z. g
the multiple checks that NX will do to determine whether it can load
, d/ w. m3 u/ i. y3 ]) O and run the program.
) x' c; _/ R/ A$ [7 i2 E" b7 o$ G) k
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
6 k I- J+ D }% a& d# s% Q* V3 ^' |- a
Add the NXSigningResource to your Visual Studio project% c" Q" y" X) `0 t. X
; Z! f: u- F7 Z3 k. K! @: t; d9 x
In the Solution Explorer, select the Resource Files folder and4 O h k+ a4 w2 _& N, U) G9 I
<RMB>Add-> Existing Item' }6 s$ V- i- ]" F" s! w& b
1 m$ p$ a! A, }6 J% ~ |
C/C++:; ^7 r8 m$ f1 J
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp7 f0 d2 k) S2 m9 c8 S$ ^! @+ e& `
C# or VB .NET: q0 k5 ~8 L4 l4 ]" m: a; a
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
6 ~9 H `1 _8 P: B+ O( B/ X7 U Select the newly added NXSigningResource.res and in set
) S) }3 q) H2 ?3 c& j2 r Properties-> Build Action = Embedded Resource: o$ s0 N* |* X$ V+ \. {0 u M: A
8 s* e" q$ {: v' U" L, R
2) Make sure the build configuration is set to Release then( Z2 X$ K, q* \9 V/ G" U% t
Build-> Rebuild Solution
1 k8 @3 m$ O# @ ]4 ^9 d: U) X' G3 Q [4 Z( G0 _" e
3) Sign the executable from an NX Command Prompt window:
( V& X4 X7 x; {! L. D$ q* ^ You probably already have one open because you started the Visual& M, V( q6 W5 @
Studio or Eclipse from it. Otherwise:9 e) h. D) c9 S; M" g/ b" ?2 }8 e2 H- o
Start-> All Programs-> NX#-> NX Tools-> Command Prompt# f. G( s. U; J/ k
7 o$ I8 ?, y. _$ | Java:3 S p) r# n" m/ x. ~
signJar <path to your>.jar
( p0 X/ l2 f. a# H n
% \: c2 ~. s/ X4 {7 Z C/C++:' X- T% T: f6 C) u4 w. R( ?
NX8.5 and later:' m' l$ `( |. |' P8 y `
signCpp <path to your>.dll or .exe7 x. \7 K5 b3 W2 w
NX8.0 and earlier:
6 B8 z$ k0 W6 ]( i$ D+ { nxSign <path to your>.dll or .exe6 |- }1 C1 y! ?7 E% a, `
: F1 |$ \ s+ P7 [* ]1 G
C# or VB .NET:
+ x) u( x# d4 ?* w h9 \+ K NX8.5 and later:4 n& ]' ?8 B% q( P: H+ d9 J
signDotNet <path to your>.dll or .exe
- {; b$ p& s- C; H0 t% _9 e NX8.0 and earlier:1 q4 K4 r! f- D* [2 [# \
signLibrary <path to your>.dll or .exe
+ L. {6 U; z; b4 z3 h; h: K" @
. ~+ a: P0 ~- S: A) LNote: You do not need to use the path to the signing utilities because the9 l- G& e$ v0 u/ z
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII0 h l9 u# m! k; ?$ r1 _
folders.
: `* e T9 c- j! \) k4 T+ S! h7 U) K0 i# `
|
|