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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
: H3 E& B' E5 @; E1 J

8 i. v, `+ I% }! V1 e: `- W
3 P- X# ?. W2 vOnce you have fully tested your NXOpen API application, you should "sign" it0 L- K8 ~' p$ ~# a- `7 {# `
before distributing it to your end users.  Even if your end users also have
. }  x0 Q+ g& @+ O  A) jaccess to the Author license which is required to load and run an NXOpen  }1 l: q; X, I1 C, b
application, signing it has its benefits.
8 z7 O0 i* p9 Y' W$ _' h
' {3 k9 |7 B2 N    - Your application will load faster because NX will immediately recognize9 w2 t* T% V( ^8 W
      that it has been signed.- J' D5 v9 M8 Z7 N
    - The syslog (Help-> Log File) will not be cluttered with the output from& N# [  ?& Z6 B' k: `  f+ \
      the multiple checks that NX will do to determine whether it can load
0 m$ U( i& I+ x! ^2 z7 I: Q1 _/ _% s+ J      and run the program.5 N; L# k2 V+ F4 {0 x
6 z2 _9 c# o' k$ F6 W8 D7 i. R
1)  C/C++, C# or VB only (Java: Proceed directly to step 3); l% q2 B5 c6 T
0 P" e( Q5 ]3 y8 r( x. \! D2 `
    Add the NXSigningResource to your Visual Studio project" B- Y5 ~5 [; {) p
3 J7 _, I" E3 X: V4 h6 t$ C
    In the Solution Explorer, select the Resource Files folder and
  E$ v- _# s9 m. E% }2 T        <RMB>Add-> Existing Item
/ E  Y- t6 g. l. P3 b
" [$ }5 ?( e; P' c$ T/ k7 A    C/C++:
/ |$ t$ }: ]" x7 P5 c        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
( }' C: d6 j, M    C# or VB .NET:
' R- z# H. s5 `) q' }" X& v: l        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res3 g9 p  b/ M' S1 E8 D6 v
        Select the newly added NXSigningResource.res and in set+ N( E8 G8 k2 p& h" c! C
            Properties-> Build Action = Embedded Resource$ h) H3 t' {2 l3 T  F1 j0 h# r' R2 _

3 {4 {) y6 e7 T* f6 u, }. T, f2)  Make sure the build configuration is set to Release then
6 ], _# Z9 w/ n    Build-> Rebuild Solution
- x9 q+ z6 S1 V. S* |$ |4 k2 e: H3 v' n) ?0 `" H
3)  Sign the executable from an NX Command Prompt window:1 N6 V4 U6 y0 a5 L% r/ h1 J
        You probably already have one open because you started the Visual$ v. [* E+ M( A$ Y. P- v1 S, k
        Studio or Eclipse from it.  Otherwise:
6 d1 V( _9 T* F6 X" I% v- C            Start-> All Programs-> NX#-> NX Tools-> Command Prompt# g8 @. u: o  ~3 ~* a. N

7 H/ X; \( E, e7 v7 E! a    Java:+ W" g% \; g$ i" a. }
        signJar <path to your>.jar! c; _# a! _# \2 j

6 B5 W3 M. K. S4 L    C/C++:+ M# R4 A- y, e, n0 R/ S( K0 Z
        NX8.5 and later:# S# Q  c+ ~; s! u6 z
            signCpp <path to your>.dll or .exe4 l2 v" x% Z" @, Q8 ?! B1 `
        NX8.0 and earlier:
7 q  Z6 F% Z  L0 h6 d            nxSign <path to your>.dll or .exe) E7 ]' Q. W. Z
* u& t2 N; e* F  P$ k6 z
    C# or VB .NET:
' |# U5 x1 m( ~, v6 M# q        NX8.5 and later:; R, W! ?. B2 F& w5 x( H0 C! _
            signDotNet <path to your>.dll or .exe
  t2 `$ X8 ~  @: ~+ T* }        NX8.0 and earlier:
5 {5 A; M1 m* m) ]$ Y, P            signLibrary <path to your>.dll or .exe
3 V8 T4 }+ F# L7 k+ v2 y1 J9 l  x# u9 y2 M1 N; G1 V% z3 i
Note:  You do not need to use the path to the signing utilities because the0 {7 d- ~7 @) \3 o
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII& ]7 p4 y& P  \2 ?% V/ ^6 r
folders.2 O+ C4 l& v; v  a& g; k: A# x

. d- |% e5 y% a& r/ r; i9 G
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了