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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
' h" C2 B: c1 X5 k# T6 I! N2 {

8 ]) `& X% ~/ M* \' y0 S
. J8 V- C( i4 S/ T7 F- b5 u2 }- {Once you have fully tested your NXOpen API application, you should "sign" it
' U, ~  s4 z- V! b  Bbefore distributing it to your end users.  Even if your end users also have
: y4 X: c) Q$ K: Taccess to the Author license which is required to load and run an NXOpen% T" W1 }0 w) K* |; I  \
application, signing it has its benefits.0 X) D3 c+ ^0 [, f! q0 W% z
" D3 v* o/ ~" N# C
    - Your application will load faster because NX will immediately recognize
# p, h5 d: v" K- r- r      that it has been signed.7 _  H3 B$ V, D% I) M
    - The syslog (Help-> Log File) will not be cluttered with the output from, e, q& A* d" O1 E% v
      the multiple checks that NX will do to determine whether it can load
' a/ h$ x3 W" S( i$ |0 F      and run the program.
7 O! E. \! q/ ~8 V: `* l' ?4 D9 N. {" i, K" T% [: s
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)! k  T8 w0 P/ z! ~  Y
3 h  k" o' }% @; u9 Y
    Add the NXSigningResource to your Visual Studio project
8 w0 s( G- U4 V% m) W+ l  X4 R4 O) G  d3 g, l1 e
    In the Solution Explorer, select the Resource Files folder and
+ o) `) Z# P, O0 U2 U( G" N        <RMB>Add-> Existing Item
, f/ @" \- J- x7 R6 _+ @( R( a9 U* |! ~* @
    C/C++:
: m) v# z1 F# G0 K        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp% q' Z* b$ R3 j6 Q8 Q6 w: u! ]
    C# or VB .NET:
8 P$ ?9 U, }4 q. e6 q: ]        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res7 V$ ^" K7 b. l1 p2 r6 s
        Select the newly added NXSigningResource.res and in set% i$ Q0 V* {- P+ w  X" l
            Properties-> Build Action = Embedded Resource
- [9 d% z( b' A2 x8 I
4 A) y: p/ t4 t/ v2)  Make sure the build configuration is set to Release then
% E& F8 g4 |- o3 n" u9 e7 ~5 N    Build-> Rebuild Solution
$ h, @, y/ F; j4 f/ ~6 Q9 L
( m. w7 J6 O( @2 Q3)  Sign the executable from an NX Command Prompt window:
6 u+ h2 N: p3 i( F  f1 X        You probably already have one open because you started the Visual
9 G" H8 R: `  K" I; J0 z3 @        Studio or Eclipse from it.  Otherwise:% A6 ?! k  T/ \8 D% ?0 M1 D0 M
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 g) {. q& r: w- i: ?& ?/ B
, I, D8 u. k$ Y# E9 m7 [
    Java:
/ N+ V& q( n5 X        signJar <path to your>.jar! i' u- f: O  G* }* ~) R. f
% Y. e2 R$ E8 w- m2 ~) M2 C
    C/C++:
( H, F) n; b( p8 T3 H5 }$ p        NX8.5 and later:
; M8 u* o' w1 {/ i+ a. d  ]( D            signCpp <path to your>.dll or .exe- v# ^4 o5 ~. K
        NX8.0 and earlier:
( X+ q8 d3 B" Z2 T: L            nxSign <path to your>.dll or .exe
4 V) p9 n9 U9 ^3 j# o! g0 m  S+ t$ e6 e4 i
    C# or VB .NET:
9 ], Y. [6 y  m* W3 V        NX8.5 and later:8 [9 {: X- F8 j" p" h' g" N4 [" S
            signDotNet <path to your>.dll or .exe2 @# F' c% p1 A. Q1 \/ y
        NX8.0 and earlier:
0 Q$ g  r  ?( s6 v; z8 e7 k. r+ k            signLibrary <path to your>.dll or .exe6 L; o- k' i' h9 B2 E% P+ O
8 \- Y) u' f# G7 k8 c2 h
Note:  You do not need to use the path to the signing utilities because the
' V/ T. k/ B* p, RPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
* Q2 Q- S3 n. Yfolders.
; e, s4 E$ n# |1 P5 L0 T- i1 k' ]2 o; n
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了