|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
( l9 e7 e9 Y) w. K# v7 X
9 g- N5 H3 d# n8 P) q0 f3 a/ d; m6 A2 {4 g
Once you have fully tested your NXOpen API application, you should "sign" it. f1 s x; [& O& k
before distributing it to your end users. Even if your end users also have5 l6 \+ j( T Z' Z. v5 H B
access to the Author license which is required to load and run an NXOpen# ]& j7 N/ K( ^8 g1 w7 p3 u0 J; W! U
application, signing it has its benefits.
" o1 W* f, v3 z: x7 V3 \: B; F& w; u0 r {
- Your application will load faster because NX will immediately recognize
# D/ x$ o+ c4 d% } that it has been signed.8 _8 l* V' R+ b% f+ E
- The syslog (Help-> Log File) will not be cluttered with the output from
0 b: e. n* s! x. s the multiple checks that NX will do to determine whether it can load+ ^' {2 F9 }) ^/ C- J c5 X/ {
and run the program.
/ i- S* b; w' m' ~, g
\: p3 \ H5 j1) C/C++, C# or VB only (Java: Proceed directly to step 3)( u) d# l! W i4 k
. B0 Q* }) c4 X* V
Add the NXSigningResource to your Visual Studio project
: k; ?' c* i* j( _: b& f: S$ ]
9 G( ?5 X# D0 X$ e& F5 o7 F1 } In the Solution Explorer, select the Resource Files folder and9 X) f! t/ L+ A! _
<RMB>Add-> Existing Item1 ]" t+ ?# ?0 ?1 d2 s
+ L. k" l: R' _( e C/C++:
: |& J9 x* n! W/ t8 J Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
& }+ O' |: Z9 j1 o6 z5 N C# or VB .NET:! i @/ r" b# y; ], y/ O
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
( j5 w0 C3 o7 E6 Z Select the newly added NXSigningResource.res and in set
' J7 B8 m, o: M Properties-> Build Action = Embedded Resource& O$ S. L& O& ~0 N$ h( f& `
( W' g: q/ |& u o: G" \* i9 E2) Make sure the build configuration is set to Release then
& ~6 \) U# B1 ] Build-> Rebuild Solution
2 r( ?7 M: e2 a. R B" ] d; Z% y
% m# I% F* m# B( n! I% k3) Sign the executable from an NX Command Prompt window:
/ W; A1 x' P" O1 |7 d+ u You probably already have one open because you started the Visual
; O+ f2 R- ^; w1 ~ }3 f6 F Studio or Eclipse from it. Otherwise:
$ [! r# x; A [! ~" U9 v; s4 m Start-> All Programs-> NX#-> NX Tools-> Command Prompt
% y, c/ R1 k* ]5 e3 m
1 X v$ g2 f# T4 H( ~9 @ Java:
) @$ S) Y6 Q: L- a signJar <path to your>.jar" z# Q: Z/ f: B6 l
6 L' N) i; v+ w: y! i9 K m
C/C++:8 x3 ?7 o# \0 C( u/ k& y: [8 G
NX8.5 and later:
* f* b8 s1 I% }" F7 `- ?8 z signCpp <path to your>.dll or .exe
; }/ L. j& t3 I4 L6 Z NX8.0 and earlier:4 l8 B9 B; R# b# c- e
nxSign <path to your>.dll or .exe9 s- R' Q P; M* Q
! u$ D" r2 V2 R2 \# s
C# or VB .NET:
1 W) q8 m/ M) Y1 y* Z NX8.5 and later:
, f: [& }# I, F0 \9 m$ P. u signDotNet <path to your>.dll or .exe3 c) l9 j, E v% Y- R$ E' V
NX8.0 and earlier:
, O ]& G$ H9 o D signLibrary <path to your>.dll or .exe
4 H1 n# @+ G* r! {1 m: ~. }8 o8 O8 V! f0 A
Note: You do not need to use the path to the signing utilities because the
, h$ t' A+ B$ A* y- nPATH of the NX Command Prompt shell already includes both the UGOpen and UGII N* e, Q2 I1 e% V" m
folders.: p' K3 f$ L0 t3 \9 e( n2 w7 q
5 E/ U/ C+ ~- w+ x/ i5 p& `: C5 C |
|