PLM之家PLMHome-工业软件践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

' e: d* m- c5 h2 x& a1 `! D$ w- [4 V1 e% }: Y

2 `# V6 R' `8 G% }Once you have fully tested your NXOpen API application, you should "sign" it
0 w: h3 U/ O  vbefore distributing it to your end users.  Even if your end users also have
2 m8 E9 H/ }8 T. Uaccess to the Author license which is required to load and run an NXOpen
8 C" X& A/ Q2 j4 d- G- s- bapplication, signing it has its benefits.
4 g* |* M& _9 j( q9 u* X1 b7 B/ ^5 ]  H, i# M
    - Your application will load faster because NX will immediately recognize' `2 p, \) g3 g$ {0 B
      that it has been signed.
; L  Y3 V- H) h( Q    - The syslog (Help-> Log File) will not be cluttered with the output from
6 q" {* l8 b2 ]( m* {      the multiple checks that NX will do to determine whether it can load
4 q- S2 P/ R  c6 z; v; L      and run the program.0 j3 @3 |7 F) Y5 @2 e$ o  |/ v
8 S3 v: l0 d0 ]/ m" p! ]
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)8 G3 a5 H% e+ Z& ~* ?# F

0 r7 O& P, T5 u/ F6 i, Y5 d. A    Add the NXSigningResource to your Visual Studio project
+ O0 {& y8 `) b4 x6 Z4 ~0 S
1 {% l1 }4 i  D2 O) Y, i$ |: N5 q; ~    In the Solution Explorer, select the Resource Files folder and# g% H  t9 V* ^+ i8 M* M) u- l
        <RMB>Add-> Existing Item/ _9 h( N4 Q* i$ h- L8 g

1 E% G  a& U; Q1 ]8 z    C/C++:# I' Z1 n* K/ H- ]. d5 I
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
& Y  K% a9 H# P    C# or VB .NET:
7 S  c1 I; I0 h$ s" y5 M. Q9 U2 G        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
- f2 E2 F& {& A* m; y        Select the newly added NXSigningResource.res and in set$ \( K( w1 y! n9 H
            Properties-> Build Action = Embedded Resource& a& E' O1 I9 Z5 n1 r. U! j; s* ~
* [5 {2 ]0 O! Q' W, t0 B' g6 D
2)  Make sure the build configuration is set to Release then
1 h1 D7 I4 z7 Z5 a    Build-> Rebuild Solution
" k4 [2 w$ X1 q) W6 E
5 s2 h% u9 m$ c- ]- ?2 F; p- ?3)  Sign the executable from an NX Command Prompt window:7 S5 Z  b) I! E; m7 ]' d7 |; j0 ?
        You probably already have one open because you started the Visual
: ^$ e+ W1 _' g: }# r3 ?5 c* k        Studio or Eclipse from it.  Otherwise:
( V1 P- \2 N) ~9 D            Start-> All Programs-> NX#-> NX Tools-> Command Prompt3 o  i4 }' ?1 T$ o7 g' e
+ H* b& C& |, d% h8 s
    Java:
* ?) r( \  I4 H5 x1 \' k        signJar <path to your>.jar$ p% G+ w2 q9 Q  l

) ~, M3 O6 e, T6 O! I. ?; j    C/C++:% i7 U! n* Z% p  k3 W3 j
        NX8.5 and later:
; L) v* u6 n  S( {' W) S2 w. z0 Z$ K            signCpp <path to your>.dll or .exe+ S: {$ O; q% E7 m8 @
        NX8.0 and earlier:9 `1 t4 C  F; `2 I+ l, A
            nxSign <path to your>.dll or .exe
% x' r. x9 t$ R5 A1 l, G2 ~9 g" ^7 O3 G' k: K+ m
    C# or VB .NET:
  H+ E* u5 m: e7 a) u, q9 ~        NX8.5 and later:- d# J# [# h* }3 t! _! f
            signDotNet <path to your>.dll or .exe% I! ~- h7 k' b" N8 q
        NX8.0 and earlier:5 M: W' |, |$ S* j
            signLibrary <path to your>.dll or .exe
' H5 _0 ~& _  x8 Z% u1 C+ s+ t& F0 |  `4 ^5 N
Note:  You do not need to use the path to the signing utilities because the
4 p! ?- t. d! z1 q6 x" WPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
6 ]2 k2 ~# s" i& Ifolders.
- g& n9 f$ v* K5 {* N; p
% d9 R8 l' s" Y) D# |- U: E
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了