PLM之家PLMHome-国产软件践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

- M- I" d6 q, ^3 S3 O+ f. J+ r' _- }) l5 U

( n+ Z& }5 T, |: D- WOnce you have fully tested your NXOpen API application, you should "sign" it6 A9 y; ~6 c' D% d& T  e
before distributing it to your end users.  Even if your end users also have
5 ^. |- ?+ v1 ]5 s3 Gaccess to the Author license which is required to load and run an NXOpen
# }- `' w) U2 e) L0 j8 d: V3 |/ uapplication, signing it has its benefits.  U' x7 o# R) |3 V/ Z: }$ X

. }' B3 z' s% X$ P$ V& s5 D    - Your application will load faster because NX will immediately recognize9 C. p" P% y# B- ]8 q% p
      that it has been signed.0 U, ]! Z! ]' h( z" W. e" r- O
    - The syslog (Help-> Log File) will not be cluttered with the output from
5 i6 W. w+ K9 L' V      the multiple checks that NX will do to determine whether it can load
6 ]1 c# P6 G) A" x5 z7 E      and run the program.
9 Y+ E  W3 }) S4 d# a: ~: S9 _4 a  Z! d# P- I/ E
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
  r" o0 i6 ~& D0 a0 T6 m2 i' W
" {8 V, n& m" s1 N6 D. r2 D; }    Add the NXSigningResource to your Visual Studio project) K) L) y  X* Q( _% f

0 a- t& T1 K8 B; J" ^# i    In the Solution Explorer, select the Resource Files folder and
& ]5 D, j% N! B        <RMB>Add-> Existing Item" j0 L0 _/ `% F1 m; q  [/ A

; |; P  y6 o9 {3 n0 h' e    C/C++:
! ^0 U9 F, D7 f' D        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp( @, E/ y& I8 F3 _$ t. X% J) r
    C# or VB .NET:
$ {/ s$ ~) m6 i0 N        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res2 S1 C0 s8 C3 g# Q# ?( Z6 n! o/ W
        Select the newly added NXSigningResource.res and in set
  j# w3 C0 H) N            Properties-> Build Action = Embedded Resource' g5 |1 F# Q4 C

9 j. F9 t8 F! D) q5 Y2)  Make sure the build configuration is set to Release then. u) L2 s+ _4 K' _; g8 b/ t
    Build-> Rebuild Solution
7 U9 f$ h- U* O4 n. k0 X$ h2 j% ]
3)  Sign the executable from an NX Command Prompt window:0 c+ x' N/ `3 l8 c, p2 U8 Y; U1 Y
        You probably already have one open because you started the Visual' S3 e. J8 C$ c9 F2 ?" z
        Studio or Eclipse from it.  Otherwise:2 H# A0 {6 J! X" |/ g8 z8 t2 p' U
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
3 @" `7 C9 ^  F- z# d: @: E2 q
* ~) x" ]% b& X6 ?6 ~    Java:; W5 H' Y) i2 M
        signJar <path to your>.jar: F& h& p( Y3 j3 l
! o) |9 m8 e4 N+ U1 a
    C/C++:
9 G8 y" u4 X, h& R2 _        NX8.5 and later:  o' n' {6 u% j8 F' Z1 |
            signCpp <path to your>.dll or .exe
# `" x/ _0 H" k$ q9 g        NX8.0 and earlier:2 r0 k1 M! _( X7 ]! B2 }6 O
            nxSign <path to your>.dll or .exe' I3 y* o4 A1 ]+ T% t

: A! B" f* ]" u' Y) [+ G+ {. w    C# or VB .NET:: k$ ?4 a; L( X% w9 S( q: E
        NX8.5 and later:% a# z# j: d0 Y0 F( Z% n. [
            signDotNet <path to your>.dll or .exe
9 G9 O! i/ n$ S3 F. t& j        NX8.0 and earlier:4 p/ N9 \9 a, o7 H8 t
            signLibrary <path to your>.dll or .exe
+ f( S1 X' r8 n/ q4 I0 W3 J( a
* V" @. i' |, T& r3 fNote:  You do not need to use the path to the signing utilities because the
6 i. \0 d( ~2 J( z; F$ N" GPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
# D8 w! [% E2 U& {' {1 @folders.0 j& S: w% ]" R2 N

! K2 B+ v& h0 O, F/ z: u
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了