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

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

  [复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

积分
82162
QQ
发表于 2015-2-25 13:00:05 | 显示全部楼层 |阅读模式

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

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

x
1 c/ H1 c* m0 K2 M
% z' t0 f- N* o

: R3 K' D! w* j4 i# B' KOnce you have fully tested your NXOpen API application, you should "sign" it7 f9 ~0 k# P8 e$ i7 `. o
before distributing it to your end users.  Even if your end users also have
: U% G( B  x; g+ u. J' l  w5 baccess to the Author license which is required to load and run an NXOpen7 [  p8 C2 k4 G% z5 C
application, signing it has its benefits.4 p. F3 H6 r3 ]4 n1 @, r
0 h/ E) E9 @! \# x: ]+ z
    - Your application will load faster because NX will immediately recognize& r' {4 v" G& r9 q, j
      that it has been signed.
! |1 X& [0 Q% C: \6 N, J    - The syslog (Help-> Log File) will not be cluttered with the output from
2 {$ {" a7 J' ^; y/ Y      the multiple checks that NX will do to determine whether it can load
) Z% G; V- ~( T& U$ K. y' K      and run the program.; V6 J! h, n( v/ ?. K
# E" {# t$ }, {( v+ @% i3 d
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
5 O& U, i! F; d0 N0 r& j' ~! \
! V7 A1 c, D( s+ J/ M& r* k7 \    Add the NXSigningResource to your Visual Studio project
- Y  L4 ]0 S+ C, E8 q; l. I1 c% Q
    In the Solution Explorer, select the Resource Files folder and7 b4 R' K8 V: I- h  m
        <RMB>Add-> Existing Item
# T! X" [% n1 @7 {9 t6 C8 D! R* M+ @  e2 g9 w3 P, g
    C/C++:
% K" w. M& W1 w. r) ^7 L# G( ?        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
4 f2 C2 q3 t$ {; i  Q+ l7 P1 {# V. U    C# or VB .NET:/ M1 T2 F! d- `) f; Q5 m1 U
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res) W) C, B( `9 i: L* |! j6 k
        Select the newly added NXSigningResource.res and in set
* e! E$ t. O7 z7 c            Properties-> Build Action = Embedded Resource
/ Z  l: W0 I3 Y& T1 F$ v: i" T2 v$ m, e# R6 M
2)  Make sure the build configuration is set to Release then! i6 B2 V/ e3 j
    Build-> Rebuild Solution! ~! N0 d+ H" f+ y

+ f$ g, M- n& K+ ^3)  Sign the executable from an NX Command Prompt window:" W+ P) a) J8 K. H
        You probably already have one open because you started the Visual
1 Y' q- B% l$ N  v7 k# _$ P1 `% {        Studio or Eclipse from it.  Otherwise:
  M: y- \; g/ p2 {* `+ v            Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 Q" u9 Z; n! ?4 o$ T

' _+ a" f$ H1 k% P' J    Java:
0 a" [- Z+ p: {8 {( x* {        signJar <path to your>.jar
4 A1 e& z# _9 a7 Y; c; X7 `- K2 b% d! j( v+ F' m+ ]$ n
    C/C++:
* Z% T7 h+ u! y$ C1 p        NX8.5 and later:2 c. L+ q7 c* E! z1 E0 f2 f+ T
            signCpp <path to your>.dll or .exe
, r: K* f; \" `. V) o% |- P        NX8.0 and earlier:
; Z# E3 g$ v' l, h! M* c            nxSign <path to your>.dll or .exe
' y) r1 T5 R! M  a8 \/ b8 v8 i1 t* F0 q5 W8 T
    C# or VB .NET:
; ?. |0 W4 s1 d( P* a        NX8.5 and later:
2 W$ W0 P3 u# o" u- |6 u+ o* q            signDotNet <path to your>.dll or .exe
- G' ?8 J8 X/ Q! y8 X- c        NX8.0 and earlier:9 Q+ `! @6 {; X) h/ W! P
            signLibrary <path to your>.dll or .exe2 J8 ~  o% a$ ?+ o+ K! T  x4 \; S5 t: l  N
4 c( {3 _  v9 V1 c" V: b- U
Note:  You do not need to use the path to the signing utilities because the
4 B% A4 S+ r# T: m% l/ S, @PATH of the NX Command Prompt shell already includes both the UGOpen and UGII: g/ `7 P1 R; f
folders., r% U8 M) @) L+ s0 ?
* U. n/ w6 U6 S. B$ |2 R
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

1

主题

56

回帖

395

积分

中级会员

积分
395
发表于 2017-4-21 08:17:55 | 显示全部楼层
非常感谢您的分享和宽大的胸怀!
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了