|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
/ H# A$ `! U; e
/ w6 F4 h i8 e! S |: L" c
# Q# l8 |7 v; X; U& nOnce you have fully tested your NXOpen API application, you should "sign" it
( ~: D! J5 b: }1 sbefore distributing it to your end users. Even if your end users also have, I4 C5 t7 q! H+ e
access to the Author license which is required to load and run an NXOpen
! k6 r2 c& T* [5 f0 d' Rapplication, signing it has its benefits.
6 N! }) A% f1 R( A+ _
; h4 v* E/ J' c$ i5 v - Your application will load faster because NX will immediately recognize" G, L. Z( B4 a& B5 o4 V
that it has been signed.1 b1 L# I8 c4 H/ z
- The syslog (Help-> Log File) will not be cluttered with the output from
& B. b5 D U3 Y9 ]/ T the multiple checks that NX will do to determine whether it can load
& ` s) S! \- ?. w9 k and run the program.& {1 i+ v' n1 ?3 M v% u! }
* m* W8 {6 h% y" S' I. n/ {1) C/C++, C# or VB only (Java: Proceed directly to step 3)% B# {* I- E( b4 K. F3 z% t
5 n8 w2 o& ~/ ]
Add the NXSigningResource to your Visual Studio project
/ ~4 N. K: B3 j6 V/ L5 q3 ]0 p8 q' e+ C8 {7 L3 s
In the Solution Explorer, select the Resource Files folder and
/ C" r% J q' V- @ <RMB>Add-> Existing Item5 m6 i- t- v2 w, _' Z" u
6 q9 Q4 A7 G# u/ E( j, \
C/C++:+ f1 E6 b- _+ x4 Z( i0 _3 A, o# T @% Q
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp' g8 f) r& X) _0 _
C# or VB .NET:
5 J0 i9 F2 X$ l6 Z0 ]: B Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res, t y q& {$ J0 t6 Q2 S& p5 _8 [
Select the newly added NXSigningResource.res and in set
1 u1 J0 C7 y8 z Properties-> Build Action = Embedded Resource
) w# g# I( T1 e, T3 ]+ d5 e% p
" w- U# {2 b; t6 e9 S0 m/ {2) Make sure the build configuration is set to Release then5 U1 b: T" \0 B1 r4 b) I
Build-> Rebuild Solution
7 z; W, H. F* e9 j+ `8 N0 T3 [9 [! p f5 Z" M0 ?& T' A! q
3) Sign the executable from an NX Command Prompt window:/ D) a1 k1 K4 R5 ]0 n3 u
You probably already have one open because you started the Visual' w: S3 Q( k1 ^8 u
Studio or Eclipse from it. Otherwise:& F1 X C4 k8 h! A
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
b- }" R( \. e7 v* m" E' O9 F1 ^9 t/ D+ G {
Java:
+ j1 m/ l, b9 p& F signJar <path to your>.jar
/ k H4 [0 O' o/ v W6 ~* R2 Y8 R" w1 A- x
C/C++:
, U- T* N4 j( p- G3 X% s NX8.5 and later:
8 B0 w* Q7 j1 {* x: t& h+ b signCpp <path to your>.dll or .exe0 A; |# `% ?3 T/ Q- _0 g2 v. W: I
NX8.0 and earlier:$ D4 ]! \% X7 B8 Q( Q8 v% `
nxSign <path to your>.dll or .exe
" m) [9 L. v) e6 \9 _% u5 C6 T5 H6 k8 C/ G8 l$ V( E
C# or VB .NET:! L+ Z8 O; D2 V! O1 c
NX8.5 and later:- g X$ U; j! x5 b4 ]' j
signDotNet <path to your>.dll or .exe: y$ g0 z f1 B. @; i1 o8 J9 }
NX8.0 and earlier:8 e' n* O* E: I: q5 U( H+ H
signLibrary <path to your>.dll or .exe
W0 d& C% y) N1 K8 b( u3 K
V( I3 b- d# tNote: You do not need to use the path to the signing utilities because the
# t$ H. E. P5 k9 j; ^PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
9 ~/ j% B2 E3 y! I$ R/ Ifolders.1 r5 ^6 l) w2 C6 R1 M; F
7 f6 ?+ ~3 X& N/ @" h4 X' ]% k |
|