|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
8 p5 B A) s( D: P. m( K- S
+ d0 C) c4 l. b$ N& m
# n0 y* Q T I4 v8 B. `8 M6 |Once you have fully tested your NXOpen API application, you should "sign" it" P4 C7 c; Y. g3 v2 ?
before distributing it to your end users. Even if your end users also have
9 g2 b, \0 Q/ T' P8 Xaccess to the Author license which is required to load and run an NXOpen
: w, l5 V4 _. wapplication, signing it has its benefits.# b$ M+ Z' X2 K& C D3 }
7 t5 B1 J, T: ^" X - Your application will load faster because NX will immediately recognize) B& Y) m% H* \
that it has been signed.0 w$ v- B3 O' L! B ~+ n4 r3 l
- The syslog (Help-> Log File) will not be cluttered with the output from, y3 f k# k3 `; b4 \
the multiple checks that NX will do to determine whether it can load" A; ?& C$ Q8 c3 Q" R
and run the program.
. k* e4 F- ?, v1 M# E1 R
9 W& x3 E) O* ?8 \+ t1) C/C++, C# or VB only (Java: Proceed directly to step 3)! i& i+ d, M E! Z6 a5 [* |8 G) k
. n. o( u# Q0 f0 b& E( C
Add the NXSigningResource to your Visual Studio project H, L. n# R3 o) Q. N+ r% O
: ~0 [6 [4 c7 @& m( R4 O In the Solution Explorer, select the Resource Files folder and
+ U& P5 }' F, s( ^) H* J <RMB>Add-> Existing Item
7 k( R; A7 X, U& C7 N
t$ S* g2 p, J( x( o: E. U C/C++:' Y$ |# w" ~9 f7 ]4 s! b& r8 ]' c
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp% t6 J" j' `9 h. `( ?
C# or VB .NET:9 s! `! z! _4 @8 b
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
" N6 R% U3 X6 D& X0 P+ \ Select the newly added NXSigningResource.res and in set, V' |9 j, [8 g, J9 W- f# `
Properties-> Build Action = Embedded Resource
( X8 E* P( n; x9 t! P8 R9 }7 L" q9 d# O0 B" b s* a5 D
2) Make sure the build configuration is set to Release then9 ]! {8 Y2 t& G5 l" [+ W
Build-> Rebuild Solution# [5 A3 J9 s" A i/ c
9 x3 G( X m7 |) ], x" u7 F! w8 }$ _3) Sign the executable from an NX Command Prompt window:
l, H) r) G9 k# V/ `9 M0 w You probably already have one open because you started the Visual
$ Z& [* n1 r. j& c) h e4 d+ C Studio or Eclipse from it. Otherwise:
# |6 x" L/ l$ e* [! u Start-> All Programs-> NX#-> NX Tools-> Command Prompt+ I! c0 e$ u2 O% B( S5 ]
6 Q6 Y' l U% m5 V* A- Y
Java:
2 L9 c( [: k. c! E4 G signJar <path to your>.jar
- t0 E, L% T$ D& f$ S
" {3 T- O. {4 n5 S C/C++:
1 M1 V! m, D8 K3 J NX8.5 and later:
! N: c( t6 l$ x9 b& s# W signCpp <path to your>.dll or .exe
: v D) l$ d9 `+ d4 Y( H& _ NX8.0 and earlier:
, M" R, G: ?; F: d nxSign <path to your>.dll or .exe
9 |1 Y( \( T: D! z% z k, p
$ \4 O' s5 s/ h5 X; P: H' _ C# or VB .NET:
- ]2 J) @9 H' \+ G- B3 R8 q NX8.5 and later:) ?+ r# m# V( G& L# l
signDotNet <path to your>.dll or .exe
% @/ p5 K m6 w NX8.0 and earlier:
9 _. U0 K9 ~# E: d h signLibrary <path to your>.dll or .exe
7 i# d8 N+ |- K2 h, H: p
- u4 [4 H0 F4 W! _3 ]2 ^6 eNote: You do not need to use the path to the signing utilities because the6 y# ~0 m/ N. [2 _5 N
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
, p1 O4 R0 Y& O6 afolders.
4 |' Z- j, g* G9 y
6 V9 y& c) {0 o, Q) U" _ |
|