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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

% j/ X) \% K* C" c+ S; ]# D3 b* y& P4 @% q
- ]5 C- X. D8 A
Once you have fully tested your NXOpen API application, you should "sign" it; S5 Y( s9 b* E
before distributing it to your end users.  Even if your end users also have/ w# I  J( j$ q) M& b' N
access to the Author license which is required to load and run an NXOpen! J' O& N5 M4 X2 @# t+ \
application, signing it has its benefits.
2 R+ ^5 X' Q( ^  H: w+ x9 B  Q# O4 j" L+ D) i5 M0 v
    - Your application will load faster because NX will immediately recognize$ P  L6 T# {6 N+ b5 w% P9 {% Z
      that it has been signed.: o) A+ F, N) v1 F- j* q5 ?' {
    - The syslog (Help-> Log File) will not be cluttered with the output from6 \/ F7 h8 A; G5 e# @
      the multiple checks that NX will do to determine whether it can load. d9 ]+ J0 `5 M6 k1 f4 J/ g3 V
      and run the program.9 W7 N: ^9 F/ d" I. B

: Y: N% i. \8 H- Y0 G1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
- a: V2 j+ d: @  s  w: Y9 r3 F; w5 H/ R7 p
    Add the NXSigningResource to your Visual Studio project0 ~' X7 t$ J/ X5 X: ~
' |7 D  ]# a( G; \/ w
    In the Solution Explorer, select the Resource Files folder and
1 F# A8 Q( d, }8 L        <RMB>Add-> Existing Item
( b3 D6 a# d2 P+ D/ w0 F; o' E6 b5 L8 w8 _6 K+ J9 F! l) M
    C/C++:
% W+ |& j0 m6 q2 m6 c6 E        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp1 F/ i& d$ M# h; R* s. l  v
    C# or VB .NET:* ?7 P! k3 k' A4 T) }- E$ y% J
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
/ T+ d9 ?  E8 z" P7 ?& I8 M2 A        Select the newly added NXSigningResource.res and in set
& u+ P# X. t+ |( |' E* O# Q, X" w            Properties-> Build Action = Embedded Resource
( W+ \! D9 ^1 g0 U7 b
1 Q; e0 \% b0 E! C- ~* x' j1 A2)  Make sure the build configuration is set to Release then: J  D5 Y; M, Q3 x8 K8 i8 G( ~
    Build-> Rebuild Solution
4 `3 H! H& j! r. ~7 c% t
' I4 h2 s- B- p0 C# v3)  Sign the executable from an NX Command Prompt window:4 K" H+ c& L1 d$ s0 z( A! y
        You probably already have one open because you started the Visual  l$ X1 `5 t. ~+ ^1 v+ K. q6 t
        Studio or Eclipse from it.  Otherwise:! {) O0 R" |) B* R; ~/ @, Y! W
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt' h; A( P) l7 W. H
. H5 i4 l/ A' ^$ T7 G; ?
    Java:( C( [% }/ }; u3 W; D# `
        signJar <path to your>.jar
; n% |) W6 E3 u$ _% u. k% X! E% a
# i( ]. i) `$ f    C/C++:4 j8 R% T( Y$ y8 J1 t/ `
        NX8.5 and later:6 `( ]& G# Z! O: Y0 A
            signCpp <path to your>.dll or .exe+ v0 ^* q0 t& ?8 C0 u
        NX8.0 and earlier:
0 p0 a0 K6 M) y2 `            nxSign <path to your>.dll or .exe
( @8 o/ K6 e8 V4 L0 ~/ A6 s+ f4 @% S6 A4 a. @& z) |: d
    C# or VB .NET:
2 S% h- N) l1 Z- Z        NX8.5 and later:! D! x$ e! h% \$ u# [, J
            signDotNet <path to your>.dll or .exe5 Y6 N  j8 B6 u! j  L9 x
        NX8.0 and earlier:! |3 K. t) D2 G% I( v6 ^
            signLibrary <path to your>.dll or .exe
8 H! M+ ?' @3 v8 b1 k
( b4 B8 D$ D* kNote:  You do not need to use the path to the signing utilities because the  Z: u; }. Y1 j% ]
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
( ?% L# z, b! O9 L( ifolders.9 y# S) A  E; J+ ~- F2 C2 m# [

# Y! m. p+ j& s: o5 j/ t# v8 z
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了