|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
8 M! f( _! ~1 Z. S
1 S3 U! i1 v$ b' @/ q
6 X6 w3 L* M' K \+ G5 zOnce you have fully tested your NXOpen API application, you should "sign" it
( U) p' [* p$ F1 E' c9 Pbefore distributing it to your end users. Even if your end users also have' r5 q" Q, ~9 p2 t: o: g4 @
access to the Author license which is required to load and run an NXOpen
, o2 S. _! {& I) L- capplication, signing it has its benefits.
, {" o q" a$ v7 q
- F( F% F' X" P- n/ Z/ o+ R3 x - Your application will load faster because NX will immediately recognize& S5 e. T7 D+ i
that it has been signed.* G8 c0 o+ @! o, N: A4 R+ v
- The syslog (Help-> Log File) will not be cluttered with the output from
& \0 }5 U- y4 T% p; K+ o2 a the multiple checks that NX will do to determine whether it can load
3 L$ j4 v5 b. R2 x, c) x7 B and run the program.& O+ ?4 p! i5 O+ L9 z/ U
, Z: T+ [1 p& n- }! S; u7 |
1) C/C++, C# or VB only (Java: Proceed directly to step 3)/ A) Z3 }7 H5 P9 I6 v s" ~
3 W# [- ?. K" I7 `$ k9 M
Add the NXSigningResource to your Visual Studio project
% v! g9 F( U& j& z5 m1 Y4 l) W
8 V% M# u; B- \0 ` In the Solution Explorer, select the Resource Files folder and
8 t: O/ s2 R. v <RMB>Add-> Existing Item* K4 v4 P! @+ v( \" k* o5 s$ y
% q3 V X( F' ?2 e3 \
C/C++:
8 ~, ~( t; l+ B4 m7 \ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp) B2 N8 `1 z8 \ E. U
C# or VB .NET:5 D. U2 z1 Z, f5 s1 S
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res$ J1 \1 t& l, @* T, a+ t2 u( V
Select the newly added NXSigningResource.res and in set
: Z; y' d! k3 l Properties-> Build Action = Embedded Resource
% \& v6 d& @) b# N' @' s2 `1 A
2 M2 n6 T6 r& F2) Make sure the build configuration is set to Release then5 b/ K2 B# ]. f- [" y9 b0 j7 I
Build-> Rebuild Solution( ]8 S8 x# t, Z* `/ }
9 U6 J6 \" W8 _8 D4 ~: q1 R+ @/ r$ ]3) Sign the executable from an NX Command Prompt window:7 T- L) c5 Z2 {
You probably already have one open because you started the Visual
9 M/ j# }2 z7 {+ ? Studio or Eclipse from it. Otherwise:/ A) w6 `7 V# R# ~; }
Start-> All Programs-> NX#-> NX Tools-> Command Prompt( {2 V! R) _- v" I/ Y2 U% L
: m4 L& X. i B% |& R2 N
Java:
+ {4 T" @; S1 T0 Z signJar <path to your>.jar
0 f% [! w5 |) @" ~5 V2 D6 {# X* R% ]5 x# o5 C9 d
C/C++:
: A' c# D1 u/ [; K" f NX8.5 and later:
* ?$ M8 J; h0 m8 t signCpp <path to your>.dll or .exe: `8 K% t- K" y2 B, z( i8 f
NX8.0 and earlier:1 @ k8 l3 U2 s
nxSign <path to your>.dll or .exe: F8 p$ `6 V$ y
/ q' Q+ l2 ^) m$ G
C# or VB .NET:" z" Z; @" l/ R$ `! G0 W! r
NX8.5 and later:5 e* l8 }1 d0 e% `$ }' Y
signDotNet <path to your>.dll or .exe0 w+ D9 k: G# \& V
NX8.0 and earlier:) H2 \9 f- V0 I/ b* o
signLibrary <path to your>.dll or .exe
4 N. P/ U J; _# J, Q
: V Z/ e& }# xNote: You do not need to use the path to the signing utilities because the ^5 s& Z% Z+ x* I$ W& @
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII; M* \7 S0 J/ ` w# G
folders.' y# o3 b% [" ^1 V! }
9 U: ~1 L _( L# i: A+ Z6 G8 ^ |
|