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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

# o* M. I: x& K5 N% }8 ]) I" w3 |8 u3 v( p; a/ y4 i

# E$ g6 b  K  Z0 v9 ~$ o+ @Once you have fully tested your NXOpen API application, you should "sign" it
! \! @; Q. g7 o* t5 Mbefore distributing it to your end users.  Even if your end users also have) p2 U( M' T5 B! t3 N  ^
access to the Author license which is required to load and run an NXOpen0 X! ]5 f2 E8 L0 L) L3 }. r
application, signing it has its benefits.: T0 i+ |( }% S& a! k9 D% K

4 b2 J! ]% q; L3 B) I    - Your application will load faster because NX will immediately recognize
3 p  g7 ], s9 \. \7 L. j      that it has been signed.) f: g9 [  r) e% z3 N+ h
    - The syslog (Help-> Log File) will not be cluttered with the output from
8 _8 ?, p, U3 E9 G7 j      the multiple checks that NX will do to determine whether it can load/ C- s: O- M. R, K$ g
      and run the program.8 y$ D; z" q2 C6 J1 T% U9 u. Q
9 U$ k5 u' B. ]  p0 F# b/ h
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)/ \. F4 N* v. J( S! x% f& Y
* M( x# f7 f0 r: {$ I
    Add the NXSigningResource to your Visual Studio project
: m4 d% |* G' v: _. y( z
. B, j9 D0 }  \2 Z    In the Solution Explorer, select the Resource Files folder and% q& z6 {5 b. x: `- C- c1 F3 I% ~
        <RMB>Add-> Existing Item
2 p: y) M2 n  }9 ]! A8 i
& Q/ y; y: M( l9 T, x* a    C/C++:2 _7 M4 U$ s& K1 [0 R# f
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
& d) H, E) _, ?0 i- W    C# or VB .NET:: W, g& C% z$ d7 u1 }! A
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res1 D& W3 b+ R' ^% d" V: j- C
        Select the newly added NXSigningResource.res and in set
) K" w, N' O+ [6 j            Properties-> Build Action = Embedded Resource% E9 a! r: F, G; r- f

6 v) B: m/ D9 A/ A: f: D2)  Make sure the build configuration is set to Release then9 Y( {+ Q) F8 P9 }
    Build-> Rebuild Solution
3 w3 ^  C9 P5 @8 k6 ~& h* q7 u, N3 v4 \6 }" b; i- w' V
3)  Sign the executable from an NX Command Prompt window:7 d' A" ?  E3 Y. \" T
        You probably already have one open because you started the Visual. `: r5 m3 ]4 k6 t6 Z% B
        Studio or Eclipse from it.  Otherwise:
& {6 [; P! k# P- e, h1 M+ y' P            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
8 d# N: @; a$ k/ v1 a8 n. \
" S0 _; ]$ _3 r) l5 c    Java:
" J& g2 w& L7 ^- x8 a# s1 q1 E        signJar <path to your>.jar" P/ Q0 u2 X! @1 L( u
9 G7 C, G, ~# r% t
    C/C++:
! j6 j  i8 `7 C$ T; G        NX8.5 and later:7 O  J- }* R2 F! R/ S
            signCpp <path to your>.dll or .exe8 j( r6 o, F) ?  M4 S" N) O$ f
        NX8.0 and earlier:
" Q2 E6 g4 C( z% a            nxSign <path to your>.dll or .exe
2 a4 g. P+ G7 w. p/ `, y; }3 Q! q0 A) A+ N9 Q
    C# or VB .NET:
- V8 Z. a& U" E        NX8.5 and later:3 Q9 `" g2 y: w7 T+ [: S
            signDotNet <path to your>.dll or .exe
$ x6 f% _2 j7 L8 [7 ?, h7 L        NX8.0 and earlier:5 M" r3 w8 V& r, r& s! H
            signLibrary <path to your>.dll or .exe
. }& u6 d' M/ n! L1 R7 o4 U# t& i. \3 P/ W- J" q, W, n- _% [
Note:  You do not need to use the path to the signing utilities because the8 L. i; Y0 Q* V+ T7 I
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
/ `% \& K# `6 V0 J/ a, s( Dfolders.
& G+ S: _, P3 I
5 K. {" L$ z5 k9 k/ X. a4 s' d0 X
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了