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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

) z$ @4 H$ Y- h& F, R/ P0 n9 j
4 [& z! P; G( O; \! z+ |
3 G2 V3 O; Q4 dOnce you have fully tested your NXOpen API application, you should "sign" it
/ P4 Y" s0 q8 dbefore distributing it to your end users.  Even if your end users also have
: p, y8 l# p: @9 N7 @. {access to the Author license which is required to load and run an NXOpen, D2 Y, B8 |, m  S' d
application, signing it has its benefits.3 V2 h0 C4 ]+ m/ J% ]! l
4 a  R% S! `- z! l
    - Your application will load faster because NX will immediately recognize
1 V' u! x, a" L) f- b1 z* ~      that it has been signed.: e: J; S0 m( m
    - The syslog (Help-> Log File) will not be cluttered with the output from2 A' k  S2 K3 N" r1 t
      the multiple checks that NX will do to determine whether it can load$ q, B7 L& d4 X& y0 l. L
      and run the program.
  M! Z7 P5 S# P5 `& W: |& a8 H; ]) v8 `1 y
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
) Q0 }6 C% R; R3 Y, Z% f' @- R# K6 Y7 A# t! x
    Add the NXSigningResource to your Visual Studio project
$ Q, b9 R7 S1 `7 D3 t4 u3 ?- G& Z+ c5 Y, R( d5 k1 X
    In the Solution Explorer, select the Resource Files folder and  }! Q' j9 D. x0 ?9 i
        <RMB>Add-> Existing Item
. ?  a- |( t* |9 e
8 o1 `8 ~$ }& h. l    C/C++:9 n2 y% _3 ]. f/ f
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
6 J: N5 Q" i* e$ Y; N- e    C# or VB .NET:
$ V4 V8 c, }4 L  h! X4 I' t        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
5 |8 U1 |- n0 M        Select the newly added NXSigningResource.res and in set
- k  D0 N& g7 S; D9 a. C3 f            Properties-> Build Action = Embedded Resource
+ S) J. a8 r- Q7 x2 A; Q' X. |: i- R$ c
2)  Make sure the build configuration is set to Release then" N5 e" q/ _- [/ E# `1 I' Y. e/ H3 r
    Build-> Rebuild Solution
7 |/ S: s  o8 M! o3 h+ v
, t$ o, k& u( d/ f2 ^0 d3)  Sign the executable from an NX Command Prompt window:
& d; i3 l+ H+ v        You probably already have one open because you started the Visual. X4 ]5 Y; Q& O( K3 L5 H% c
        Studio or Eclipse from it.  Otherwise:3 C+ {# f4 A/ k: ]4 l
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt9 ?) a* L, a3 Y
2 H  F7 o7 O! D# v( O
    Java:
1 f2 W# |" p+ G+ D        signJar <path to your>.jar. b! k) o: C& Q  A1 h% E
) {2 S9 @1 _2 O9 p+ K
    C/C++:
1 F+ M* F2 q6 }( g        NX8.5 and later:6 E  G7 h2 V6 z$ G  B
            signCpp <path to your>.dll or .exe
+ M' M& D0 R; E6 a7 }' G, c5 u        NX8.0 and earlier:
8 H! G3 n# w& O" Q, B. u' M' Q" R' c            nxSign <path to your>.dll or .exe. B$ u* `6 v% V5 P& j3 j

- U( Q  x' ^" w# q( I1 e    C# or VB .NET:; S( L; `+ n  O) z3 @; I0 `
        NX8.5 and later:
( y8 X' @  A. U# \            signDotNet <path to your>.dll or .exe( R& @7 i) w" t0 m
        NX8.0 and earlier:
" C7 y% Z( [$ T/ k            signLibrary <path to your>.dll or .exe
+ K! h/ z( A6 b8 a( z
$ f2 ^, z/ N. F! [6 xNote:  You do not need to use the path to the signing utilities because the# C6 H$ i" \0 |. q3 Y. U
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII- k) Y2 A. O3 y- C5 d1 B' f
folders.+ W( |  |5 V' a
6 ]8 |7 h( s  e& j( R
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了