|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 ~4 a2 v* J9 J/ K
9 U2 `! t4 S; O6 j$ {: o! u l0 D: } Z$ L3 f3 I! ?
Once you have fully tested your NXOpen API application, you should "sign" it+ C1 q7 e# S% ?" f& c. B
before distributing it to your end users. Even if your end users also have
5 r: C1 y2 T; Uaccess to the Author license which is required to load and run an NXOpen
# [2 y/ A+ q, oapplication, signing it has its benefits. r& X! G8 q1 m; f' N( K7 r9 h9 Y
$ p- \7 |3 r7 i/ ^( q( r - Your application will load faster because NX will immediately recognize
4 p, V) P" y; a; u0 Z$ P* k+ [5 j that it has been signed.2 Q9 Y) `+ f5 H( I% l3 n* p7 l
- The syslog (Help-> Log File) will not be cluttered with the output from
, f* y# h7 T8 {- Z8 w- ]) P1 T9 b the multiple checks that NX will do to determine whether it can load
, ~3 w2 m( e( p* H; @ and run the program.
8 ~2 l7 d8 [2 c# `+ A8 \- r8 N
4 X5 k9 S1 e i! \. `1) C/C++, C# or VB only (Java: Proceed directly to step 3)
m( |0 X1 b7 ~8 I
3 Z/ B: o$ O# }4 o7 u K( w7 l Add the NXSigningResource to your Visual Studio project
& x {( M; I9 j' M( V* K& k2 ^% |* A6 f" ~; o: T9 y
In the Solution Explorer, select the Resource Files folder and! P0 e( I) M9 u5 t/ v% z2 R
<RMB>Add-> Existing Item
4 M E6 g( D0 {3 h
- t: P a/ N! B" K C/C++:
/ o B h& g3 p' f: ~2 P" n Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp) x: O9 ?2 ?) d- @
C# or VB .NET:
# c4 L' M c1 f0 b m1 l Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
0 {3 u) k: r: f: o( e) D* p Select the newly added NXSigningResource.res and in set" C I2 M* f; \2 U$ S# Z
Properties-> Build Action = Embedded Resource
! m/ f: w% n6 u! [: I0 B
" G5 W+ s' L' Z, b. i* o2) Make sure the build configuration is set to Release then
. P" P* d4 {8 @# q Build-> Rebuild Solution& X, R* s( d2 e0 q3 l: F' B$ R
5 L2 \+ q1 H. H+ g4 ^1 s3) Sign the executable from an NX Command Prompt window:* i; M2 n. G! s k! D
You probably already have one open because you started the Visual" W) E1 m+ ]0 T4 C5 V3 _
Studio or Eclipse from it. Otherwise:+ N4 W# f% l( `
Start-> All Programs-> NX#-> NX Tools-> Command Prompt: `4 l9 g% J: x* ?
/ U/ P C+ ?9 q8 S
Java:
. M/ G% _7 C4 b! v, F5 [3 C signJar <path to your>.jar
4 W& S8 m& z( U( S" u( @ u' s) }- }! h+ y9 |
C/C++:$ ^: O0 f% g0 v
NX8.5 and later:
1 T( o* t4 E7 w* n; \+ f& ` signCpp <path to your>.dll or .exe
4 ?7 A% i# O { NX8.0 and earlier:. P" q: }/ q C5 y& L
nxSign <path to your>.dll or .exe
, i" x* R; [0 R9 s2 A$ ]4 `" @& Q4 `/ L5 ?* k; U
C# or VB .NET:0 O9 m* _* @1 Y1 f+ f2 w) t& d+ f
NX8.5 and later:
$ }4 j+ y3 m3 _6 N signDotNet <path to your>.dll or .exe
+ q" {+ X% e9 q& p2 O1 `- |$ ^ NX8.0 and earlier:
+ D$ J T) h5 F. {& l& v signLibrary <path to your>.dll or .exe5 v/ G, v: C( q0 ]& z: F, ~2 u0 Z
. Z( a+ Q+ _+ ^5 Z) \( \1 k- T# oNote: You do not need to use the path to the signing utilities because the0 Y E" r& b8 \* ^1 A( r: p! H
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII T+ b& H% C2 I
folders.
4 t, i* X3 O. c, y4 g7 l, |1 ~- q: `2 k, S$ D$ ?2 S @
|
|