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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
: A( N, ^+ v' G: _. k1 L# o
% Z, O2 F3 r" B5 G2 J, s2 w
0 f0 h0 S- S- i, e; O7 c4 M
Once you have fully tested your NXOpen API application, you should "sign" it1 O, Y' O, J- V5 k0 P
before distributing it to your end users.  Even if your end users also have! m+ v  i, J* d
access to the Author license which is required to load and run an NXOpen- j  X7 y* x: b  W
application, signing it has its benefits.
2 N8 d* Z" H+ B
$ V* `! f0 x: ]+ u$ Z$ P  n    - Your application will load faster because NX will immediately recognize1 X1 K% X" |" ~
      that it has been signed.
+ x. l- H1 S2 P    - The syslog (Help-> Log File) will not be cluttered with the output from
$ O; X% _) s. [" G4 t      the multiple checks that NX will do to determine whether it can load$ q; }$ Z; a; x; `
      and run the program.
! p% e: @, h5 L, [" u
1 R5 b) Q- v4 j: J1)  C/C++, C# or VB only (Java: Proceed directly to step 3)/ T7 g0 h6 Y6 |7 a& o+ ?+ b. a
1 X5 L$ w& ]$ Z' Z5 u& u3 d# v
    Add the NXSigningResource to your Visual Studio project, Z; i7 w  ^, a& r/ M0 z2 K) Y

% E: ^3 l! K0 f8 l) ?    In the Solution Explorer, select the Resource Files folder and0 w9 h( s% S8 e3 u/ ]# e7 k: B
        <RMB>Add-> Existing Item  ~' T0 T  C! l' x5 f
; Z: B, A& y: U5 Z8 B0 n6 h$ I
    C/C++:- R: \6 ?, r5 ~1 T
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
9 G  S- l, o6 ^2 B0 o* ?    C# or VB .NET:
. a: z9 {5 J9 a) L        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
- P$ w8 T4 l+ Q+ c* J/ [" i        Select the newly added NXSigningResource.res and in set
8 A# T. q- Z- v$ y( r6 t1 U8 R3 ~            Properties-> Build Action = Embedded Resource8 \0 L, g9 p& J) w4 N1 x

' Q. T/ ]& ]6 [% [& g: s2)  Make sure the build configuration is set to Release then) J( h' ]; p+ H
    Build-> Rebuild Solution
$ }8 d) [& \: r0 \: @/ _" Y; {8 b! [% T: k; ]( \
3)  Sign the executable from an NX Command Prompt window:; x/ u1 I, X2 m- v
        You probably already have one open because you started the Visual
" ]) C. k* ~( T* e7 h# z        Studio or Eclipse from it.  Otherwise:- l4 `; Z- H* K! _6 u3 d+ @+ [, o
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
6 _, R% O2 H+ P9 V9 w  a# F. V6 c# p9 b, h- V+ t( @
    Java:2 {+ v& X& l* g- y. u8 w
        signJar <path to your>.jar
( E3 S& f9 P7 u5 Y  \( s  n  m5 V
    C/C++:4 Y2 Q6 ?  O' E& Q' L4 k. m
        NX8.5 and later:5 k; ^4 |* B+ L0 t
            signCpp <path to your>.dll or .exe0 ~/ J3 x. `2 q' B5 _
        NX8.0 and earlier:* M+ v) R& }* Y+ X# p. [
            nxSign <path to your>.dll or .exe) D) F$ [( C$ d( e% N- G7 q
  Y1 s& G1 x; ?, }% q( i: J
    C# or VB .NET:
% q3 V8 p5 @6 D5 o0 v4 b  ^        NX8.5 and later:
  F+ @; \- |/ w: ^            signDotNet <path to your>.dll or .exe! N# k& h! N& C0 u5 j& g
        NX8.0 and earlier:
* {+ K, C" w* p& x            signLibrary <path to your>.dll or .exe) U5 S5 S4 C0 V, ^9 h
& O' ^# W* G& S/ v' p: J
Note:  You do not need to use the path to the signing utilities because the1 U; K2 w6 D- H( r$ l
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
9 i' i6 S$ f) j8 N. o% zfolders., L0 C. k+ k4 B/ e( h

0 M0 k+ V+ d" Y2 h5 J! t" 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二次开发专题模块培训报名开始啦

    我知道了