|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 m6 O- \8 t: w) P5 d D) x
/ ?0 z0 ]( W$ S0 }8 R0 R7 S4 v
2 G/ g C% m4 Y7 x: Q, LOnce you have fully tested your NXOpen API application, you should "sign" it
4 ]3 n8 g: o. w+ t# Wbefore distributing it to your end users. Even if your end users also have' O" D& t0 F+ c( N# p. u
access to the Author license which is required to load and run an NXOpen3 L0 u: w8 Z. N- y, Z
application, signing it has its benefits.
p0 o" ~" D# v1 y. P2 w* [( Q4 Y( S6 @1 S' G
- Your application will load faster because NX will immediately recognize
4 Y+ E8 R: Y# u7 n* E! f, P% K; k that it has been signed.
) m, ]; ?. S5 V! S - The syslog (Help-> Log File) will not be cluttered with the output from
3 b9 b2 a6 ?& k the multiple checks that NX will do to determine whether it can load
, u3 H# u) F/ D" j1 P0 s0 T and run the program.6 ~: q1 B9 b9 @' e
2 U! d1 [' ~6 A% s$ K! w) G1) C/C++, C# or VB only (Java: Proceed directly to step 3)# N4 I8 S' c9 E, s! x
0 \, H' ]) y% Z9 p( U9 E6 x: K
Add the NXSigningResource to your Visual Studio project$ j# {3 |( T% D& B0 L: ~+ T8 H& i
& t" x; i! ~5 a, ^( u
In the Solution Explorer, select the Resource Files folder and
. u# ^9 h' o' i" o* x <RMB>Add-> Existing Item
; v$ t: \6 a" ]7 q1 M& n' c# a- n. x3 l4 a$ G
C/C++:
' P" ], |) r" \ }+ V# a" L* ~) ] Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp/ [+ Y. U. A8 ]# C' x# o* F
C# or VB .NET:& p3 f/ s1 R' K1 @9 P; S( Y
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
( d0 p3 h& \3 W1 Z Select the newly added NXSigningResource.res and in set
2 Y: P# F8 y( {/ G ~ Properties-> Build Action = Embedded Resource% o, P3 P) B$ T" s! c5 |3 n
' |" |+ a! F- ~% y9 v% S; Z
2) Make sure the build configuration is set to Release then
, [; W& m# ~4 C1 v2 g Build-> Rebuild Solution
0 c0 W, y' o6 k4 o" X1 d+ p$ A6 f2 t3 f* m! X) \/ {
3) Sign the executable from an NX Command Prompt window:7 d- w+ H8 r# q2 r) S
You probably already have one open because you started the Visual
6 r& ~- A; d. |1 N) n. r1 D: L Studio or Eclipse from it. Otherwise:" s2 h2 e5 }& `; K0 W: d) ~
Start-> All Programs-> NX#-> NX Tools-> Command Prompt g" B+ {1 Q( D' w& s0 Z
4 i* y" V. B, q& Q Java:. r; X m5 D8 n6 T$ D+ Q
signJar <path to your>.jar
. ^/ M: N# i3 c9 v- m0 h! \3 v t3 g
C/C++:; S/ T1 r- H3 C( a% O" d* n# g
NX8.5 and later:6 d" d# j6 F3 X3 g+ a0 K9 I
signCpp <path to your>.dll or .exe
8 X( Y$ U! R- x+ J NX8.0 and earlier:1 \: u/ V& C+ \+ I
nxSign <path to your>.dll or .exe
+ Y8 e1 l. R7 B+ T8 K( s
7 v/ C) a1 c: a3 m2 B0 @ C# or VB .NET:
# j" G4 }- L2 [5 L2 I) R NX8.5 and later:
% {/ P$ C9 r; T. j8 |8 F+ v4 {) W1 n! } signDotNet <path to your>.dll or .exe
# r0 o, ?; H; |4 W, x; B0 V2 I NX8.0 and earlier:
. J i, E c8 D9 v. [4 h signLibrary <path to your>.dll or .exe
- x3 t" M4 B' R; u) i; I: ~+ |0 l4 W$ u l! \
Note: You do not need to use the path to the signing utilities because the2 J, [$ F& E2 C: P
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
; ?: Z' y6 `& s8 I. e) dfolders.
* }- X; X9 R' S+ Z" S8 f5 w- Z3 K- ^8 A% v! d* G6 p
|
|