|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
% v5 c3 y: x B8 x$ v
2 V _% u' G" a; O3 a2 s, ~$ f( f) y4 ~, W' l3 L7 T- K
Once you have fully tested your NXOpen API application, you should "sign" it* o# K# x1 a, H/ x; e- z" E
before distributing it to your end users. Even if your end users also have
% I& c! B+ [ M) ]" P/ faccess to the Author license which is required to load and run an NXOpen
9 F0 j! O/ p6 [application, signing it has its benefits.
" E& B' T$ o: H# I
# e$ {" J* {- X2 q8 U |% v/ K - Your application will load faster because NX will immediately recognize
4 } H4 D. ]* i9 d2 \ that it has been signed.
, c8 b$ ~' [& _, w5 B9 c( R- j* J - The syslog (Help-> Log File) will not be cluttered with the output from4 H6 Y8 U1 }& S: j* l4 @
the multiple checks that NX will do to determine whether it can load
4 [& {$ U; U5 ]2 ^: h and run the program.6 D2 o' ]4 Y0 k: j4 A: e O9 I
# t7 ]# m; B! T( X' w
1) C/C++, C# or VB only (Java: Proceed directly to step 3)4 ]5 u$ ]+ L2 H B% c; T/ |
& [4 D0 \4 i4 X4 {$ I
Add the NXSigningResource to your Visual Studio project1 Q0 @- [/ S' _. f! t! R1 A6 O
% n1 m2 H: g9 C Y+ W. W In the Solution Explorer, select the Resource Files folder and
$ R( q2 m4 w; n- B <RMB>Add-> Existing Item4 e3 P/ X! E' h. R
% X' Q _, \1 Q8 S
C/C++:) }* p# e! c; L" `
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp( g: J6 x5 T0 F" q# I& B! U+ |
C# or VB .NET:1 {0 r8 R' U# m2 F0 Z4 s
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res( R( z# i$ C3 P. s2 v" o: M
Select the newly added NXSigningResource.res and in set
/ l' A$ f p2 p8 n# L* O, H' w Properties-> Build Action = Embedded Resource+ |) j- E/ g4 p4 `5 K8 J
7 Z3 D- o$ P4 _7 E; e& K6 Q2) Make sure the build configuration is set to Release then# F! D( [, ~. X) a
Build-> Rebuild Solution6 q4 q7 R# @, u% L7 b" g @
: Q, R* M" ?' @
3) Sign the executable from an NX Command Prompt window:! Y- k5 B, P/ f) b
You probably already have one open because you started the Visual
0 n; X3 g5 q+ U4 [! a. | Studio or Eclipse from it. Otherwise:
8 t% U6 c( w! d3 u4 M P9 E Start-> All Programs-> NX#-> NX Tools-> Command Prompt; t) _& \. @; w0 B/ N
, `" t: n1 `2 t5 N' N& P Java:
+ |8 P: A% f/ X" u' \; C signJar <path to your>.jar7 n( w: X3 a. }
, @" C' Y) x# n
C/C++:
! \% a0 E# T3 D( Z% t; v! M* T2 n0 D NX8.5 and later:
! ^ c- ^% o4 w" `2 k# V signCpp <path to your>.dll or .exe/ ~0 V3 w) e& U# ]9 t9 w! `( R
NX8.0 and earlier:$ v$ A8 D% E/ h; a* e! @( C+ ?
nxSign <path to your>.dll or .exe: F$ `, h# @. I
9 P( @4 ~: d0 p, K$ |# N3 _
C# or VB .NET:
3 ^+ Q, c/ _) U7 X+ ] NX8.5 and later:
/ R3 g1 R0 `) y- G# H J signDotNet <path to your>.dll or .exe0 p# @1 g* _# U3 x( c
NX8.0 and earlier: i4 h# K, a& D
signLibrary <path to your>.dll or .exe
. @' ^& M/ K( t) J' K6 ^
9 u6 U0 d* i A' M: }6 f) B3 ]Note: You do not need to use the path to the signing utilities because the
A- @& \/ ]0 @; i8 dPATH of the NX Command Prompt shell already includes both the UGOpen and UGII3 h% i3 n0 _" a4 p2 Z
folders.
" _4 S' p5 [* A5 t' l4 o* N. E& D+ }: y3 s- Y* k
|
|