PLM之家PLMHome-国产软件践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

$ l) ?9 s; m4 i2 K( x
# t0 L3 c" i* C4 U- ^
+ q& s% I; q7 |$ o0 j, ?Once you have fully tested your NXOpen API application, you should "sign" it0 A- X; x2 W! O
before distributing it to your end users.  Even if your end users also have( w) Y& }' [( T# Y4 j8 X( O( A" `- I; {- w
access to the Author license which is required to load and run an NXOpen+ a3 U  C/ |0 t. B+ x% d6 t
application, signing it has its benefits.
/ k+ y* K9 |- Q/ Y/ o# a' r
7 P1 d. z8 y1 d3 W    - Your application will load faster because NX will immediately recognize
, A  \3 B9 t* a: q0 q1 y0 v: q9 y1 d      that it has been signed." F" S/ v6 F. x! u
    - The syslog (Help-> Log File) will not be cluttered with the output from% @8 ^  I# `! w3 |2 _/ v
      the multiple checks that NX will do to determine whether it can load; N1 N9 g6 n! B+ V
      and run the program.' l& N9 [* _# l

) `( T; m$ Z0 G1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
. L$ W; Q# Y3 A) _! C( G1 z! x: S5 A6 e6 X4 H% p: n& @
    Add the NXSigningResource to your Visual Studio project6 o8 s% c8 k0 P: F9 A( H# t
! P: B  `3 S8 e& z( K! J  S* D
    In the Solution Explorer, select the Resource Files folder and% S# K' }& G. N2 z+ P* N
        <RMB>Add-> Existing Item# H! k, u3 r8 S% Y

+ l& d# Q! t6 D! V( H4 Z  f    C/C++:8 q) e" H; M) r' @' Y% v6 g
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
: p; i* S0 ~( z& b    C# or VB .NET:
* B. K; |( O. C0 I  N        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res5 \! A( F8 F3 U( w9 O' P, y& ]
        Select the newly added NXSigningResource.res and in set7 V: V0 t& T( W& p
            Properties-> Build Action = Embedded Resource' d: U. a4 [9 Y. M* M

2 K7 E2 d- n$ K+ S! I, @" W  R2)  Make sure the build configuration is set to Release then: l5 ?( x2 C+ A' D" N0 p/ L
    Build-> Rebuild Solution! Z# f4 B: ?# z* Q' f

  |6 K1 X( g1 ~  Q3)  Sign the executable from an NX Command Prompt window:9 ~% ~0 L$ U  u
        You probably already have one open because you started the Visual+ C8 H5 a7 r3 C/ P" _9 C: n) B
        Studio or Eclipse from it.  Otherwise:- q# F$ _0 f* z& P( S1 F7 t0 o
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
, u( j; t, Q- |/ C5 K6 G
8 d6 g8 W4 R3 \5 d0 i    Java:
+ J* F8 x5 U5 |. M& |3 r$ ^        signJar <path to your>.jar# d: z/ `' C9 c# q0 x

% Y( y  b5 S( G  C    C/C++:5 L, I, S& N$ A% V1 ?6 V# b& m
        NX8.5 and later:, P" f9 I7 Z6 h( O% y0 i! ]5 p/ O  \
            signCpp <path to your>.dll or .exe. H) K8 M$ A" P. ]. ~7 k/ b* q
        NX8.0 and earlier:9 R1 k) n1 E: ]) }3 ^
            nxSign <path to your>.dll or .exe# g  r$ C( d7 i( f9 G! P

2 m& x( Z  n% q- B* f: L/ c    C# or VB .NET:
4 a1 [( R  \! }/ |# H# w9 j( O8 Q        NX8.5 and later:( e& I8 Z. t+ ]* _# s! g6 L
            signDotNet <path to your>.dll or .exe+ Y+ D1 g" G; S( z9 v. j
        NX8.0 and earlier:- Z0 e' i& s) ~* R; |
            signLibrary <path to your>.dll or .exe6 B  {. Q; c$ ]+ J2 @' Q- K

! a- |2 P! D9 ?; S& kNote:  You do not need to use the path to the signing utilities because the
: j2 I9 ?) G1 P' F* r0 aPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
, B3 ^- y" r3 |& z( L: zfolders.
3 @/ m7 v- p3 k1 [- }
6 A, d& k* X2 _2 \$ F' `' J% H
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了