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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
$ k) d6 r& m' P' z$ `5 a
' ?& c  A5 i" Q  @

! W+ ^0 ?3 Q9 m1 t! k( fOnce you have fully tested your NXOpen API application, you should "sign" it
( `/ X; A7 B1 F& Z2 P* }before distributing it to your end users.  Even if your end users also have( Y1 K) ?0 P- f5 H7 O) @1 [
access to the Author license which is required to load and run an NXOpen
& c0 t: `, ]- W  vapplication, signing it has its benefits.$ P6 K: c7 V& D8 [1 n3 w
7 j! m1 d9 r" [' o, G  k! s1 W
    - Your application will load faster because NX will immediately recognize! y& |  D# N7 ?( b
      that it has been signed.! f7 X0 V9 j( F
    - The syslog (Help-> Log File) will not be cluttered with the output from
( U& W/ n) \9 u& b      the multiple checks that NX will do to determine whether it can load! k$ v8 ]+ g7 f$ j3 }  _" H% M3 U
      and run the program.
7 E8 K7 P% k2 B, a+ A/ a% p5 W, y7 N8 S# H4 F& E
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)) Z0 h+ K* [7 o
4 }, L/ [% g; T1 a" w! u& h
    Add the NXSigningResource to your Visual Studio project
4 M, t0 w) i% p, W
+ }3 X0 ^3 t, |) k2 u    In the Solution Explorer, select the Resource Files folder and
' S, q( X3 C/ p9 g3 N: ]        <RMB>Add-> Existing Item
. @$ q: J6 A2 n, d
2 d* ^: A' ^! k6 e5 k    C/C++:
3 Z% \" `! b7 P; m        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
( g. k# f+ ^9 d9 {    C# or VB .NET:" @9 ?. J# k# f+ ]/ N  j2 b* y
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res6 S8 }/ c$ m) f) W
        Select the newly added NXSigningResource.res and in set
( Z- t$ }0 l) @2 n% y7 P            Properties-> Build Action = Embedded Resource
+ }  o# Y( _' r, c+ h/ @: }+ ~* G( l+ d1 f, J
2)  Make sure the build configuration is set to Release then8 q: I* j/ x. P/ w) o
    Build-> Rebuild Solution/ h: _& m7 e6 z& f/ w

) Y4 s% D2 ^9 L. U& A  M# p3)  Sign the executable from an NX Command Prompt window:
; p8 G: [6 X" e4 }5 k; M$ h        You probably already have one open because you started the Visual: Z; m0 f& c1 T$ _
        Studio or Eclipse from it.  Otherwise:
0 q/ z& _1 l+ H# x+ }            Start-> All Programs-> NX#-> NX Tools-> Command Prompt+ t* q. R$ m* O- u' H2 X2 l

, W6 D; b& M( Y8 Z) b0 G( z    Java:
% [4 @" p, j' K% C+ F        signJar <path to your>.jar
) J' R7 m" i7 }
: y( [. @# g+ M1 P" b. q& X( y5 n& W    C/C++:  G( s2 A4 y( E/ @
        NX8.5 and later:; J8 }9 U* t6 }2 n9 Y  ]* H9 v0 L% s
            signCpp <path to your>.dll or .exe
9 I. A+ B5 p8 C% l" F: }2 `        NX8.0 and earlier:1 F* V3 i2 ]2 Z- [& u% I1 y
            nxSign <path to your>.dll or .exe
: s/ Q  i6 q5 v& n5 W0 }- e* ?3 j! Z$ @3 Z: I' L
    C# or VB .NET:
  Q8 b6 e$ o0 r4 W$ G        NX8.5 and later:5 {6 k( d& u: s5 [6 l' ~. d
            signDotNet <path to your>.dll or .exe
6 O7 `, g+ t1 A- [: J        NX8.0 and earlier:
9 g3 q) M5 D2 y# I( n+ q            signLibrary <path to your>.dll or .exe
6 g! g: L/ f7 B# i7 h8 @/ w6 {2 f& y/ N5 B6 h; T
Note:  You do not need to use the path to the signing utilities because the" {5 u+ L! a' k$ ~0 }& {9 N
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
- t& R1 y' T; i2 u; a2 bfolders.0 i! q/ V2 A) r: b1 L4 [, [

: G( h4 d7 Q) P- @
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了