PLM之家PLMHome-工业软件践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

4 C3 b+ x, [/ w3 o' P( |; g% g: B6 ]
/ C/ r0 R& t. ?
Once you have fully tested your NXOpen API application, you should "sign" it
9 a5 I8 U; D) h$ {8 \before distributing it to your end users.  Even if your end users also have
2 e* y' L- v5 G! v+ k) Z( t+ x. Oaccess to the Author license which is required to load and run an NXOpen; o. T! o4 C6 a: O* Z+ t0 e
application, signing it has its benefits.
5 b' S3 x5 P2 a
7 {! X8 V  W. m+ Q4 R    - Your application will load faster because NX will immediately recognize
( `* ^3 _1 b5 Q* s6 ~( X$ L5 h, l      that it has been signed.8 C" i- e  X; h8 D7 L: r. f
    - The syslog (Help-> Log File) will not be cluttered with the output from! F0 H: @( X4 \
      the multiple checks that NX will do to determine whether it can load
1 ^. C3 A! r. Z/ ~( j7 {      and run the program.* I' u1 U! Y7 O) B1 F8 J

6 w& w0 B) N  [( g0 h' ^5 ]) V1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
% _: \1 X/ [: k- h# L! `
4 k6 ^, }9 L+ y4 ~  A3 a    Add the NXSigningResource to your Visual Studio project9 n4 m! l0 ^' h. w1 I: E
' I. N, e: O) G6 u3 h' U7 F
    In the Solution Explorer, select the Resource Files folder and
& O: z' k6 W; v        <RMB>Add-> Existing Item
3 D/ f  t* v+ A. f2 X) o, O4 i" `! Q2 N6 q  m* u. |( @2 g% }
    C/C++:
" D) p# Y( d# J        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
  \4 Q* J* o# I4 L    C# or VB .NET:
/ C$ i/ F8 a$ \7 }- d3 F        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
$ `" V, S+ j5 q; k$ q, p! }% \% O/ c        Select the newly added NXSigningResource.res and in set% A  H+ r# k5 u, p1 ~3 h6 V1 s! [
            Properties-> Build Action = Embedded Resource
' M5 n; I8 c/ s. j' M; p1 ^( Q( z3 L" T
2)  Make sure the build configuration is set to Release then9 C  ?2 {% z0 p, T" D* O) U
    Build-> Rebuild Solution
/ W, O4 V( J, K* Y  i, c0 f
/ d8 K# v- W! F  b  m. B5 w7 l3)  Sign the executable from an NX Command Prompt window:4 _( `* P0 a2 u  [, a8 O
        You probably already have one open because you started the Visual9 r8 {% b- P& w, ^
        Studio or Eclipse from it.  Otherwise:
! T# y. B# h& X$ k$ J# ]* S            Start-> All Programs-> NX#-> NX Tools-> Command Prompt0 u% j5 ~8 `0 t& A; w9 J+ [
+ V4 O& j2 x# A# Y; s! [: A
    Java:% }- P  `% H! i, Y
        signJar <path to your>.jar
3 e2 a+ L, N9 O) S' d
& K' n8 j. |) Y" M7 [, @4 d    C/C++:
* I0 f) k" ~* g; N" m7 }8 Q        NX8.5 and later:
1 p9 r) l" c# v2 j( D& y/ q            signCpp <path to your>.dll or .exe
% G6 P. l  h/ j4 T& r" G% h: j% b1 K        NX8.0 and earlier:
" g  H* g. v: X* \/ H7 u+ S* ^( M            nxSign <path to your>.dll or .exe- L. Z3 Z% H) C' E1 m, J
$ a, R$ F5 V) j3 Z: V
    C# or VB .NET:5 K8 S: W& r1 V- s. J
        NX8.5 and later:3 _. O& P1 T/ l3 x" K
            signDotNet <path to your>.dll or .exe
9 }9 u' m$ B( k7 t        NX8.0 and earlier:
, i0 F, Q$ x, y! Q3 r( g5 @            signLibrary <path to your>.dll or .exe
" y6 A0 h2 f" g7 r' H$ V7 [; l0 t
8 M/ X; E" N+ s5 X2 i! M) c# LNote:  You do not need to use the path to the signing utilities because the
2 D# Y  H9 J7 G" @2 m. NPATH of the NX Command Prompt shell already includes both the UGOpen and UGII' x4 f6 o, U, B- @! R! y8 t
folders./ V4 U% m( U& B2 x% W* Y" z1 b' i

+ U) W4 w3 _, j5 s* y
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了