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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
+ X" X6 A; d4 O# O9 Q& L
" ~1 m3 X6 {- p" A1 v/ e/ s
5 J* l0 q/ \& [0 A+ E; z
Once you have fully tested your NXOpen API application, you should "sign" it! k6 s( R# w# m- N
before distributing it to your end users.  Even if your end users also have6 G- e6 z9 r4 n5 q
access to the Author license which is required to load and run an NXOpen8 g8 [+ B- ?  l5 J$ d& C5 v
application, signing it has its benefits./ E0 `) O2 B! N5 J# F* b
% k. Y: }! B+ U9 H
    - Your application will load faster because NX will immediately recognize7 l3 Z6 ]' c0 L4 t+ J9 w
      that it has been signed.
7 p3 M0 Z7 I6 _9 A+ x- |5 w: _    - The syslog (Help-> Log File) will not be cluttered with the output from: ~6 P7 m, c* D) j3 F
      the multiple checks that NX will do to determine whether it can load# [6 G6 x  p$ D  D% u" s2 k
      and run the program.3 ^5 Q0 q' e; w/ ~0 a5 C

: i% f' H( B1 [( R# I" G; f% x1)  C/C++, C# or VB only (Java: Proceed directly to step 3)% U! g% w7 Q$ w4 z, W

- D4 H1 t4 _" v    Add the NXSigningResource to your Visual Studio project
" G& c- P5 S- h" g" Y
6 q8 B' t/ w$ e& b: p9 w    In the Solution Explorer, select the Resource Files folder and" G. W& Z# \- f! N- c# ^
        <RMB>Add-> Existing Item
( `  b1 t' R! h9 i
6 E" M4 b" g& \    C/C++:0 j4 Z. g1 s) o( Q% j
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp" ]# {! c+ D$ k$ e
    C# or VB .NET:* p% v* K% p8 q! w  D. [; M
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res( G% v7 j: }) e+ v. ^' q7 \$ a
        Select the newly added NXSigningResource.res and in set
+ A) t% b2 e" S6 k& L& h- c            Properties-> Build Action = Embedded Resource
4 ?4 c+ ^: H3 o- O
; P6 P8 q' {- c: I5 f; B2)  Make sure the build configuration is set to Release then
4 O& f( k' `# ^' J. E( K    Build-> Rebuild Solution% E% D1 ^4 W- P! R! N! @; Z

6 I0 _2 N0 w8 Z& a5 u3)  Sign the executable from an NX Command Prompt window:
( s* s5 o: p7 O0 C& f        You probably already have one open because you started the Visual
5 w- o0 D- e8 ~$ P, L4 b2 M  Y  Y# x        Studio or Eclipse from it.  Otherwise:/ K6 ], q2 {9 y6 u7 g4 x: @4 V$ ~
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
' n: a1 l+ V- L1 Z6 f' ~3 v/ u1 J2 ^
    Java:
) G# {' V5 Y5 t' {& `) q        signJar <path to your>.jar' ~* z5 l# ^7 m/ w+ D* a
  E3 Y/ M% `3 Z
    C/C++:* A3 y: H( N, y* o. ~& V) g/ d. W# B
        NX8.5 and later:
( J# X$ R; Q2 k; a) K* j            signCpp <path to your>.dll or .exe
9 {+ W& h/ _' e        NX8.0 and earlier:
- c  y6 o4 l! a2 O) X6 Z            nxSign <path to your>.dll or .exe
1 z3 U4 g+ H( }& Q# h; ?1 D2 Z, N0 e9 |& g1 f0 b) T( [
    C# or VB .NET:
. e% c: z. E) r2 a        NX8.5 and later:: N: r9 ?- H+ q# P) Z
            signDotNet <path to your>.dll or .exe. g) l: I+ @: F+ q, Y' {, m7 ?6 M9 f
        NX8.0 and earlier:7 {2 i& Y- `5 {% f5 E0 ?% Q
            signLibrary <path to your>.dll or .exe9 ]# ^6 A. z: e0 e: n% U. A

& X! |! g3 n3 O- [. INote:  You do not need to use the path to the signing utilities because the+ V$ `% a# @$ G, {' Y
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII$ k: Q5 J9 [( u' Y9 h5 V/ W) F
folders.
% _2 R' N3 d4 S9 M- o& y5 |
4 _; Q' G3 s1 }
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了