|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
8 Z' ?# @& e4 O3 d. i
! i8 n( A" A/ L o/ k. x; T4 B+ b, b1 m$ g
Once you have fully tested your NXOpen API application, you should "sign" it
# J) a$ Y4 e2 e% g+ obefore distributing it to your end users. Even if your end users also have
- m2 t: H- d6 J6 y+ Maccess to the Author license which is required to load and run an NXOpen c0 e B0 T W. Y% Q" {
application, signing it has its benefits.
8 H4 _, ]7 U0 S6 y- n* i5 G- L$ v2 {/ r+ R6 U
- Your application will load faster because NX will immediately recognize
- E5 @# M8 N2 x that it has been signed.
+ A& u# e# U! _5 t8 X5 ^; R. { - The syslog (Help-> Log File) will not be cluttered with the output from
5 K% _6 v! t. M7 l4 M* J6 @ the multiple checks that NX will do to determine whether it can load
- Q7 ~$ B5 j+ K/ C" H) X# b and run the program.
$ I- l- C' H" |" d) u# l: }5 M
; l; I0 i/ B5 N5 I8 G1) C/C++, C# or VB only (Java: Proceed directly to step 3)
: k: `: o3 b% y0 _/ d" U; m( \! P) [6 C; r
Add the NXSigningResource to your Visual Studio project4 R! w2 N# a% s6 C4 ]- F8 M$ W! V
* Y, s9 q; V% c5 W9 m
In the Solution Explorer, select the Resource Files folder and
4 h `2 C: J) ~5 W/ W- N <RMB>Add-> Existing Item. ]& l$ m: t' h! Y
' Y/ V) B; j, P' Q6 H8 A+ | C/C++:
2 K) E1 v" y! k# K: D Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp3 l) d: g- I% t' @5 y- @5 e: E2 R% H
C# or VB .NET:
9 T# o% D+ B" J( o6 S* D! V4 Y Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
) }- d5 Y$ k3 v Select the newly added NXSigningResource.res and in set
$ O+ ]& v V, o. z/ `& q: v) R Properties-> Build Action = Embedded Resource4 F- Q9 ^7 C7 s& e- _* C6 T, q# K
0 \: C) {! _# ]+ F' S5 \. C" T
2) Make sure the build configuration is set to Release then7 W9 n) s. N( d) c9 W) _
Build-> Rebuild Solution
+ @1 p1 T; }2 K) R! I- ?& i% g+ c _+ C3 p6 E$ z. W4 A
3) Sign the executable from an NX Command Prompt window:9 _8 g* h* L+ M* v$ @# t
You probably already have one open because you started the Visual- p4 N; E) U4 m$ E& r% w
Studio or Eclipse from it. Otherwise:1 ~* v- m0 s& p- |* Z: ]2 @
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
+ L1 D2 Q% F/ q2 P, b2 m) o M7 q5 S
Java: |+ f* z% _; v# q3 W; o* P, S2 b
signJar <path to your>.jar
! o" E3 w4 L* Q5 K6 c% \
9 T: \" T; y. C. o C/C++:8 _2 Q/ e! U9 X4 R+ N
NX8.5 and later:; |3 t, D' U7 C! w
signCpp <path to your>.dll or .exe# G1 s+ M" P& z" O9 A @* J. j; q' n
NX8.0 and earlier:
) P1 L8 ^/ M+ n( V1 C4 F$ F& i nxSign <path to your>.dll or .exe
8 M" K5 i5 C# S1 a3 N) B1 c$ l
: x. u, Q3 a" A; f$ X C# or VB .NET:+ o$ R9 B2 @6 E) g7 d. U
NX8.5 and later:
6 y0 r. {$ k$ x4 a" j6 Z: @ signDotNet <path to your>.dll or .exe. C2 W1 Z0 m8 h7 x; D2 t Z
NX8.0 and earlier:+ c4 \, y7 n" X2 w
signLibrary <path to your>.dll or .exe3 d; W" p! k: g$ S5 y
$ {4 z( w& R) Y. S) P: D5 x
Note: You do not need to use the path to the signing utilities because the
# h4 O4 Q. ]7 A9 ZPATH of the NX Command Prompt shell already includes both the UGOpen and UGII) N6 t v8 c/ G2 P; Z4 f& w* p
folders.
6 N1 g- ]0 u+ e. w b& f% P. t
( b% L$ k8 g% w, s0 h, Z |
|