|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
* a# T' W) p" y5 i5 t n ]2 P1 `% W+ d1 T- P
' ~; R- k. Z' t0 u5 P
Once you have fully tested your NXOpen API application, you should "sign" it" @9 b( ?% _8 _- V
before distributing it to your end users. Even if your end users also have
6 O. u8 H( ^7 faccess to the Author license which is required to load and run an NXOpen0 E: ?1 [& z# N9 h
application, signing it has its benefits.
) ]. a7 Z) l2 O6 G0 K4 W: ^5 F0 ]
3 ]1 ^" _6 c$ Z. O8 i2 [ - Your application will load faster because NX will immediately recognize/ w6 ~9 P: C% y, t% ~1 S$ C
that it has been signed.4 h& k+ Y- F ~- P
- The syslog (Help-> Log File) will not be cluttered with the output from1 i& x' X' U- { K# f6 j/ P
the multiple checks that NX will do to determine whether it can load! t1 Q0 v4 Y2 k& |, D
and run the program.
! l5 q4 w/ @/ n: d( W- f. [; \
3 K9 l }% u* h# l0 } {1) C/C++, C# or VB only (Java: Proceed directly to step 3)1 j2 ]: [& |6 J0 X
0 x6 @* _- D# l. K% d# ~" @
Add the NXSigningResource to your Visual Studio project
: y* L& M: H: E+ _3 _- z
- A Q# L4 m& w5 ~7 {, S In the Solution Explorer, select the Resource Files folder and
2 j$ b8 @. w# z7 x: b: x8 X <RMB>Add-> Existing Item
, r5 z( \* T: P; |5 V( _; j. g6 P1 ^
- J# R$ I/ O4 v1 j# D" Z C/C++:
+ e4 F0 M& n: x9 {( q Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp" D; P0 ^1 D; ^/ `) K
C# or VB .NET:
! a# S! C* g) {- q4 c, l Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
C) X2 I* Z4 p5 U. ]2 C2 s Select the newly added NXSigningResource.res and in set
: E$ m& V" t! o) }+ ^0 l Properties-> Build Action = Embedded Resource
% o. J: b0 Y8 r$ P7 R! E* R/ l. ?* _0 y) l( n: l- x5 |
2) Make sure the build configuration is set to Release then% `2 a3 o8 |* A2 ~7 Z, J
Build-> Rebuild Solution
$ v- v% R5 L6 n' ` Z
- g$ e5 ~, `+ H3) Sign the executable from an NX Command Prompt window:
7 `4 _: D( Y6 j4 {) I0 z You probably already have one open because you started the Visual
9 x9 ?3 |/ N1 E: l2 ?3 y6 e; J Studio or Eclipse from it. Otherwise:8 S) O+ P( i6 P3 M3 @' k) w3 T
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
, G3 O# ]& \2 Y; X3 s4 E) g3 A' ^# z! L' b7 H4 f/ O1 ?7 w% x
Java:. Q0 D# S1 k) T& Q3 L6 T
signJar <path to your>.jar2 w2 Y. l# A5 M/ k
$ c$ h) G* ~( l C/C++:- e2 O) o0 V9 z
NX8.5 and later:0 D) s! ~- f3 x
signCpp <path to your>.dll or .exe' ~/ Z: |' V( E/ B( F, F2 [
NX8.0 and earlier:: Z9 l4 d+ c' \: q$ I w
nxSign <path to your>.dll or .exe
: ^2 [8 h0 r H" \5 t# I
6 R+ u8 M& G7 l" d* c C# or VB .NET:3 S7 p( [2 _5 B- P$ X
NX8.5 and later:
4 t: b# m. u3 e signDotNet <path to your>.dll or .exe! f- T0 i/ F: `/ u" C/ ~+ p
NX8.0 and earlier:
2 f, j2 k5 c: g# m signLibrary <path to your>.dll or .exe9 q8 o* k. [6 a/ [% t3 f
: |/ v& x1 R" v9 b# N Q# pNote: You do not need to use the path to the signing utilities because the1 @( g# Q8 S5 d j
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
: S* l! |! n0 i- o9 D# lfolders.- O# t$ X/ @5 Z9 D! \, l
- J5 H7 I& N0 @9 \7 I* \) j |
|