|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
( y; g" ~6 ]) j7 W% h6 ?/ k# q: w' e
6 ^6 T$ s4 j8 |! Y- Y6 N7 w. s1 ]" D1 B0 @2 T4 C( ^+ R+ U9 r
Once you have fully tested your NXOpen API application, you should "sign" it! j+ ^$ [# L7 H/ L0 p' S
before distributing it to your end users. Even if your end users also have
+ e& p1 P# ~, u* t1 k9 iaccess to the Author license which is required to load and run an NXOpen
8 f3 t# v3 S7 d0 j# Napplication, signing it has its benefits.; B6 T! Y2 w# q7 s! L* {1 i1 m6 y0 B
/ Z8 L% b' u9 p/ D, u; Y
- Your application will load faster because NX will immediately recognize
/ [0 x+ J$ S5 X& |) K that it has been signed.
' V6 u$ p( ?& o9 H - The syslog (Help-> Log File) will not be cluttered with the output from
) A% r" |/ ?! U+ i' t the multiple checks that NX will do to determine whether it can load) U5 i' @' h! t
and run the program." M2 [' g7 |3 f
/ O4 ~# O( ~3 I: f% U2 v8 @
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
8 h' N$ b# `: I# u$ A- g' z2 W, q7 {; [' T1 B& K" U1 [: ?
Add the NXSigningResource to your Visual Studio project
0 v- }' R* M1 Z( d
) z/ Y, `0 }: k: O" ? In the Solution Explorer, select the Resource Files folder and
: t, G& F% E. d+ a- M& e; b <RMB>Add-> Existing Item
. M, ?- g- p4 m; w B: l' a* P4 U" l3 \# d; `1 ]7 s' A( B5 }
C/C++:& {" v6 D# H8 `) S6 s) C
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp9 B( f3 A( p- {1 ~; f# U& U4 `% d: T9 M
C# or VB .NET:
$ M" I Q% k+ l0 Z Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
3 z3 n" i9 P& J7 Q$ R [ Select the newly added NXSigningResource.res and in set
6 e1 x& H9 p6 e) y' ]( u e% ^) p2 a U Properties-> Build Action = Embedded Resource- M4 B& @) D9 J S0 E$ i! p
; ~. j. B0 @3 j" G ^& N3 V
2) Make sure the build configuration is set to Release then
0 @( }: d! |4 d V7 I Build-> Rebuild Solution9 O: ?& I0 f" h: R& c2 U7 j6 A* v
" w% B! c% r. ]" ^
3) Sign the executable from an NX Command Prompt window:
# f! |5 x% }7 ]2 ?/ q) t& O You probably already have one open because you started the Visual- L$ f$ u# X) |# W4 V( w( s: w" Y
Studio or Eclipse from it. Otherwise:# {) n {+ z; V
Start-> All Programs-> NX#-> NX Tools-> Command Prompt w2 t# }5 z" g
0 |" i' I% h, G# B Java:
$ V' S* p8 o0 p1 H1 `: \ | signJar <path to your>.jar
/ a9 A' @% F2 W" f6 w4 ]$ E, b, {: G8 w
C/C++:
( C+ _3 u k0 T( N% e" y NX8.5 and later:
D% [8 E& h8 j; I8 z& s signCpp <path to your>.dll or .exe3 W o) J1 h j
NX8.0 and earlier:+ m( }8 r/ p4 e1 X
nxSign <path to your>.dll or .exe$ B* l, Z/ d8 A* W3 z5 ~; r- G% k7 p
& P5 I, z8 y6 _8 T) b1 e+ } C# or VB .NET:
1 ^. q2 N/ M) K4 B3 @( U M NX8.5 and later: S. y% T" c- ~3 ~4 K2 [
signDotNet <path to your>.dll or .exe6 _9 N/ e6 H" {
NX8.0 and earlier:: f. w: t. j3 u' t
signLibrary <path to your>.dll or .exe5 c! s) r. O; A
3 M) T. }* ?' I+ L6 s9 W) O9 s) _
Note: You do not need to use the path to the signing utilities because the# j. {+ |: U' ~6 Q! y/ F% ?& }$ F
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII# B. c- |, D( Y3 f1 G5 t6 w
folders.
$ I" G' Z% {5 Q4 Q; o0 T7 a3 b) ]# Y8 o' ^) J: r6 |$ w" G
|
|