|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, @% U+ b7 L. }+ _6 Z
9 b$ f) Q4 @; M' h2 ^ x, `0 `, ?; x- ?! {" s2 x$ k
Once you have fully tested your NXOpen API application, you should "sign" it
+ ~# H* T) j9 U: z, k, T% P0 Ubefore distributing it to your end users. Even if your end users also have
1 p; b+ ]! w) x6 ~access to the Author license which is required to load and run an NXOpen3 v0 @6 q7 r; f
application, signing it has its benefits.0 b2 u9 @1 X ?9 |% M O. Y: b( c
8 a# T' x5 [: d$ t/ B7 b
- Your application will load faster because NX will immediately recognize
' M6 j4 s9 B9 f1 }; Q0 U) ~* u that it has been signed.' I1 x2 X! I' m# Q7 U0 \. O# v1 b. I8 b
- The syslog (Help-> Log File) will not be cluttered with the output from
4 d+ n$ F6 o: L. [# U. n: L the multiple checks that NX will do to determine whether it can load
% L& q s' a/ z% K' W' _ and run the program.
6 o* b4 x5 k' ~1 [6 o+ s8 E# I @' Y$ Y
1) C/C++, C# or VB only (Java: Proceed directly to step 3)+ @' v% I7 J# c3 { f
; W$ I9 e9 w- v5 `2 S X/ z Add the NXSigningResource to your Visual Studio project
! @, b: `* j' M- _1 b4 G9 ]8 ]! _0 L9 _- D( b5 B& t1 d3 b' _
In the Solution Explorer, select the Resource Files folder and
+ U( \2 M# q: Y. `. s. I <RMB>Add-> Existing Item" B" n; {) Y* ], L% {, Q
7 H* R$ i6 r, Q9 q3 x
C/C++:
0 |7 g7 D0 }' J: G( x Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
- e# y/ p+ g! K9 g C# or VB .NET:
/ L, c2 m: h; h4 e# J5 {% s Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res7 e; E2 k3 `) }% ], w
Select the newly added NXSigningResource.res and in set
8 q( Q- {2 H- F6 b: f6 M6 m1 h* z Properties-> Build Action = Embedded Resource
9 a2 r7 ~. t- q4 w8 T
( y7 B+ y0 p4 v9 ]2) Make sure the build configuration is set to Release then
) a% r( O& S) q% V, ?6 _. y+ G, N& C Build-> Rebuild Solution# p" N% J; |9 u& \6 l, e$ t
; Q$ @( M6 J" c* E4 i$ `" q* P
3) Sign the executable from an NX Command Prompt window:
& `8 b7 a/ j' c$ V7 g) U; p! x You probably already have one open because you started the Visual# S$ D/ i, ]! f9 h) d3 v( R
Studio or Eclipse from it. Otherwise:
8 {5 i' N8 Z# S& M7 J/ w6 U8 f5 X Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 T% o& y, X5 D1 b% Z1 E
( k) m4 ]& m$ p8 L9 M Java:
0 U* ?' A* K1 @& C) F/ M signJar <path to your>.jar
4 U; h5 ~# x/ A* \* ?9 X3 S( u! g3 r, ~! B" p+ D7 \& ]" ]$ d
C/C++:1 g3 H' C4 w6 Z' }
NX8.5 and later:
# {' x) I3 J2 _9 }+ n signCpp <path to your>.dll or .exe3 V8 |( s V( j. Z
NX8.0 and earlier:
# I3 Q. \! J+ O0 p# @' w5 P nxSign <path to your>.dll or .exe0 E" Z$ W* m Z4 X: F
6 G: }* P& X1 c C# or VB .NET:$ n& [7 I9 d/ c, r# t& B8 R2 u
NX8.5 and later:
8 Y+ H2 r# n* ? signDotNet <path to your>.dll or .exe- ?0 P F8 x- m! b% d! h, k# ]
NX8.0 and earlier:! t; p/ x% h+ W1 M+ O1 e
signLibrary <path to your>.dll or .exe
; r0 W! d! Q/ \, {
/ f3 ^0 l5 S+ _# e/ BNote: You do not need to use the path to the signing utilities because the! a Z& x5 f/ f" N; h; P
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII5 n1 B4 x& K: ` d' @+ b4 X7 d" _. i
folders., u* N. X2 `, k4 a& H }8 k, d' n
; {! s8 B4 {& n% A. m7 w' m |
|