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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
4 R  v- |' ~  q
# E0 i$ ]" H; _/ c- S" f3 y! H" Z! k
, z8 v  K/ \) q
Once you have fully tested your NXOpen API application, you should "sign" it
' G7 J4 T) i9 Hbefore distributing it to your end users.  Even if your end users also have: a# \2 ]/ w/ R6 A
access to the Author license which is required to load and run an NXOpen7 z0 Q5 n- q- Q1 t6 ]4 q
application, signing it has its benefits.
6 @9 @. ^: f+ e( s. W- P# ]( d7 |
    - Your application will load faster because NX will immediately recognize) A6 v% ?& ^9 v9 c3 f
      that it has been signed.4 O$ x* Q" @0 w6 @5 F; {! G
    - The syslog (Help-> Log File) will not be cluttered with the output from( h) o: D  t! ]: G
      the multiple checks that NX will do to determine whether it can load# U6 A4 Y7 \4 `; F2 c/ D+ D
      and run the program.
. `. L, ]2 Z1 N8 B2 x2 b( |
- l) z+ X9 s, o4 O; E1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
7 Y5 W7 A9 O. ~
$ s) Z& f- z+ C3 B+ U5 o9 e8 q    Add the NXSigningResource to your Visual Studio project
4 R- Z$ {* X; }+ Y! W: ^$ Z- j& Y
    In the Solution Explorer, select the Resource Files folder and8 W8 w3 J; T5 t* ~: ~; P3 q  \
        <RMB>Add-> Existing Item
/ p! m7 N+ I! P/ ^- C  F! l4 ~+ O! C  H" W
    C/C++:* g+ |( |* R' t( w( ~5 x+ w1 t
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
8 L& V1 B4 e& U$ [! M4 V% w( ]    C# or VB .NET:
. R2 [9 \8 Z) S9 i        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res9 \3 W1 Z0 u8 Z* J, w9 l$ g5 v. ^
        Select the newly added NXSigningResource.res and in set( m/ Q( \7 k! A5 T. K" h2 h9 t
            Properties-> Build Action = Embedded Resource
) g) d: g! G+ U) T' S$ K8 t5 m
$ |$ }8 G( q! w/ m2)  Make sure the build configuration is set to Release then/ |/ Y0 I6 p: K1 J
    Build-> Rebuild Solution, I$ k1 ~9 Z+ N

* z4 s6 p$ d7 I/ A" G5 |' [/ c. @3)  Sign the executable from an NX Command Prompt window:. F' R: s) B8 W5 V$ h/ X1 x: S! |
        You probably already have one open because you started the Visual4 Z9 V4 ]1 v' F: @& a% P
        Studio or Eclipse from it.  Otherwise:
/ x% d3 r6 \  m1 b            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
+ W7 g$ b8 H3 `, ]
2 f, d& S; @. X0 z! S0 K; F/ a    Java:- ?) t$ E  Q, C* _0 ^$ \
        signJar <path to your>.jar
: D  Z! h, j8 ]' O
5 [+ E$ ^8 y0 w1 E: T. ^7 P2 h    C/C++:& D5 c0 ?2 s8 }; x
        NX8.5 and later:1 H9 v! d' H8 N% w5 h+ B  R
            signCpp <path to your>.dll or .exe
9 l& {$ A6 @" }4 n        NX8.0 and earlier:
! z0 m  J: Y8 }4 `# A/ I& P" w            nxSign <path to your>.dll or .exe
! l4 O" q" f  G% e5 a4 I
8 }; x' W9 @0 g5 `4 w( V* H9 Y    C# or VB .NET:
( \" X9 c, I6 W/ V        NX8.5 and later:- c7 |  j: a" N2 t
            signDotNet <path to your>.dll or .exe
* r. |3 d+ j, D        NX8.0 and earlier:0 \- B6 b5 y7 v2 W, X
            signLibrary <path to your>.dll or .exe# }; W& B5 [  `, j2 o

0 P3 E, L% R" M* h" \+ qNote:  You do not need to use the path to the signing utilities because the* X4 j& a& G' ]3 X
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII/ p- Y2 S# Y5 x0 ~! B
folders.$ [2 _3 D/ g; n* o) \. t

) }1 F6 O1 I# ?
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了