|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, H; J4 g- ^6 |8 ?1 U- `
% _' d+ k8 O* H8 c& U! N: l# B9 @2 c0 t3 y( Y l% n8 u
Once you have fully tested your NXOpen API application, you should "sign" it
- y9 x4 n! Q5 w2 `) ^6 Sbefore distributing it to your end users. Even if your end users also have
% ]& i9 v* R: T; Z/ x2 jaccess to the Author license which is required to load and run an NXOpen
3 M( c7 @) r% e' ~application, signing it has its benefits.
, l: j j" }% X* [- S% Z- @4 |5 s5 Z1 k [# C2 w4 u
- Your application will load faster because NX will immediately recognize5 L/ b9 r6 k6 B6 n
that it has been signed.
- L) U" f F8 V5 z% O - The syslog (Help-> Log File) will not be cluttered with the output from
+ j8 w- h" i" `" S! c. L the multiple checks that NX will do to determine whether it can load& c6 N7 k- h3 I8 d6 Q, U+ @- \
and run the program.4 i+ z7 i: y' r
" w% V8 ]$ F2 o9 O: U
1) C/C++, C# or VB only (Java: Proceed directly to step 3), F: S: C1 r8 {; g s
3 a1 i- g1 C* W9 B4 B+ k
Add the NXSigningResource to your Visual Studio project
7 o' | t9 H" @- A. l8 p
* W- R# y4 R. ], i In the Solution Explorer, select the Resource Files folder and1 _+ d( x, d: f o' Z
<RMB>Add-> Existing Item
; i0 i% |+ p! V f
2 V/ @, Y( N- Z: C$ ` C/C++:
4 v0 c { Q3 ~. S7 t4 _ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp- o1 x- Q" C+ k% y, Q1 ?# K
C# or VB .NET:* w" }, c0 R% S0 f
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res$ H% F, z% E: [$ T4 S& k" S
Select the newly added NXSigningResource.res and in set
" A1 l: H' e5 O: i7 n Properties-> Build Action = Embedded Resource
5 Z M; }- I0 P! w' K, e
- j$ D8 k2 {4 @ U2) Make sure the build configuration is set to Release then; [' V1 _* z Z! J8 k$ ^- l% Z, a# I
Build-> Rebuild Solution' S: l, ^- z [4 d2 O
; w& Z' [' q8 [& |: [3) Sign the executable from an NX Command Prompt window:3 h' p! y* S6 E: B* ]4 l
You probably already have one open because you started the Visual' Q3 i" Q1 ?; }1 P7 i
Studio or Eclipse from it. Otherwise:2 I, t' O, W( u' ~8 |
Start-> All Programs-> NX#-> NX Tools-> Command Prompt4 ?( h) E) D8 e, b x
8 D. }! v8 \- w- p
Java:# t3 c8 V3 _4 r4 I9 v0 ]( n+ A
signJar <path to your>.jar
* U g& k ~1 x! d% _/ J: h
0 e( c c5 o% w- B3 Z% i C/C++:% e7 J" ~' [$ _! e: r9 k/ ]
NX8.5 and later:
9 ]1 C' B3 U$ c W: ~ signCpp <path to your>.dll or .exe$ u" m& o1 | S3 K& B+ [" D2 d
NX8.0 and earlier:! X" q: e$ b- Q9 s5 _4 r
nxSign <path to your>.dll or .exe
/ n* j+ D1 w1 |% E2 U( q( t9 t; t7 v% _* G! e' a. F, K
C# or VB .NET:
# S, Y5 ?9 \) t/ I0 K9 g NX8.5 and later:$ }; S; Q5 t: h+ o: D- \
signDotNet <path to your>.dll or .exe
& t: G" y0 d, g; _% Z5 _ NX8.0 and earlier:4 W- p6 e+ q8 R
signLibrary <path to your>.dll or .exe& m1 T& [ }# `& i( V( `* S/ }, q
$ P4 l! i. [0 ^( N! O9 n0 e
Note: You do not need to use the path to the signing utilities because the! k( {* b; e5 N5 a- k
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
. [$ b5 \+ @/ h2 r( g6 ^" `folders.9 j: r; I+ p4 w0 J8 J) x8 y M% ^, W* B( l
0 Y1 I {' {% G7 F0 i
|
|