|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
: T9 N* W+ S: z) n: z: `) T# ^
2 S0 |' X& H# D5 r. n. W
! n. w' \& ^/ j- R! h( p9 u
Once you have fully tested your NXOpen API application, you should "sign" it
- _6 l/ ^) u: j9 Dbefore distributing it to your end users. Even if your end users also have
4 r2 r3 y( }5 _- saccess to the Author license which is required to load and run an NXOpen: Y5 x( n8 _$ r% h
application, signing it has its benefits.
4 [. U- }5 ~/ B" Q. o. v: ^) n3 [ |/ \2 d0 S, U0 S3 l9 T6 s, C
- Your application will load faster because NX will immediately recognize
2 [$ A% r7 g- B: Z$ R; K5 T that it has been signed.5 j+ R2 M4 L0 e# |
- The syslog (Help-> Log File) will not be cluttered with the output from, B$ A/ o ]; {' d
the multiple checks that NX will do to determine whether it can load2 ~0 U9 z F5 `4 n3 p
and run the program.
6 {: u$ Q7 E9 a' m' [
, J) s4 l0 |- B1) C/C++, C# or VB only (Java: Proceed directly to step 3)
+ _- M7 D% Q1 X, Q7 R* u- U
3 N: n+ p2 U2 ^# B8 W; L: L' v% U Add the NXSigningResource to your Visual Studio project2 I0 t( o; w5 \, ?
* K+ g& I, j, g) Y1 L& f
In the Solution Explorer, select the Resource Files folder and
9 i0 q" |* A% M9 r9 Z/ r <RMB>Add-> Existing Item# ?7 J/ D3 m3 [" J
# y( N3 N% ^9 M; ^, E1 c C/C++:
4 Y K n2 X/ [" N& _ Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
( z1 I6 _% G: }% U C# or VB .NET:7 \/ o" m$ S, p4 V
Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res+ c4 n) E) a& E9 U; y$ J3 H3 B5 e
Select the newly added NXSigningResource.res and in set
2 u2 o5 T6 I) p! a' X Properties-> Build Action = Embedded Resource" z: w* _4 U% ~7 x& F4 }6 I! ^
4 q. J* o6 S' h s+ {
2) Make sure the build configuration is set to Release then L$ q/ |9 }- ?0 K) k/ \* ^/ j
Build-> Rebuild Solution' z* C/ k+ r. R- E3 Q
6 u" z- N0 Z! \4 r9 v! G
3) Sign the executable from an NX Command Prompt window:
9 `4 Z: [8 I' a" s8 h: K+ P You probably already have one open because you started the Visual/ \4 I; H+ t9 Z H5 W
Studio or Eclipse from it. Otherwise:
7 Z) d* w8 E" D, |! F# c' E1 y Start-> All Programs-> NX#-> NX Tools-> Command Prompt d. b7 z) i: {8 y5 W/ a
. O$ d0 L. h# }$ v& D9 m Java:$ J2 G. o$ B$ d) Q6 ?7 s8 y4 Q/ s
signJar <path to your>.jar
/ e2 p- q# v0 s* }6 N) B2 L! ~
/ R+ b) f( i9 y/ L; _ C/C++:! t% |! m; S0 u2 L3 ^7 u! ]# ]
NX8.5 and later:
9 f- B9 Z- b- x# j" Q# X" P: u signCpp <path to your>.dll or .exe, _2 t4 o, f* @! F
NX8.0 and earlier:9 s; N. ~5 @2 c7 y
nxSign <path to your>.dll or .exe1 V% X# h2 P3 V7 K! B& ~
: `$ `9 v6 c+ ^# u9 z+ o C# or VB .NET:
9 N( ]$ K( V& G) w NX8.5 and later:
/ T% d9 J( b# q3 S+ l6 y! X+ t0 ~* D signDotNet <path to your>.dll or .exe
& s1 G. W$ b7 \% i- X NX8.0 and earlier:9 O7 d. ?. y: a- n/ t5 t
signLibrary <path to your>.dll or .exe: u, d) p; b4 X4 k
) ~! j5 s$ R' h* _. a4 Q
Note: You do not need to use the path to the signing utilities because the
4 n% o% D( ]# |3 s1 E0 pPATH of the NX Command Prompt shell already includes both the UGOpen and UGII+ T% }$ c% m" A* }
folders.( f4 K5 Z; V9 {4 N" h
' ]# m6 j' B" ?1 m- B: f6 e
|
|