|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
) { G, v ` [- ]9 l( W: k: Y
$ e* [6 L$ E, f0 |( R% c" N E( d" E# p( a6 v
Once you have fully tested your NXOpen API application, you should "sign" it
* v9 l0 t) \% U& y% obefore distributing it to your end users. Even if your end users also have6 v6 j( Y8 C! d) g
access to the Author license which is required to load and run an NXOpen3 l: M8 F8 j" P
application, signing it has its benefits.; W3 P. e C9 [& O G4 E
2 a& Y, j! P' N D2 V j* e - Your application will load faster because NX will immediately recognize6 L9 n. M0 T% X3 j& w
that it has been signed.. }# k/ P* ~6 `7 ~( I/ h: x
- The syslog (Help-> Log File) will not be cluttered with the output from
! l" T1 ~9 ? p& |, Z5 C4 V the multiple checks that NX will do to determine whether it can load" y" x5 ?% r6 i/ U. `+ G$ U- T
and run the program." e) n- X: o1 b0 ^9 [8 q+ A
: j$ d+ i8 x, W* I" Z+ Y$ n4 R
1) C/C++, C# or VB only (Java: Proceed directly to step 3)
+ `. t) ^, P' L) f4 E$ g# I+ S9 h
Add the NXSigningResource to your Visual Studio project$ g- z* a4 T7 N+ |/ z
t5 S+ p$ }0 h+ Y9 a. I* _
In the Solution Explorer, select the Resource Files folder and
5 R/ u. F- K3 z3 F <RMB>Add-> Existing Item" N9 N4 C" M e
4 j Y9 Z" f2 @0 _ C/C++:$ o6 O) {% A9 d, e/ z
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp8 M- e4 z" \" j: V* ]
C# or VB .NET:
! x* W1 X3 J' B L Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res0 e7 e7 X8 `/ W; q; [4 R) s
Select the newly added NXSigningResource.res and in set
8 {' ]# h/ N" g( ]- P4 E Properties-> Build Action = Embedded Resource
7 P1 B' ~5 h* d5 D* `% t0 N( h0 D I* s
2) Make sure the build configuration is set to Release then$ N4 r: b& `2 H# y0 c/ ]0 U7 R T: w
Build-> Rebuild Solution; a# O2 C; y' b5 k6 S: l
" @$ c% Z( J7 A; M- [2 K% C5 _3) Sign the executable from an NX Command Prompt window:- _+ V ?2 }% M
You probably already have one open because you started the Visual) g5 Q8 N+ r* M0 a1 ~% D
Studio or Eclipse from it. Otherwise:9 y/ H1 T: s8 ]+ q+ G: }( P
Start-> All Programs-> NX#-> NX Tools-> Command Prompt
( @1 r/ T) q" T! C: j/ L6 \
1 I9 A5 x4 k. g: z0 d2 e Java:; O5 _$ E9 }6 b1 R X; ?
signJar <path to your>.jar$ o5 R3 ^" e9 I+ X* I" L. S- v* Q
9 C1 A+ N h) O1 s$ g
C/C++:- S7 v2 }7 w6 U+ t
NX8.5 and later:
1 k. Y7 x( b# w7 e* F- m- o% v signCpp <path to your>.dll or .exe
, h* X h. B- d+ N9 O `8 l4 ~ NX8.0 and earlier:
2 O- q2 b! o8 F* m5 A& j: d nxSign <path to your>.dll or .exe: X& w( I* K/ h
: k0 e# G! h! j& w: `% s
C# or VB .NET:
" `' A% {$ C- r4 P2 K# H/ X3 f$ ] NX8.5 and later:+ L1 ? R* r/ s# s4 x
signDotNet <path to your>.dll or .exe
( l& A$ y1 j4 @ NX8.0 and earlier:
2 ]& M) `; h- U9 ^, c* k9 I signLibrary <path to your>.dll or .exe* x9 q3 D! \* U& `# ]2 b
5 j8 z$ i% ~6 ]- D6 d6 o0 T7 c
Note: You do not need to use the path to the signing utilities because the" d' E* [) P9 u5 I6 q: a; A' x
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
- t! D5 X9 |) wfolders.
q) C& U: ?# G4 [/ D1 ^1 {- m( i4 n# C: x
|
|