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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
1 ~; o0 r) m  l% Z- I7 ]2 |9 L
6 M9 _1 G8 D  n: `8 Q: @
5 I8 @  L, @6 O2 r& ?
Once you have fully tested your NXOpen API application, you should "sign" it7 o: G0 l! p4 D4 F3 j
before distributing it to your end users.  Even if your end users also have0 u& K2 e3 f; u* ?8 c) P
access to the Author license which is required to load and run an NXOpen; Q( f5 e( C- g. D7 t8 y2 F
application, signing it has its benefits.) U! f/ j, F. \5 `5 \7 v

3 k( I# l8 I) a4 I2 G! ^    - Your application will load faster because NX will immediately recognize7 C, D( ~/ x' `3 \5 U# L
      that it has been signed.9 _7 y5 c0 L7 v5 O& S3 ^* x
    - The syslog (Help-> Log File) will not be cluttered with the output from6 y; p7 ]& q* X2 G! m3 M
      the multiple checks that NX will do to determine whether it can load, b3 W0 a4 @: N7 i
      and run the program.
2 r* `8 H' P* y) i5 o
. d) U. S5 J" W1)  C/C++, C# or VB only (Java: Proceed directly to step 3)- U+ i: Y. c( M. F1 h2 Y

8 }5 r" \: |8 n    Add the NXSigningResource to your Visual Studio project
* u2 R, _$ m1 t
$ q+ Y5 g! f0 |& L    In the Solution Explorer, select the Resource Files folder and
! E7 l8 K; Q. g( N+ y6 W        <RMB>Add-> Existing Item" @# G* ?9 K/ p2 a4 z, f3 T

  E  g/ V# @! }5 ~# D1 l+ S1 I    C/C++:- {  k+ @) }# ?
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp& z! p  {4 F1 q$ d! {1 D3 Q
    C# or VB .NET:
! H- Y" }; s  Z0 C9 ^7 s        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
' s2 B4 f1 i6 G0 M6 V0 N        Select the newly added NXSigningResource.res and in set
. h' z. E6 K$ e% r6 \$ w            Properties-> Build Action = Embedded Resource/ T6 U' A; V$ s

$ y/ X  G$ f# L5 e0 E2)  Make sure the build configuration is set to Release then! ^* e6 K7 o8 Y) V* r
    Build-> Rebuild Solution, C2 u4 d9 ^9 x
7 C+ o9 l4 w# b, ?5 S. Q
3)  Sign the executable from an NX Command Prompt window:
( G; `' |) I$ q% @& o        You probably already have one open because you started the Visual
& Z/ w4 D* u* m0 n; `; r) k        Studio or Eclipse from it.  Otherwise:8 H9 {% N, G& M5 z5 W! Z
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 `+ k1 Y; O- }3 P7 ?/ [& }
) J  `5 c: s. V9 {+ \5 Q. P
    Java:0 k4 d1 U6 b4 H& x) D) d
        signJar <path to your>.jar
, J6 ?9 _' r" L% N8 I6 q0 f7 z. U+ Y! S4 @
    C/C++:
5 y$ v/ v; l5 M4 b; c% M" O        NX8.5 and later:
6 a4 ?6 i, |- w' O- s# l7 d/ \9 ~            signCpp <path to your>.dll or .exe# n: i0 }  ^. m4 H
        NX8.0 and earlier:8 a# }$ k4 w7 |: R* d1 I* X
            nxSign <path to your>.dll or .exe
9 |2 A  Z. x$ {/ n7 u7 Z3 |5 D2 a
9 F  X' r% [; A0 |6 h/ C    C# or VB .NET:
* ]& k: \9 U. O; t        NX8.5 and later:
9 [, n% F0 X, x% F! t: _. c            signDotNet <path to your>.dll or .exe
  v/ m8 G3 P* s5 _        NX8.0 and earlier:
8 u- M8 o2 L- o7 X9 v! A4 p            signLibrary <path to your>.dll or .exe% r: v/ O$ P4 z4 j/ S) n0 R

$ m* J" C' p( g5 ~0 ONote:  You do not need to use the path to the signing utilities because the
* ^3 I8 E4 ^! z' iPATH of the NX Command Prompt shell already includes both the UGOpen and UGII; Y. Q, W4 t: l( P
folders.. e: Q% M2 s' J" }

; w+ H5 R  ]" k" V6 ?- {. ^# D
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了