|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 R! U# j& f: V+ O' n4 l
/ g6 h1 f& Z( j( k+ i) `" V9 c
! D2 Z4 O. W; GOnce you have fully tested your NXOpen API application, you should "sign" it
0 {) p- Y' k: | q- t6 L$ sbefore distributing it to your end users. Even if your end users also have' o2 ?; K0 \% t9 `
access to the Author license which is required to load and run an NXOpen0 ]) A+ ^+ B. H
application, signing it has its benefits.
( R2 I/ t' \: |3 |& ~3 e _% J, t( g O3 g! q& `$ I0 Y3 S
- Your application will load faster because NX will immediately recognize% Y, h7 c& Z- x: L
that it has been signed.' y2 L2 E# i9 T3 ]" O' w( y6 F7 ?
- The syslog (Help-> Log File) will not be cluttered with the output from' ~$ }0 d* l) N# a+ n
the multiple checks that NX will do to determine whether it can load
, J2 i# T+ _9 a" Y8 O3 k and run the program., o; ~4 S" W( i5 a1 ]+ Q( C
# V& k1 r+ s4 k& M, u
1) C/C++, C# or VB only (Java: Proceed directly to step 3)! Y( B- K4 K1 M" e' }
! j; G" _/ g' M' V( c) v
Add the NXSigningResource to your Visual Studio project9 H4 C2 \. @( _$ ?# h) v' P
8 s$ k: V2 U4 T. x. F+ U In the Solution Explorer, select the Resource Files folder and% G& s6 e7 \6 m5 {/ p+ Z
<RMB>Add-> Existing Item* \! @; E8 l- Q& O) e
$ R8 F E9 `) X8 B4 o C/C++:3 l, O* p H1 I- s( v
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp7 f7 P! H5 R4 E
C# or VB .NET:
/ g4 ]+ a' m0 T! v2 w9 ?3 e Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
% ^$ n% i) T! } Select the newly added NXSigningResource.res and in set; j0 X( B' w/ z: q- L6 I2 F
Properties-> Build Action = Embedded Resource
+ U) h a; |& W& \. A' |& s; N: G) R) I2 L1 l9 \
2) Make sure the build configuration is set to Release then
2 F9 m' r7 A4 d: u8 C Build-> Rebuild Solution
) b; q4 A- M/ B- G$ \
4 y% }3 N- G% { A1 ~4 [3) Sign the executable from an NX Command Prompt window:
8 Y; g+ ^. `9 x2 _: N You probably already have one open because you started the Visual) s3 _/ M8 a/ N9 p% L# n
Studio or Eclipse from it. Otherwise:
, m0 c$ e% ]! O( W' r% _ Start-> All Programs-> NX#-> NX Tools-> Command Prompt" L) L+ E5 Q" D9 S- p h
. z2 |: }$ Z& z
Java:
1 }2 `( N% N! ?* S" S/ ^7 i. w signJar <path to your>.jar5 i5 r2 X/ }# U1 _/ z! v
0 A" K0 h& _ u9 ? C/C++:' k7 K1 K8 l k" P# A& Y1 k; ^
NX8.5 and later:9 @4 T% B5 R% N2 `8 D3 |
signCpp <path to your>.dll or .exe, w' i; w* d: F3 ^$ Q- D
NX8.0 and earlier:- ?4 ^- P3 y8 w( [0 `9 J
nxSign <path to your>.dll or .exe1 Z2 K+ u% [6 D% q+ m* }6 Y
8 m1 t& ]; I; K4 C. E# Q* ]% m) S C# or VB .NET:+ r2 E/ f, B6 p0 ?2 V5 P
NX8.5 and later:
0 u% a8 `* y; R' u* V' j1 W signDotNet <path to your>.dll or .exe
8 p! ` a5 \1 u/ [' _7 N4 C NX8.0 and earlier:, S( T) x$ h u7 `5 ?% F
signLibrary <path to your>.dll or .exe. V! O* f5 M- Q" p- h; A, _
, D' B* ^) Q, Y! {% Q i& Z# Z3 {
Note: You do not need to use the path to the signing utilities because the6 u* w6 d+ ?0 x8 U* f9 Y9 e
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
3 v$ S* y2 N9 W2 b2 r, {4 Xfolders." e" N( s4 ]: C) R- M$ J- _% |
! k3 N1 d' a* G4 ~ |
|