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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
) x. O) O# S, Z: @- c$ _. a
/ W* Z. z7 ?& i' b( }
& u% ~& \: A, G* f! |
Once you have fully tested your NXOpen API application, you should "sign" it
( q2 p" R0 X$ U) ], Jbefore distributing it to your end users.  Even if your end users also have
( l6 _; d* s$ s5 q/ ]access to the Author license which is required to load and run an NXOpen
3 s' v/ ^' Q$ v7 u# N' w5 w. Q$ D- Iapplication, signing it has its benefits.
! i0 n0 D; O* b# v% l  t6 ]- T
+ o8 Y% }" n6 U& Z4 }    - Your application will load faster because NX will immediately recognize
- W( D; t0 H; r7 Q6 ^; E$ R. b      that it has been signed.' j( q. a4 S) v
    - The syslog (Help-> Log File) will not be cluttered with the output from1 R4 ^& b1 l2 s, }( u6 x/ t5 v
      the multiple checks that NX will do to determine whether it can load! ?& b& I; s' n" N5 u% P) r
      and run the program.
4 O' O$ Q& y8 H
! {+ r% {0 {5 u; h* x4 E1)  C/C++, C# or VB only (Java: Proceed directly to step 3)" U. H/ J6 p0 k8 f0 T# ?

0 W/ {9 i; ?. J& _    Add the NXSigningResource to your Visual Studio project0 N. l( o- t: m8 S: w
7 h$ h* Y; Q, y. ?$ i0 I
    In the Solution Explorer, select the Resource Files folder and) g" {) T, j' E* e9 y9 v4 h
        <RMB>Add-> Existing Item1 z% _0 ?* g. m* s
1 r, z+ G  G8 f( C" W6 ~9 V# b) r
    C/C++:2 k+ r2 k# a9 @) \! v7 Z* Z3 W
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
0 N/ @' L( q7 Y8 B" i3 f    C# or VB .NET:& m4 u3 E" Z) z
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
9 g" W- f9 u6 }        Select the newly added NXSigningResource.res and in set# s6 T; ?8 J: K6 L9 e; C7 c* Z
            Properties-> Build Action = Embedded Resource% C8 O  w- L/ C3 y. t5 J
3 ?/ W, |, A4 Y8 B, B
2)  Make sure the build configuration is set to Release then1 c6 X. {! I8 i9 R
    Build-> Rebuild Solution0 W4 I9 Q/ M1 j( C8 H
  V0 |5 N$ ]' g
3)  Sign the executable from an NX Command Prompt window:
# W* i7 [/ x1 b8 B7 G  C3 m        You probably already have one open because you started the Visual
' ^' o0 h1 @- ^        Studio or Eclipse from it.  Otherwise:
6 I1 ~. i) Y; {& E2 T( G            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
) A8 ]1 y9 ]9 ?# W2 W1 c
) V; t6 D0 ]9 i3 P    Java:( [: j: V+ D5 I( S8 N4 S# X
        signJar <path to your>.jar
1 `4 m1 u8 }; q1 k) q& D4 \* x; [! I) |7 F. l* C& B" ~4 s& t
    C/C++:+ z- l& O8 G7 ?# W4 ^$ n$ n0 [
        NX8.5 and later:
* ~; u; U8 i2 |; X. Q+ i) y1 @$ F            signCpp <path to your>.dll or .exe3 E  k  c7 m3 h( c
        NX8.0 and earlier:! m  r3 A& _* Y
            nxSign <path to your>.dll or .exe$ i: N: e5 ~* M2 g

1 q. E. O; j' J+ k6 e" q9 a+ N5 ~    C# or VB .NET:
+ J) ~; S' z* V6 e        NX8.5 and later:, K+ F! K6 a( M0 }( Q1 e
            signDotNet <path to your>.dll or .exe0 M  M3 W6 R1 s  \
        NX8.0 and earlier:
1 O3 d" q- k' k            signLibrary <path to your>.dll or .exe
9 u' c1 _4 X& j7 n! z% B" B
$ s! K( [7 N( @4 c. {, E# @Note:  You do not need to use the path to the signing utilities because the
( y2 b: o% e8 gPATH of the NX Command Prompt shell already includes both the UGOpen and UGII1 p9 d! s# ]- D9 W1 F; F) H
folders.
$ g* U; V( @  h/ p8 c  [$ L0 i9 K  W% f" ]3 F
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了