|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
I9 ~. n/ w1 B9 s4 p
t4 a8 w) H/ D# G2 w; Y
9 U' s1 i, f9 J, d
Once you have fully tested your NXOpen API application, you should "sign" it% o! t* ]# I; I- c8 f
before distributing it to your end users. Even if your end users also have
9 J9 \- M0 ~' _/ p2 taccess to the Author license which is required to load and run an NXOpen
0 z; a! e* G/ E, r. n" f7 qapplication, signing it has its benefits.
( P7 E3 t" u- R1 A! M+ |) P! h
4 j' m+ o( Q2 o7 A# i/ e9 V - Your application will load faster because NX will immediately recognize
* r; l3 u5 {5 R0 ]- ~4 _ that it has been signed.
% U! |) D8 E' C# I - The syslog (Help-> Log File) will not be cluttered with the output from
4 o, j8 P) V- S- ~4 f! A/ M the multiple checks that NX will do to determine whether it can load
' N9 f) T% t7 x% g and run the program.
5 n8 c+ W0 m3 @0 F3 ?4 H! I. {! w
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
0 f1 j9 {4 x, M2 ~9 d
2 ~) M) n. n/ ]7 v& I Add the NXSigningResource to your Visual Studio project: [0 h8 G- L5 g% D4 r0 t9 X
- l% A9 c( I$ c* g$ a
In the Solution Explorer, select the Resource Files folder and! Q4 [& Z# ~. `) _; |% q
<RMB>Add-> Existing Item, [1 J4 U( f+ X0 j
5 l/ f. X+ B ]9 t! q; z
C/C++:* p- |' r/ t5 M+ l) [+ t
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp. V1 v+ q( I) Z# A3 _- @8 f# @& {
C# or VB .NET:
z5 _& x4 Z- P2 Z Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res. ~3 K5 R% q6 Z0 w& a# I- `
Select the newly added NXSigningResource.res and in set+ f4 u" d" ~ [. H1 {- p
Properties-> Build Action = Embedded Resource: E8 X6 ~3 f+ A) _$ p1 p
( A: J: h) N' h. A2 t
2) Make sure the build configuration is set to Release then% V; \6 G' @. o8 Z: \2 C
Build-> Rebuild Solution3 ]& F- M8 e* _& D
+ Y( X3 a. s# Y) f8 t" I0 |
3) Sign the executable from an NX Command Prompt window:5 a [1 _, B: v9 w
You probably already have one open because you started the Visual
4 `( c3 I7 o+ R! R5 g8 k7 M+ ~ Studio or Eclipse from it. Otherwise:1 C" T8 x% H2 U6 L" b6 o$ W
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
, y3 V+ u# Z& p: e8 T: d7 ?9 d
0 _7 W- O' o! u: S3 u: z Java:1 Q: q, i" |& @2 j
signJar <path to your>.jar
& e, i* R# v- E4 n2 {
9 r U0 P/ Z/ l8 Y9 e; C C/C++:: P5 `+ U5 @/ z% C
NX8.5 and later:( Z1 J6 G( E7 g3 O
signCpp <path to your>.dll or .exe6 {$ O) M+ J; z w
NX8.0 and earlier:
/ q, L2 b+ n, @* f6 \- e nxSign <path to your>.dll or .exe" l8 C3 _$ z/ j% j H
8 l; u u S8 W3 p
C# or VB .NET:: {# F b7 j/ z# z M
NX8.5 and later:/ G1 H, W( E- G w4 I. ~- `& v
signDotNet <path to your>.dll or .exe8 J5 E9 d: j. m1 B/ X- t `" P; K& G' L/ K
NX8.0 and earlier:
y! Y: D1 v; v7 c# x7 v signLibrary <path to your>.dll or .exe
J9 s. ^/ H x% V; u; r
% s" m4 M2 [0 \' WNote: You do not need to use the path to the signing utilities because the
+ E( }% s5 j5 M+ p9 e* z! ~0 ~PATH of the NX Command Prompt shell already includes both the UGOpen and UGII; g3 W4 C" }# d9 Z
folders./ x9 L6 u4 k3 j% R; r# s
, n- K/ H4 E5 [3 A# C9 ]2 K |
|