|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
|6 x9 j$ G! K+ T
$ _& G) b# D/ i9 A4 ~( ?+ E- }4 Z, u$ a% J
Once you have fully tested your NXOpen API application, you should "sign" it9 [6 J9 {2 _8 ?0 |
before distributing it to your end users. Even if your end users also have$ n' ^( n% V) o. I: X+ [3 u, g
access to the Author license which is required to load and run an NXOpen
3 n0 R5 B8 @4 U Japplication, signing it has its benefits.
8 {1 ?$ f+ O1 N1 Q
/ v5 C6 N9 \- ?/ k - Your application will load faster because NX will immediately recognize/ y# b* H' t7 k! T* K- X8 P6 x
that it has been signed.
; y) o& d/ h+ v: k. u3 d - The syslog (Help-> Log File) will not be cluttered with the output from
* }+ L5 L+ {- D0 I o the multiple checks that NX will do to determine whether it can load
; c" N) k% W M0 E# O3 o and run the program.1 h/ _) G; V: P% T8 l. @
( e. o( i3 n" i; y6 `
1) C/C++, C# or VB only (Java: Proceed directly to step 3)! s% q: S+ r/ Z" g& A
( d- t1 c" K6 r1 A1 o. J6 J+ V7 p Add the NXSigningResource to your Visual Studio project
" J& ~; d, m: s
/ g( G% r+ X+ V7 E9 q4 f In the Solution Explorer, select the Resource Files folder and( c! R/ t$ r5 b w
<RMB>Add-> Existing Item. q5 m. b0 @& P2 Z% o& R
3 v) {( M! n, i
C/C++:3 s9 M# H$ n8 Q4 S# n3 g
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
5 }& i d) G( V0 T q5 I/ F C# or VB .NET:! R0 M4 t; c. G) o K
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
# J# h# g7 G: D: W3 }% Q3 O Select the newly added NXSigningResource.res and in set* s2 b1 B% w2 f2 L, r, J1 w4 A; L# @! A
Properties-> Build Action = Embedded Resource
* F K8 G2 n( H3 {# r* D+ ~2 y
7 t! C+ k. J& ` f5 u# A. G8 j2) Make sure the build configuration is set to Release then k' }7 M# m& u% ]5 @1 Q5 p
Build-> Rebuild Solution
1 f" O/ H) j& J. O
& v* E; T8 E7 a3) Sign the executable from an NX Command Prompt window:
& H) y* @; k2 r' a You probably already have one open because you started the Visual) p# I( L) Y8 ]# d. g! S- }
Studio or Eclipse from it. Otherwise:! }7 w5 o: P( o( `. N" B/ c5 q/ K
Start-> All Programs-> NX#-> NX Tools-> Command Prompt4 m- c0 C; ?& b1 x$ f
3 `) T. D4 W/ D3 }1 f, R( s
Java:: c4 v( c% a# _# }, |
signJar <path to your>.jar1 C" s2 g" C8 G& o7 \1 b- m2 T' g
0 s9 L; ]3 l$ j" h C/C++:8 K; ?" p) O- ^/ p- @* f
NX8.5 and later:* w" C$ v8 \: j$ t
signCpp <path to your>.dll or .exe
7 R; E* b2 g4 F7 w& t NX8.0 and earlier:- V2 U/ ]/ }. T! `
nxSign <path to your>.dll or .exe9 i4 u0 t+ F1 A+ o" d3 Y
' ~, h! A5 Q% x- b) H
C# or VB .NET:: N# ^4 R6 o3 P3 g
NX8.5 and later:0 H( |3 z* C' l+ m' r2 g
signDotNet <path to your>.dll or .exe
* i/ q7 v+ ]( [2 n9 k! J* H NX8.0 and earlier:! @+ T" s5 {# X6 o; Y5 ^/ {
signLibrary <path to your>.dll or .exe
) @- l3 V {0 L; V5 T4 f0 p8 j! P" {# k( |
Note: You do not need to use the path to the signing utilities because the! I2 n, L; A+ _7 n/ X( c
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII z% q, `( y% v1 e! ~) M" {, a8 c
folders.
1 P4 ]! `- j6 R. p: ^$ P# u- P; x
+ B1 x$ M% r0 w" ` |
|