|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
+ t7 l4 Y' \9 k% M/ v5 i) r3 h4 g' S6 N; G! }+ U
7 G% x% B' ]5 j$ S0 \# @
Once you have fully tested your NXOpen API application, you should "sign" it
& |5 } j, v* I7 `, b0 g8 y( y) Tbefore distributing it to your end users. Even if your end users also have
1 H% Z \5 o1 Q. haccess to the Author license which is required to load and run an NXOpen* t. p b" H, @# o
application, signing it has its benefits.
# S" b% f' A }1 B% T) v3 K( G/ s" U+ G2 z4 W7 ]8 o
- Your application will load faster because NX will immediately recognize
- n1 V$ m( b' K5 c, {+ h O that it has been signed.
3 K' R" ]: h1 T9 m; X# H- x* J - The syslog (Help-> Log File) will not be cluttered with the output from7 @0 P- ~& `% ^# p6 F" ?
the multiple checks that NX will do to determine whether it can load
8 H9 D0 O: p6 Y8 r. V& E and run the program.! Z% `; s* x! ^0 X3 ^' v3 g1 w6 p
* X9 X( \1 H$ z# g" t( S
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
3 T$ [8 V$ z9 t
; u% b' Z+ ]% Z2 s Add the NXSigningResource to your Visual Studio project
* B; R0 M2 m5 [, ~0 I8 r1 x. D2 u- h: w7 Z9 o- @
In the Solution Explorer, select the Resource Files folder and# s/ }# j$ y: D3 ^
<RMB>Add-> Existing Item' ]8 ` C4 `8 n$ q/ f
2 w) c) o7 h& ~: H
C/C++:
) l& j- |: _6 s6 _ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
0 z: z& p& O H' i+ M2 ~ C# or VB .NET:: u( S ]& n. v5 O: @
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; e/ |) x3 I$ G& i8 b" O9 |9 H' m Select the newly added NXSigningResource.res and in set
" d. \& W" o) ~/ @- K8 j Properties-> Build Action = Embedded Resource3 a# y. M) f+ H3 C& T
9 R8 n) b& K$ \- j
2) Make sure the build configuration is set to Release then2 y! c6 j) x6 z: ^4 D: b( U! I$ U7 T
Build-> Rebuild Solution
. X, V7 w2 u& Q. ~
* a2 m) j$ A' } K+ {3) Sign the executable from an NX Command Prompt window:
4 C' l5 J1 X% G9 ? You probably already have one open because you started the Visual
4 j, `- _! k6 t: d% q4 k( A Studio or Eclipse from it. Otherwise:; L3 ?2 A0 W( ~# z" I: S) h& h
Start-> All Programs-> NX#-> NX Tools-> Command Prompt- o+ R- R, I n1 T& t6 E$ x
+ C. X7 ?5 t1 f/ l
Java:
7 z; N3 G a* u signJar <path to your>.jar# T# Q2 D% ~2 p/ x% _
( E6 r$ D f: x: r6 ~# |8 ?% ~
C/C++:, M* ?& B# y/ o9 N$ [
NX8.5 and later:2 }7 V% Y- h( \
signCpp <path to your>.dll or .exe
) p" d& R B) O* W! {! v9 |+ ^ NX8.0 and earlier:" s1 e5 K! F& B, i: v
nxSign <path to your>.dll or .exe( C: [, {) [+ X3 R
+ H, f4 [- w. e+ [% n) d& e* w1 j
C# or VB .NET:
; Y/ r" Q! N4 ?5 J" U6 \ NX8.5 and later:$ F% b- Y3 r& T" ?! @, `6 P8 e6 {
signDotNet <path to your>.dll or .exe \9 |* ^; ^! ]& a! _, d
NX8.0 and earlier:! z/ @8 ?( X8 s' }
signLibrary <path to your>.dll or .exe+ V+ D( ^8 ^' ?) H# [2 c' n( f1 j
9 W: k6 M. e8 J. y$ o+ ANote: You do not need to use the path to the signing utilities because the4 @9 F! W# p5 ~6 ], H: }' p
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII% k! d. R$ ?3 @' y4 Q
folders.
- ]% x+ P0 {5 a- U% ]/ g' d' Z* J) m; O" J8 Q; Y% T
|
|