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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
) R  S9 k7 h. ~) E" ?/ ^/ S

  Y# M7 p+ s6 v2 N
0 z6 S/ x4 q- |! @$ ~( [Once you have fully tested your NXOpen API application, you should "sign" it) ]9 D$ M( c% h, r' S$ {& P6 v
before distributing it to your end users.  Even if your end users also have
/ P4 i, e' T1 faccess to the Author license which is required to load and run an NXOpen% e2 B4 l" @+ D4 P9 g  \2 n" P
application, signing it has its benefits.4 C4 Y: \; Y% L: Q$ m
# r5 _7 P( B2 u+ Q
    - Your application will load faster because NX will immediately recognize
6 O* P0 t! l/ U- e9 x( I      that it has been signed.
6 G: Y( l0 U. U* ~$ ~    - The syslog (Help-> Log File) will not be cluttered with the output from% x5 j  [& d- M% R9 a
      the multiple checks that NX will do to determine whether it can load! _# j$ R( j) Q
      and run the program.% u, J9 I& b  X) B- F. a! r- @6 |
8 m. Z9 y  z1 Q3 p- Z: s) g' `, z) k4 M
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
- c0 ^+ i- k4 T' e
5 F3 A9 A6 R* y& ^    Add the NXSigningResource to your Visual Studio project9 T9 }7 L. L+ d  A: g1 l
# }& s+ T, p. K7 T+ d' P9 q. q
    In the Solution Explorer, select the Resource Files folder and
( [3 t) c" b* g' Q1 \* M        <RMB>Add-> Existing Item
. p  N9 S% I# I% C: P0 g  ^. |8 I5 z, v2 C9 i  s
    C/C++:
0 X4 f8 m, t) }7 e        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
- M5 D; O( M9 Z$ p& M% W    C# or VB .NET:  U8 K( [; I3 t8 q8 A& v4 V
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
$ K; f9 j; o+ ~' H8 b& ?        Select the newly added NXSigningResource.res and in set8 {' L1 R4 y4 C( q5 h
            Properties-> Build Action = Embedded Resource1 x  t7 G  h; u- @* u9 M

: q; B# F, H/ k) j  e7 b2)  Make sure the build configuration is set to Release then$ N. q9 F' U! q- i& N- J
    Build-> Rebuild Solution
3 X% e8 U' T6 J1 w1 {! n! c  N8 q
  i2 X1 U7 m5 T6 B3)  Sign the executable from an NX Command Prompt window:
( s. \5 \- p2 e# u5 X( r        You probably already have one open because you started the Visual
, ~2 a) S8 d2 n% `+ n4 X1 J# _" ^        Studio or Eclipse from it.  Otherwise:4 J- v3 e, P  E$ _9 i
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
6 N: i& r' e3 F0 S$ U3 y. g0 ?1 }4 q+ o0 ~* d; t) P1 W4 q: H
    Java:! A' q! `- s8 @2 \- n3 a8 f' |
        signJar <path to your>.jar
& A1 x" z, v$ [" p' ^7 o, Q) a: g0 n9 }* y, G% D
    C/C++:6 l" r  h* ]0 w( V
        NX8.5 and later:+ u0 W4 ~# V" O1 A9 m6 `
            signCpp <path to your>.dll or .exe6 `. T5 F% q5 c5 ~9 s9 _2 G9 ]
        NX8.0 and earlier:
% g6 |8 e8 o$ i) a; G+ R  D% s            nxSign <path to your>.dll or .exe
$ r$ O5 T  u. p. d' R
2 A3 w, B( L5 ?" A1 O/ r* N    C# or VB .NET:* }7 H6 R4 a) Y  o  |7 L* U
        NX8.5 and later:+ ~0 |, p2 X* S/ J* {
            signDotNet <path to your>.dll or .exe
. \! R1 U) B- d; R) X: ~# D        NX8.0 and earlier:
; K8 W% d% `# n, |/ |            signLibrary <path to your>.dll or .exe
2 S4 c* D! }$ }( e3 K5 |2 A. X5 c+ B2 H
Note:  You do not need to use the path to the signing utilities because the- {+ W9 `' z* Y6 w
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII  F/ ?4 ^$ K% J; g0 b  L! J* P
folders.5 ~+ u& i! y9 P5 K
% @% J- X0 V, ]$ G0 Z4 l
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了