|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
# R% u# E9 l3 v# f
# _& ^+ ~, ~7 H* s, N5 d9 V* ~" l& [; C2 E* }) W
Once you have fully tested your NXOpen API application, you should "sign" it1 `3 @2 a6 A1 L6 Z1 d3 e
before distributing it to your end users. Even if your end users also have
& t7 o- v( O+ ]& A+ o; ]( qaccess to the Author license which is required to load and run an NXOpen
7 t+ @4 i2 E" b2 |4 C9 m0 Vapplication, signing it has its benefits.- n4 B) L, R9 _3 i9 v* X; v6 s
) d+ g1 X, E t j" @
- Your application will load faster because NX will immediately recognize) J' L6 O+ Y, }, [9 S2 J: p
that it has been signed.
3 A. r: F8 P8 [7 p7 Q - The syslog (Help-> Log File) will not be cluttered with the output from
. l# f& P0 C) C( D1 _ the multiple checks that NX will do to determine whether it can load
# S6 h4 ^5 D3 X: m8 ]" h and run the program.
/ _2 ?! k% ]2 O' E+ g7 ^: k" E) v! [1 F- D1 }" A& a
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
6 E2 d; P2 b v2 a3 m4 I. q& r; K& M- i, {
Add the NXSigningResource to your Visual Studio project. I w' C2 \( z
! Z1 I9 F* W( ?) |6 `, I
In the Solution Explorer, select the Resource Files folder and- T+ N9 d: m: ], O' m- e3 [
<RMB>Add-> Existing Item2 u* {9 o1 S$ n/ b+ W* d. ]) A3 f5 a7 f
! S9 o% h6 z7 V* B3 F C/C++:
6 S, ^2 ^! n8 L% p9 ?+ w Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp" x' q8 h( Z- J# g- o* P
C# or VB .NET:/ v9 V. s: h+ t7 Y* t( O9 Q
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
3 {4 d: g9 u2 s% V9 q8 m: U Select the newly added NXSigningResource.res and in set
* E+ U$ r. i" K2 ?( H Properties-> Build Action = Embedded Resource
" B! T9 v; b% J: t$ l4 c. p* C
$ D: Z0 Z& W% _. \2) Make sure the build configuration is set to Release then
8 ~ ~; z6 g% F2 A Build-> Rebuild Solution
& D5 {% ?+ Z3 ~6 o% v( v0 f7 f: k
" }. M: z& Z) [. t% k& d0 x3) Sign the executable from an NX Command Prompt window:4 T+ S0 I9 @' r% O' \2 F
You probably already have one open because you started the Visual6 c" H- M0 Z/ V; ~" i( p) Q
Studio or Eclipse from it. Otherwise:7 S. e, N' C( U; n
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
& q- W. {- P4 ~7 X3 L: ^7 @! K. Z4 w3 J& e
Java: X8 L% ]( B1 d$ R3 Z1 ]
signJar <path to your>.jar
( h6 \& }/ u8 X7 p1 [* Y. [- s
' p0 ?* j( v. X# E* `" K9 ~ C/C++:
/ M h, {( S$ y4 J: ]! ]8 N NX8.5 and later:6 [0 @5 U& N# d* {+ ?: J
signCpp <path to your>.dll or .exe8 r1 P5 J |& G3 P
NX8.0 and earlier:
L/ f; k6 l/ N7 G2 L: ~& I; }( W$ x5 p! r nxSign <path to your>.dll or .exe) V# j! B0 z, m* p& o$ t
) p: Y; Q- i; g5 V
C# or VB .NET:
$ }+ T+ K! G5 |- C5 q0 @ NX8.5 and later:
# G& ]4 ^7 B5 ^9 y signDotNet <path to your>.dll or .exe
: {6 o% r( w$ ]2 U* m! b% G+ L7 a NX8.0 and earlier:
O# c. ]. E9 o signLibrary <path to your>.dll or .exe
. A$ C+ W! w$ }9 o! }7 M4 }5 r/ |, b* M+ L+ t8 ]
Note: You do not need to use the path to the signing utilities because the' f% l6 n# u' Y0 f
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII% I( u* |2 h* R( d ?4 W
folders.
( A8 c: d% z4 s/ G2 G4 ~7 k' J, F1 f1 `* S) [9 ?4 l) k
|
|