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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

4 O. b6 ?# A- j! C6 c! T
' z' b; ?  a2 ?4 a6 f2 D
6 }% c7 W( x2 AOnce you have fully tested your NXOpen API application, you should "sign" it
3 o  C3 L7 P% t0 gbefore distributing it to your end users.  Even if your end users also have, c$ X! t. ]& V3 d7 K2 V
access to the Author license which is required to load and run an NXOpen
9 ^" L) x) w% Y7 p  }application, signing it has its benefits.* c* H5 C2 ^# L, ]

# z8 U* v1 b( i    - Your application will load faster because NX will immediately recognize
, T2 h3 S7 R' u; a! E& w      that it has been signed.0 ?/ V$ _3 z, C
    - The syslog (Help-> Log File) will not be cluttered with the output from; Q1 T5 v/ V* a% ?
      the multiple checks that NX will do to determine whether it can load7 J! p0 `8 `' X8 Z' a
      and run the program.+ i6 N+ I; U- K  E/ y) T

7 T8 |/ Y0 r# M4 x7 A1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
/ p+ _- h% K7 ]8 [4 `( z, ^! l! m: J
    Add the NXSigningResource to your Visual Studio project$ q/ f; }4 Z5 t: f* L' N
# `* I9 n5 P8 |+ |! P' K* a
    In the Solution Explorer, select the Resource Files folder and
/ s3 ]7 V4 g/ x' ?/ t        <RMB>Add-> Existing Item, C# _4 [) m. ?+ H% V

7 j' h0 _6 v9 P6 u! G    C/C++:8 R% f4 O: y9 Y& d) r7 B
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp9 x8 e5 S, `6 n9 I5 t, Z
    C# or VB .NET:
+ G# g/ Q0 \- g4 C; [        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
6 {! J* d( t5 e) |3 a        Select the newly added NXSigningResource.res and in set6 x4 Z* I1 ^+ j5 L9 u
            Properties-> Build Action = Embedded Resource
8 z. h( A; `& d' v3 ^7 C# F+ m/ H% \5 A% i4 {( }2 Q8 [- h3 w6 h3 ?
2)  Make sure the build configuration is set to Release then4 k% A$ P& w, q- d
    Build-> Rebuild Solution
+ R4 y$ Q* d, A2 ^- E6 }
8 y* p9 v( Z( c- M3)  Sign the executable from an NX Command Prompt window:$ T8 q9 h- _$ ?( w
        You probably already have one open because you started the Visual2 g( m3 y. B  N
        Studio or Eclipse from it.  Otherwise:9 u/ X8 E- G3 r; h8 o
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 j0 g9 c( i8 \% N" i) h# p7 h9 G6 Y
( @/ E) k' q6 |
    Java:
4 n( F  G7 J% h1 v) k5 H        signJar <path to your>.jar
- _- B- ^6 W6 s1 y$ e- Y
, @. N: I# S  e: `9 T    C/C++:+ K6 ~% ]* P) T. k$ q  Y& W; G3 r9 W, i
        NX8.5 and later:
) N7 _5 c+ B3 U            signCpp <path to your>.dll or .exe( j( d5 W: F" y/ m
        NX8.0 and earlier:/ L' v5 \4 m6 H) @* H
            nxSign <path to your>.dll or .exe
+ G$ l% W* Z  s) W6 j$ Z+ H8 K! n! f. C% j. a5 p" z1 C
    C# or VB .NET:
# F) ~) u- P8 @- r* B5 [4 v        NX8.5 and later:
6 w2 z. R( t. a9 k) ^8 W# h- \            signDotNet <path to your>.dll or .exe2 H+ R% m. ~- \  N
        NX8.0 and earlier:2 e+ x/ i" A+ t8 Q/ k
            signLibrary <path to your>.dll or .exe. P, Q: P* \# }- y: ]0 |7 h& M
5 _( m6 M* _. N- @& u
Note:  You do not need to use the path to the signing utilities because the2 R- ~: D3 a: ^' k! _1 h
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
' v& K5 e) b$ ]+ ufolders.
5 D* t) ]6 G" x# ]9 j5 `
& o  G4 I) c* t( K; y& c! h! J0 \. _
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了