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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

6 L' U  c* s2 M% I# U( |) Q/ C* h" f% @! ^: _

- {8 D/ i& C) N* i% VOnce you have fully tested your NXOpen API application, you should "sign" it9 h  B$ ~3 E$ \$ C5 ?
before distributing it to your end users.  Even if your end users also have  q% e8 h1 [. K. c) o4 }
access to the Author license which is required to load and run an NXOpen
" W. T& ?* c4 e' o+ Japplication, signing it has its benefits.9 J9 a0 [- \) q1 ]' Z
6 _: E, ?, M0 j" N7 E
    - Your application will load faster because NX will immediately recognize" e( k5 q3 F* P/ L* ~& g
      that it has been signed.
/ m6 G$ i7 `& N0 a- T6 o; A, G    - The syslog (Help-> Log File) will not be cluttered with the output from. R: h, p/ A; \- M$ m9 b( F
      the multiple checks that NX will do to determine whether it can load% G8 [3 C' A- F! y( m+ f4 I0 ]
      and run the program.
1 a9 a/ Q- |- _' c1 T
$ ?+ F" ~' j+ @% p6 I& [* a1)  C/C++, C# or VB only (Java: Proceed directly to step 3)6 V5 h; I( @0 W2 M% v) h
/ Z. n- {: g8 U8 C- \: w
    Add the NXSigningResource to your Visual Studio project
1 f& h/ P6 P* X% _+ U$ B6 D6 s1 J& f2 w. m
    In the Solution Explorer, select the Resource Files folder and
8 Z7 x) \0 M% W; @- _: j6 m        <RMB>Add-> Existing Item
/ }% H/ G- L* j1 D1 u
* q8 j, T6 ~% O5 J, t    C/C++:
. }. V" r- m) p/ R4 a4 y) Q$ \        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp. b& [8 \' J1 ?
    C# or VB .NET:7 E( F: z4 b/ ~# i! K7 w
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res9 h  N. o$ u, a8 {
        Select the newly added NXSigningResource.res and in set
: l* q/ j( d1 o9 ]            Properties-> Build Action = Embedded Resource% @+ D+ h2 \7 N2 J4 N/ l  C3 v
2 U7 s; H4 I% G
2)  Make sure the build configuration is set to Release then
9 R) I3 ]( c* l" Q: N2 H% K4 x) m- L    Build-> Rebuild Solution; n$ l" V6 T  i8 u0 R/ J. w
9 W; M3 W: U8 C! D
3)  Sign the executable from an NX Command Prompt window:
9 P! p% ?/ N% O: A0 w- D& q$ w        You probably already have one open because you started the Visual0 m. |( p8 k0 P( q* B
        Studio or Eclipse from it.  Otherwise:+ n2 H5 x1 K; q) n- R
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
2 a# \: U4 n) L% y8 n% R9 Q
* i( C" ?% u: v2 d  k/ _* \    Java:
: D: `: }9 z6 X7 D. V        signJar <path to your>.jar, c( e' p% \9 a! H" b3 X

7 c( g5 l5 f2 Z# }    C/C++:
$ c9 x0 L+ C8 a% l        NX8.5 and later:, u- \( X% r  N+ u0 x
            signCpp <path to your>.dll or .exe
% B9 r( N4 S. L- K3 X* u) @        NX8.0 and earlier:
8 e  Y9 n& `6 B( M8 W' J# [4 z            nxSign <path to your>.dll or .exe/ J- l6 K5 ~2 X' {+ T- f% m3 A

* F# t0 y7 U' R. p2 t) L5 w9 i    C# or VB .NET:
5 ~) t8 |8 u7 j- O# ^! z' n, p        NX8.5 and later:
9 X  X9 c8 D* M2 {8 ?            signDotNet <path to your>.dll or .exe- v5 B$ U0 ~; ^- _' |5 A8 N; ?0 c. d
        NX8.0 and earlier:
; ]& I5 N7 w( q6 ~4 l            signLibrary <path to your>.dll or .exe9 z" t2 ~1 Q( ?( e3 v( ~

8 C: b/ Z2 m# D% UNote:  You do not need to use the path to the signing utilities because the  ^% c7 P9 s. ]; r) Z3 }3 z1 _
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
( V4 e' L7 h0 }/ a2 ^$ n2 Kfolders.
8 R% p( N' Y9 D. J7 y& F4 c
) D! o2 Q9 u8 c+ 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二次开发专题模块培训报名开始啦

    我知道了