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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

) F- Z+ ~$ l. l+ m0 A( \7 w% Z! B/ ^6 h
6 p! |9 p2 {4 `. G0 E
Once you have fully tested your NXOpen API application, you should "sign" it
" G4 e+ V! Z, Ebefore distributing it to your end users.  Even if your end users also have
/ Q) X9 _6 [+ f! t0 r; ]( S% |access to the Author license which is required to load and run an NXOpen
# o! A) a. M, E. Z0 o7 napplication, signing it has its benefits.
' m. ~9 W$ ]% j' ]' s, ?4 l8 i2 P/ U. |: S  q$ }( `1 A+ M: T
    - Your application will load faster because NX will immediately recognize
1 x& g: z1 y  u      that it has been signed.
3 T* P: g7 K9 d0 Q    - The syslog (Help-> Log File) will not be cluttered with the output from& l$ d: |( v$ W5 ?+ F
      the multiple checks that NX will do to determine whether it can load
1 e$ j2 E' E3 z) Z6 E. [( f. L- z      and run the program.
5 P! u# O1 c! `4 ]% Z5 p: h2 [* A9 Q6 v4 _& t( \
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
/ k) ~% k1 n4 W$ I: B# _
. M; q2 ~& Q, Y3 ]9 H/ H% t, c    Add the NXSigningResource to your Visual Studio project
; Z1 H  r$ Z; Y  L. A
# _, H) f- t5 e  h! ^    In the Solution Explorer, select the Resource Files folder and: v. ^& P' `7 }& r4 ^1 M: D* I) y# U
        <RMB>Add-> Existing Item
7 P  q1 m  @' a% x
& g" w3 N8 H4 V% ?    C/C++:4 y5 m, o& u6 D' y$ m1 N# f5 A
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
5 H7 p, J3 m) z" g/ b    C# or VB .NET:7 b* |4 L6 ]% A6 y  ?  Q% j
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
/ B) d. v" L0 n/ m% X$ Y' \        Select the newly added NXSigningResource.res and in set# M/ m) m/ Q) g8 b! u6 M
            Properties-> Build Action = Embedded Resource
* X+ a2 y  O+ ^9 U$ a0 _  I4 t% B4 N5 N2 Z2 Q
2)  Make sure the build configuration is set to Release then5 B, c+ p  ~- G
    Build-> Rebuild Solution
* m: L5 A8 ^- \" h2 K
1 c) b! C5 p( B/ X3)  Sign the executable from an NX Command Prompt window:3 H! K1 F; z3 w1 Y7 ~" e5 W. L
        You probably already have one open because you started the Visual
% ]7 L  z1 s; C3 ]4 U        Studio or Eclipse from it.  Otherwise:  O  t7 z5 O# \+ p4 N! k
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
, ~6 U# s- ]/ {3 j  _! ?$ M  ^) Z* M7 m
    Java:3 T- e6 ]( H0 C/ w2 S( x# P
        signJar <path to your>.jar; d5 x1 Q( E# C* h+ s" r4 @

- s3 ^; G, w$ Y' ^6 U2 [    C/C++:* I- n0 M/ G+ V/ H
        NX8.5 and later:
- S8 N8 K, z" h. E8 E/ K            signCpp <path to your>.dll or .exe
  S% Q1 j6 P( z) j0 X" w  N        NX8.0 and earlier:+ B8 m# z' i3 ^  a4 _: v
            nxSign <path to your>.dll or .exe
3 Z7 h2 z' s; u0 R" b
# @7 t7 ~# q5 M7 i    C# or VB .NET:
6 [) _: m  {, p9 p$ _; C        NX8.5 and later:
5 s: K* y# o9 y  J9 W! T. r            signDotNet <path to your>.dll or .exe$ f/ }, F% g; Q2 w7 l4 T
        NX8.0 and earlier:4 ^$ j8 [6 h6 H9 O
            signLibrary <path to your>.dll or .exe
  s5 ^5 W- r8 r" c5 d
% i* w% W# P; X2 q8 }9 cNote:  You do not need to use the path to the signing utilities because the
3 Y7 d1 s# \) Y' R% SPATH of the NX Command Prompt shell already includes both the UGOpen and UGII* P- }; x2 f# ~/ Z4 M$ o
folders.
* U5 H. V! ?6 h
9 f0 K& Q8 Y0 m, \
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了