|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 j2 Q1 ?( e$ \% a! j
k n- c4 ]) T' A
( a; Y. {2 s1 k1 r3 a3 A4 N0 f
Once you have fully tested your NXOpen API application, you should "sign" it
5 g1 r: D8 I+ a+ tbefore distributing it to your end users. Even if your end users also have- n% b, y2 j7 w! Z& X; `
access to the Author license which is required to load and run an NXOpen
' U" g3 K. @" V) vapplication, signing it has its benefits.
: ?* ]- v" ^: [: A" _1 }8 b
( ^0 G* ~. G8 T5 D - Your application will load faster because NX will immediately recognize' E4 z" A- e! O% q" ]
that it has been signed.6 y% F; H. K% i3 ?& S3 L
- The syslog (Help-> Log File) will not be cluttered with the output from5 ]$ B- K% \ }: r+ E
the multiple checks that NX will do to determine whether it can load ~, \, M M% [4 y
and run the program.
7 E- @) @& X) @9 d3 i4 C# a, E1 X0 B6 L. b4 W% _& q, U! `
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
+ P# X& I$ u$ L3 S' I
% A1 x: X! v* \1 M/ p Add the NXSigningResource to your Visual Studio project
2 j) _" y9 ?5 H4 h b+ \- h: W2 F7 o0 L6 b8 U5 ?
In the Solution Explorer, select the Resource Files folder and. g. J1 v, Y' V' C
<RMB>Add-> Existing Item
! i) R, {5 t0 ?) F+ |" J' L3 u4 v/ v- C3 D+ V8 w: Z
C/C++:
4 D* o2 E8 \8 [ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
U8 ?8 y" |" \$ m C# or VB .NET:
y/ ^8 v$ X' ?2 G R8 l Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; f* ?- S# {# u# C: Y Select the newly added NXSigningResource.res and in set
; T) I6 `3 L4 r6 k$ j: L$ P% l; \ Properties-> Build Action = Embedded Resource! s r7 }2 Y. x2 ?! d- J
[; U% ^$ h3 ]( a9 S6 r
2) Make sure the build configuration is set to Release then
% @ z. D% _4 E4 t! p Build-> Rebuild Solution- v* N( l: [4 s
( D* R7 t1 v; H ^, f3) Sign the executable from an NX Command Prompt window:
; G& y' G6 d$ M6 J6 T- K4 l% c" |& U You probably already have one open because you started the Visual
9 {/ y0 P! x5 o) c Studio or Eclipse from it. Otherwise:
7 r5 K' u: U+ y Start-> All Programs-> NX#-> NX Tools-> Command Prompt
& K$ E% Q- s% ^$ z
" n+ ~3 p% G1 ] ~4 M Java:
8 ^5 f: _4 B7 I% v6 v1 R) V. M signJar <path to your>.jar
* V) b8 f$ D9 B$ ^$ N
" k5 L+ t {0 I6 o# X$ p( N* C& d C/C++:
. c& r& v0 \# i7 v0 p E7 E: @ NX8.5 and later:
( [- [+ g% m' z1 `" \1 \, }2 }3 | signCpp <path to your>.dll or .exe' X; c2 B3 g6 I+ X9 Y0 @
NX8.0 and earlier:
7 Z4 b: l( Y/ y6 K) X2 [ nxSign <path to your>.dll or .exe' p8 ?) g& G8 X# r; I: [
' {$ o7 h8 ~' i( Q! m C# or VB .NET:
0 p; A1 \1 j5 K7 q NX8.5 and later:1 X; B+ ] R- S3 i5 d/ b
signDotNet <path to your>.dll or .exe
9 L$ c$ v) T9 u& ^2 f NX8.0 and earlier:
; U7 N$ q u: C6 o# Q' r signLibrary <path to your>.dll or .exe+ |7 n b' Y# s Z$ D# P
9 ^7 f9 v# G& ]! j
Note: You do not need to use the path to the signing utilities because the( ~# ]2 l* @/ v4 v
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII& u$ ? f- K9 i% y2 R0 _
folders.
( O1 X. Q! }6 A9 v8 E* K; G# A4 ]# V7 K% \6 c3 _- Q# i
|
|