PLM之家PLMHome-工业软件与AI结合践行者

[原创] NX二次开发签名的方法完整版本,详细步骤如下:

  [复制链接]

2017-4-21 08:17:55 8380 1

admin 发表于 2015-2-25 13:00:05 |阅读模式

admin 楼主

2015-2-25 13:00:05

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x

3 r9 u$ b- F' d" W
4 X: w1 R9 ]4 Q1 P0 H/ t
" V" I1 F, @2 r7 I, m7 `# VOnce you have fully tested your NXOpen API application, you should "sign" it- S" A* R1 k4 Y1 t4 T0 t
before distributing it to your end users.  Even if your end users also have
. Y. q/ z& H, V+ c' Faccess to the Author license which is required to load and run an NXOpen
4 ?# A( W4 J+ y2 f' j5 vapplication, signing it has its benefits.# }- s% X3 r; O* e
" V9 r) b, n* x8 U
    - Your application will load faster because NX will immediately recognize0 r7 M; N, N% E; z
      that it has been signed.
  S: \& P, x; {    - The syslog (Help-> Log File) will not be cluttered with the output from! s2 v$ M+ K2 s- B1 E9 c, ?& n" G) b4 W6 v
      the multiple checks that NX will do to determine whether it can load' {. h! A% g- k/ ?9 l
      and run the program.
( @! r' t9 o2 h
* m) g! t# T( T1 A1)  C/C++, C# or VB only (Java: Proceed directly to step 3)" W/ l6 x! x- t
& i: H; R0 W4 d& L+ Z) D+ a
    Add the NXSigningResource to your Visual Studio project& z5 {, P2 _+ _5 F" K

; F' c  N2 }" V4 y: [: ^; {; d    In the Solution Explorer, select the Resource Files folder and! D! u! j( O8 m/ Y2 w4 `* g
        <RMB>Add-> Existing Item
8 K* m4 \- V! S' g* P. X: i+ o" t0 ~* p
    C/C++:/ d% n8 V; z2 }* p# ~8 y. _
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
$ L: t5 R+ F0 f' J5 c: G0 B: J    C# or VB .NET:
7 h/ P6 S2 _2 R2 Z% N2 |! A        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
) x  z- k, ^- j' Z5 w3 e) Y        Select the newly added NXSigningResource.res and in set
" A  w" X& c8 T0 I* F            Properties-> Build Action = Embedded Resource
$ S; Q$ j* t0 t# ]" e) J8 z7 v9 a/ r. J; ?
2)  Make sure the build configuration is set to Release then  o. H, N7 O8 M
    Build-> Rebuild Solution' j4 b  g/ W! P5 T& @

" ?4 g- [( V/ D+ k: c' Z% f3)  Sign the executable from an NX Command Prompt window:  p% U$ Q& C1 x* L4 y8 B; Q
        You probably already have one open because you started the Visual
2 S' |- ~. F. V5 J: @: h' |4 s        Studio or Eclipse from it.  Otherwise:2 B, D# h/ N/ S* f" k8 U
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt/ f' e0 k* P! G9 ~7 F

# l& ]  p# F& h9 Q" Q& R+ z    Java:. {, {/ ?5 q: l  f# C- z- K
        signJar <path to your>.jar
. t- _3 ]% {  q" I+ t* l4 b) D3 a1 W' ^- t( k5 F; |. R
    C/C++:
9 c% J* @( j# b/ ^        NX8.5 and later:
5 C, o$ A$ g! c$ n7 F. Y# h( ~: r- E& l0 N            signCpp <path to your>.dll or .exe
6 {2 B2 w1 Y( g        NX8.0 and earlier:
1 n7 G) I& Z" {$ E# |# y5 N4 n' _            nxSign <path to your>.dll or .exe. Z# z. `* I! i; {- ?$ W1 s# ~
" ~3 B. R+ i. j6 o  z. F
    C# or VB .NET:5 m- @* Q. Q. u! D
        NX8.5 and later:$ a% E5 n5 m4 O" _: O
            signDotNet <path to your>.dll or .exe0 n3 Q  g( n& i  z
        NX8.0 and earlier:  T: o) u# M2 W
            signLibrary <path to your>.dll or .exe
! @0 q: r9 n- U) T* B: W: I- {9 K" a+ r: h- J
Note:  You do not need to use the path to the signing utilities because the
# d5 e1 B8 o' S  i8 \4 `PATH of the NX Command Prompt shell already includes both the UGOpen and UGII% R0 j/ s' [. n$ T1 A4 X
folders.( K" y& X8 ?/ P
  g. ~8 J. C6 M
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

yejihu 发表于 2017-4-21 08:17:55

yejihu 沙发

2017-4-21 08:17:55

非常感谢您的分享和宽大的胸怀!
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了