|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
t. T2 m: O- W3 o3 `6 w0 u$ {4 Y8 \* W5 u2 P. X' o) U
% w' @$ q! q3 q) \8 D$ bOnce you have fully tested your NXOpen API application, you should "sign" it
# i- a3 m. W: I- ]; kbefore distributing it to your end users. Even if your end users also have
; w/ N% S, l' T) c! \7 Paccess to the Author license which is required to load and run an NXOpen
4 U- Y/ |7 r# U; [. b |: Lapplication, signing it has its benefits.
4 g' N5 J* K, A# T& R% J) A+ t
# G- U( K" z+ J& s3 F% L - Your application will load faster because NX will immediately recognize/ a! u6 A5 m c7 R
that it has been signed./ x/ U; [$ ~- i( \' R5 }' `' S
- The syslog (Help-> Log File) will not be cluttered with the output from; u4 T" s+ B7 O- ~3 c ^" o
the multiple checks that NX will do to determine whether it can load+ ^ W1 W4 K( M9 T2 r
and run the program.0 y9 [1 G! T) t$ l" c; U) [
! A2 n+ G) a2 v8 n3 q1 ^1) C/C++, C# or VB only (Java: Proceed directly to step 3)
5 U& u" ]4 v" {0 m9 w/ `1 \5 R6 X
0 Q7 d9 v' w# n Add the NXSigningResource to your Visual Studio project8 E9 t* o5 ]* r
4 N) G& q2 K0 i% b8 k; P, `/ P
In the Solution Explorer, select the Resource Files folder and. H! A: e" F% @
<RMB>Add-> Existing Item
. ]2 X; x; A9 e |& C' \" \! h9 C
/ Y9 K- v5 \1 `! p0 o2 c0 E) T C/C++:, |7 t& U- B6 p6 h# h0 j6 K) Z4 J; \
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp; _' \! J8 I. ]
C# or VB .NET:) K/ H: c5 j- w' i9 D
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res/ m1 i$ ?* F) o$ { C
Select the newly added NXSigningResource.res and in set% s" n- x- g) D, L
Properties-> Build Action = Embedded Resource
/ o. V ^6 H- \8 |" @' k0 S( B% D! M- O$ z/ W7 U
2) Make sure the build configuration is set to Release then
_- x2 F1 u- O; \ Build-> Rebuild Solution
$ `9 B- l, a1 o3 N' a
2 R9 g+ `& X6 G) _' s# u5 y0 c, X3) Sign the executable from an NX Command Prompt window:
8 M+ _$ x: K2 X7 q0 A You probably already have one open because you started the Visual
! x) l3 W& Y4 i% w5 S5 B Studio or Eclipse from it. Otherwise:
( \, H" u9 ]) w Start-> All Programs-> NX#-> NX Tools-> Command Prompt
- Q u0 p, ^! u4 B g- T) `
# w1 u# b( [/ K& I0 m# e# _1 \ Java:
7 ~, R; X0 i: k, d. s signJar <path to your>.jar+ k! o. s! M5 O
& Y% S$ q- C7 H4 c6 \7 f4 i$ e8 [ C/C++:7 ]- n9 ^! f0 _/ a
NX8.5 and later:
% ? d" O9 l8 M0 U signCpp <path to your>.dll or .exe/ Y' Z; Q5 }' P; V& w/ @. \7 V& ^
NX8.0 and earlier:
* t& o' q( Y8 D* P$ P* N nxSign <path to your>.dll or .exe
5 a6 |2 D# n" p: u: h9 _2 H; n6 I7 w3 K$ \
C# or VB .NET:2 H; I0 N/ k) g ^3 y
NX8.5 and later:
) s7 e5 S6 ?4 {. \( m signDotNet <path to your>.dll or .exe1 J* v3 ] c! E
NX8.0 and earlier:% V9 g+ H/ b1 L
signLibrary <path to your>.dll or .exe
1 P8 d+ m6 }* s! z3 u7 ?7 y. D7 j) }# G% N$ _
Note: You do not need to use the path to the signing utilities because the/ C- {* M+ A4 U6 W1 G$ ~
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
" r' g& f# g3 G+ O" q) @folders.1 ~( B4 ], j8 g' V# E4 w8 B! R7 F
& @, l* _3 n- X8 y |
|