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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

# K, L: }; u2 f! ?! j7 {6 u+ i) B# e$ h5 |2 p

2 p: o' V( U( p7 q# |Once you have fully tested your NXOpen API application, you should "sign" it% h4 N8 I" q7 I" A) D7 g
before distributing it to your end users.  Even if your end users also have
3 w  w6 c& X6 g' P1 z6 Q$ Iaccess to the Author license which is required to load and run an NXOpen
. S1 w+ I2 ]5 Q9 Wapplication, signing it has its benefits.( T9 r$ e# g: o  c# Y

& ]9 h3 O) B3 M. w. [+ t    - Your application will load faster because NX will immediately recognize
0 w1 \) f. X: x( q- L7 K4 ?3 h      that it has been signed.* @4 |- c8 C6 `$ Y& g6 t) ?6 k% `
    - The syslog (Help-> Log File) will not be cluttered with the output from+ X# E) t9 d4 L5 A' f! W
      the multiple checks that NX will do to determine whether it can load# t& U' H5 m* s+ D
      and run the program." }' Q. ~" J, u5 {

) H) K; p2 ~9 [! I1)  C/C++, C# or VB only (Java: Proceed directly to step 3)/ Z, H7 C7 P2 c7 w  N* E

/ p/ ~6 A2 `# b* {5 U" L3 [    Add the NXSigningResource to your Visual Studio project
3 C+ @! U2 e2 ~2 k% m) {& p
+ `# {. c% |% G0 E) S- _    In the Solution Explorer, select the Resource Files folder and1 n  r, A) a% m- N1 l0 J2 M& Z
        <RMB>Add-> Existing Item
1 Z6 P2 {; d. F4 H0 ~0 H+ R. V  G/ E
% j0 S4 _- c; C4 D4 v4 ?( B$ m+ ?" D' z    C/C++:
! n5 e% f2 f( O+ j! @        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp, {; V1 e7 X; c
    C# or VB .NET:( Z5 [3 g" j8 n4 X) ~8 u) t
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
6 I& y; Q+ o/ P6 ^$ Y        Select the newly added NXSigningResource.res and in set( g4 d+ o& C( K% b3 y. Q6 M" Y
            Properties-> Build Action = Embedded Resource* g) \& v3 w  H8 t; a

+ i5 s7 t8 N" t* `! q2)  Make sure the build configuration is set to Release then
- X/ ?, M5 i* s8 U3 \4 U    Build-> Rebuild Solution
" I# t0 m$ U' U/ r, K
# s0 `5 |2 v' ~* n2 M& ]. _3)  Sign the executable from an NX Command Prompt window:& o9 ?# V6 L, [7 s
        You probably already have one open because you started the Visual+ C( U# K( M2 [" N
        Studio or Eclipse from it.  Otherwise:
9 ^& j* ?; U# B            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
1 \9 c# j5 g, M6 L  y# E- O4 i; w9 b* _# |% Y
    Java:
* t2 V3 A2 o9 \/ U3 L8 Q        signJar <path to your>.jar
! z- b, l8 O. G6 z& j: e% U, n( e: B, J. A: T4 C3 c0 c
    C/C++:# `8 w; p" N5 a. d' m  d* A
        NX8.5 and later:
" s1 f: T3 M  B9 [* N5 o* H2 [            signCpp <path to your>.dll or .exe7 S( A9 s" W9 D1 l  Y* Y; |5 A
        NX8.0 and earlier:! q; ~. x; P5 ^
            nxSign <path to your>.dll or .exe. a& K7 a; N& m% E2 ^
# D/ l( b/ X# c3 [
    C# or VB .NET:. ]& }0 ]/ q5 C0 ?# \$ c2 W$ T3 u
        NX8.5 and later:
( o$ ^6 v3 o4 R! `            signDotNet <path to your>.dll or .exe0 w0 \5 r9 ]3 T1 s* S2 ?
        NX8.0 and earlier:2 c4 G! H: |6 F6 m& b+ f+ d
            signLibrary <path to your>.dll or .exe
* _! U2 Z" }; G8 A
* v2 I' o, g3 i4 A3 _Note:  You do not need to use the path to the signing utilities because the4 _! L9 ^- [  b& s% O( M* C) H
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII4 s% K  q' U" i# b) Q& o
folders.
# f, u, @( i* {2 v; K
5 Z) {& _  B' V, ?  b, u
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了