|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
: ^' o$ C# P& W/ H( U% c
7 r$ {. W9 A2 L
, N: n2 j* h- D. fOnce you have fully tested your NXOpen API application, you should "sign" it
* H2 K, V, l8 g. a3 Z# |before distributing it to your end users. Even if your end users also have- D9 M Y. O! c5 H1 j$ L4 q
access to the Author license which is required to load and run an NXOpen
z, i2 {: @6 v% eapplication, signing it has its benefits.
$ [2 C1 Y m, J# \4 O/ ]) Z- @- C: e' A' R- z' i: \4 w
- Your application will load faster because NX will immediately recognize
7 |! G+ G6 N- T: c- L that it has been signed. R% t3 i# T( ^) Y1 ~$ ^
- The syslog (Help-> Log File) will not be cluttered with the output from. L7 G; j+ c1 p% j
the multiple checks that NX will do to determine whether it can load: y7 H# ]3 }+ g) f
and run the program.
' q, j+ E/ \% }) X& Z' y
" n- Y% I8 V- \8 O0 w5 F/ O1) C/C++, C# or VB only (Java: Proceed directly to step 3)* F4 T6 W' Z; q* _' f
. ?5 J. K; j% l, i7 W% i" h
Add the NXSigningResource to your Visual Studio project
! g/ g$ [& ~5 ~. D9 p2 e3 T
6 O% e; Z3 B0 L8 v8 L2 r In the Solution Explorer, select the Resource Files folder and
# @) }) a, C- t" O <RMB>Add-> Existing Item
5 k: l5 \7 G+ @4 c) ]
1 Z! u2 q/ F9 y! V/ ]9 S' n N C/C++:' ]& q& l/ ]8 @; U5 {% s2 z7 U
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp1 @& E/ A4 U' D; V z. F, F
C# or VB .NET: J; G: K2 S# d5 _, X- _6 Q
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
( E% r5 T9 J) g ?$ |* \) f9 l9 J Select the newly added NXSigningResource.res and in set
1 d" D y" H: G0 Y* m9 N Properties-> Build Action = Embedded Resource' S; @9 L/ D% |$ f; U5 |) h
0 `& \3 M1 j, G# \# M6 J
2) Make sure the build configuration is set to Release then" j5 y f0 D( y r5 ]+ N) R
Build-> Rebuild Solution0 J9 d% q; {7 `; ]
, O' c8 N7 U. T( _2 ]3) Sign the executable from an NX Command Prompt window:
6 q1 U% D1 P2 C4 N* T' T You probably already have one open because you started the Visual
$ n% p8 J; v" m/ i" ] Studio or Eclipse from it. Otherwise:
1 m2 K6 X# a; h8 i' e Start-> All Programs-> NX#-> NX Tools-> Command Prompt
/ f# b5 e& y6 F# U, F6 P
2 G8 z9 q- S4 I: I5 F Java:
9 O ]/ L6 M0 U signJar <path to your>.jar
& ]7 k6 e- M" e( n) P* |; C/ z0 L3 A% a
C/C++:
1 F5 V( N. q. Y2 [% p% f5 x NX8.5 and later:
2 a; S- U9 t/ U& a* ~1 [, L signCpp <path to your>.dll or .exe z D/ B5 s% ?5 k
NX8.0 and earlier:
- \- U" p- {4 k nxSign <path to your>.dll or .exe
8 g/ Y% d0 m. r0 ^
7 y4 x$ K" t# H6 T: a C# or VB .NET:
1 \9 Y3 Z! ]& b+ x NX8.5 and later:" H( g, J0 O* z7 M- ?7 s! h# V1 f
signDotNet <path to your>.dll or .exe
2 c, w* B0 D) l8 F NX8.0 and earlier:
V3 i0 ~7 \0 t2 Y+ y signLibrary <path to your>.dll or .exe) l& P! b, v: }# L
. J. p& t. I1 B+ `3 B) n: S% X
Note: You do not need to use the path to the signing utilities because the
7 R" q3 i2 \$ N5 G, s' BPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
X+ b$ q& p0 r% Z7 j! R; T! dfolders.
) {% c3 V- z* L7 r0 Y( j( c4 P6 `9 _; Y, f' d
|
|