|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
) R S9 k7 h. ~) E" ?/ ^/ S
Y# M7 p+ s6 v2 N
0 z6 S/ x4 q- |! @$ ~( [Once you have fully tested your NXOpen API application, you should "sign" it) ]9 D$ M( c% h, r' S$ {& P6 v
before distributing it to your end users. Even if your end users also have
/ P4 i, e' T1 faccess to the Author license which is required to load and run an NXOpen% e2 B4 l" @+ D4 P9 g \2 n" P
application, signing it has its benefits.4 C4 Y: \; Y% L: Q$ m
# r5 _7 P( B2 u+ Q
- Your application will load faster because NX will immediately recognize
6 O* P0 t! l/ U- e9 x( I that it has been signed.
6 G: Y( l0 U. U* ~$ ~ - The syslog (Help-> Log File) will not be cluttered with the output from% x5 j [& d- M% R9 a
the multiple checks that NX will do to determine whether it can load! _# j$ R( j) Q
and run the program.% u, J9 I& b X) B- F. a! r- @6 |
8 m. Z9 y z1 Q3 p- Z: s) g' `, z) k4 M
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
- c0 ^+ i- k4 T' e
5 F3 A9 A6 R* y& ^ Add the NXSigningResource to your Visual Studio project9 T9 }7 L. L+ d A: g1 l
# }& s+ T, p. K7 T+ d' P9 q. q
In the Solution Explorer, select the Resource Files folder and
( [3 t) c" b* g' Q1 \* M <RMB>Add-> Existing Item
. p N9 S% I# I% C: P0 g ^. |8 I5 z, v2 C9 i s
C/C++:
0 X4 f8 m, t) }7 e Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
- M5 D; O( M9 Z$ p& M% W C# or VB .NET: U8 K( [; I3 t8 q8 A& v4 V
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
$ K; f9 j; o+ ~' H8 b& ? Select the newly added NXSigningResource.res and in set8 {' L1 R4 y4 C( q5 h
Properties-> Build Action = Embedded Resource1 x t7 G h; u- @* u9 M
: q; B# F, H/ k) j e7 b2) Make sure the build configuration is set to Release then$ N. q9 F' U! q- i& N- J
Build-> Rebuild Solution
3 X% e8 U' T6 J1 w1 {! n! c N8 q
i2 X1 U7 m5 T6 B3) Sign the executable from an NX Command Prompt window:
( s. \5 \- p2 e# u5 X( r You probably already have one open because you started the Visual
, ~2 a) S8 d2 n% `+ n4 X1 J# _" ^ Studio or Eclipse from it. Otherwise:4 J- v3 e, P E$ _9 i
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
6 N: i& r' e3 F0 S$ U3 y. g0 ?1 }4 q+ o0 ~* d; t) P1 W4 q: H
Java:! A' q! `- s8 @2 \- n3 a8 f' |
signJar <path to your>.jar
& A1 x" z, v$ [" p' ^7 o, Q) a: g0 n9 }* y, G% D
C/C++:6 l" r h* ]0 w( V
NX8.5 and later:+ u0 W4 ~# V" O1 A9 m6 `
signCpp <path to your>.dll or .exe6 `. T5 F% q5 c5 ~9 s9 _2 G9 ]
NX8.0 and earlier:
% g6 |8 e8 o$ i) a; G+ R D% s nxSign <path to your>.dll or .exe
$ r$ O5 T u. p. d' R
2 A3 w, B( L5 ?" A1 O/ r* N C# or VB .NET:* }7 H6 R4 a) Y o |7 L* U
NX8.5 and later:+ ~0 |, p2 X* S/ J* {
signDotNet <path to your>.dll or .exe
. \! R1 U) B- d; R) X: ~# D NX8.0 and earlier:
; K8 W% d% `# n, |/ | signLibrary <path to your>.dll or .exe
2 S4 c* D! }$ }( e3 K5 |2 A. X5 c+ B2 H
Note: You do not need to use the path to the signing utilities because the- {+ W9 `' z* Y6 w
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII F/ ?4 ^$ K% J; g0 b L! J* P
folders.5 ~+ u& i! y9 P5 K
% @% J- X0 V, ]$ G0 Z4 l
|
|