|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
7 v0 \6 s, E/ t& \; O& b
' [# B1 r+ ]; y- Q& Z. K: c+ y: j/ i( ?2 Q2 ~( L2 f! _! u
Once you have fully tested your NXOpen API application, you should "sign" it
* G# v1 K* x( f- Nbefore distributing it to your end users. Even if your end users also have
$ G! U0 s" I' h5 Saccess to the Author license which is required to load and run an NXOpen
3 W9 T. a/ K% r( iapplication, signing it has its benefits.
3 b9 L' J& P$ F5 `& u/ J) {0 U, T" _. h
- Your application will load faster because NX will immediately recognize
% S! r5 d U. r9 g/ p4 T that it has been signed.3 N! g$ |0 n+ q7 ]$ O: Z* V. ^; m
- The syslog (Help-> Log File) will not be cluttered with the output from
* B5 l, k8 g Q1 b: j the multiple checks that NX will do to determine whether it can load; K& t0 J. s% M e7 S7 l7 l
and run the program.
% w$ ^5 o2 \" h) `( {3 P: _
4 F% ~ v0 b' \1) C/C++, C# or VB only (Java: Proceed directly to step 3)3 J/ _" h. j. s: |9 x/ p: X
3 c5 k# n) |* D$ T5 M/ k! P. E Add the NXSigningResource to your Visual Studio project
2 ^. }- s( Y! ]* b \4 v
9 d& ^9 V# V; l# b In the Solution Explorer, select the Resource Files folder and& N" a+ S( U- Q5 `3 [
<RMB>Add-> Existing Item
) X6 [; l# S" Q+ z% B* |9 f
; V6 o) V; G# l3 j$ c: k) g/ ` C/C++:9 i) @7 \* q* X/ i' M+ _
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp+ e( n% Y! f* J7 s8 u' i# q
C# or VB .NET:5 b7 Q# u9 k, ^4 H
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
& T0 d" r1 ]) K5 x* U* P3 U Select the newly added NXSigningResource.res and in set6 J5 h* a9 W, n! W4 b, J9 ]6 K
Properties-> Build Action = Embedded Resource
# W! W2 {: y# c
. [$ M3 n; ~5 E/ V+ [) \' b2) Make sure the build configuration is set to Release then
1 @0 x v2 X' }6 F, ~1 k" i Build-> Rebuild Solution
8 C9 O; c; v6 U o% _6 F) H; j, g& i& n* o" X, J7 z% Q) N
3) Sign the executable from an NX Command Prompt window:* B/ u7 J' V3 D7 j
You probably already have one open because you started the Visual
! N W! {* y; G# R G+ b Studio or Eclipse from it. Otherwise:5 }% F. S+ e% ?: X; A
Start-> All Programs-> NX#-> NX Tools-> Command Prompt3 h2 j* V" J: B/ n
; S$ n# T0 X; G# @# V Java:
3 y5 B0 R/ I; B A signJar <path to your>.jar9 A" |& T3 O% P
7 K2 b1 h8 Z: R* w$ O' ]' F! S& o3 Y C/C++:
: ]! c- e' R+ a( |' S) y2 E NX8.5 and later:
0 c8 u N3 M% h9 T" T5 [$ @) [/ H signCpp <path to your>.dll or .exe! l! T) ~! k2 O- }
NX8.0 and earlier:
9 X: a) N: z: K% z nxSign <path to your>.dll or .exe! ~6 t( [7 ?1 Q- Q
/ X( q) K" e; m8 S1 ^1 q C# or VB .NET:
2 d- L7 E% U8 S# e0 v/ P NX8.5 and later:4 X( \* w/ T* }; q1 y
signDotNet <path to your>.dll or .exe
2 l2 j/ E# _8 D8 {4 @# c NX8.0 and earlier:" u B& T8 G9 A- Q) S4 H, n* f+ {# F+ g
signLibrary <path to your>.dll or .exe5 \8 [% ^2 ~' [! `1 F* S u
1 D$ C- T% p' i+ m+ l7 R- H2 h
Note: You do not need to use the path to the signing utilities because the
* T' x, w' q: U# D; APATH of the NX Command Prompt shell already includes both the UGOpen and UGII
7 P' q( s9 ~1 l, n* Zfolders.3 g( j0 l1 j' |4 g
( h- U3 r7 }% R! x z6 {, X' S# J( Z
|
|