PLM之家PLMHome-工业软件践行者

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

  [复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

积分
82170
QQ
发表于 2015-2-25 13:00:05 | 显示全部楼层 |阅读模式

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

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

x

, H; J4 g- ^6 |8 ?1 U- `
% _' d+ k8 O* H8 c& U! N: l# B9 @2 c0 t3 y( Y  l% n8 u
Once you have fully tested your NXOpen API application, you should "sign" it
- y9 x4 n! Q5 w2 `) ^6 Sbefore distributing it to your end users.  Even if your end users also have
% ]& i9 v* R: T; Z/ x2 jaccess to the Author license which is required to load and run an NXOpen
3 M( c7 @) r% e' ~application, signing it has its benefits.
, l: j  j" }% X* [- S% Z- @4 |5 s5 Z1 k  [# C2 w4 u
    - Your application will load faster because NX will immediately recognize5 L/ b9 r6 k6 B6 n
      that it has been signed.
- L) U" f  F8 V5 z% O    - The syslog (Help-> Log File) will not be cluttered with the output from
+ j8 w- h" i" `" S! c. L      the multiple checks that NX will do to determine whether it can load& c6 N7 k- h3 I8 d6 Q, U+ @- \
      and run the program.4 i+ z7 i: y' r
" w% V8 ]$ F2 o9 O: U
1)  C/C++, C# or VB only (Java: Proceed directly to step 3), F: S: C1 r8 {; g  s
3 a1 i- g1 C* W9 B4 B+ k
    Add the NXSigningResource to your Visual Studio project
7 o' |  t9 H" @- A. l8 p
* W- R# y4 R. ], i    In the Solution Explorer, select the Resource Files folder and1 _+ d( x, d: f  o' Z
        <RMB>Add-> Existing Item
; i0 i% |+ p! V  f
2 V/ @, Y( N- Z: C$ `    C/C++:
4 v0 c  {  Q3 ~. S7 t4 _        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp- o1 x- Q" C+ k% y, Q1 ?# K
    C# or VB .NET:* w" }, c0 R% S0 f
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res$ H% F, z% E: [$ T4 S& k" S
        Select the newly added NXSigningResource.res and in set
" A1 l: H' e5 O: i7 n            Properties-> Build Action = Embedded Resource
5 Z  M; }- I0 P! w' K, e
- j$ D8 k2 {4 @  U2)  Make sure the build configuration is set to Release then; [' V1 _* z  Z! J8 k$ ^- l% Z, a# I
    Build-> Rebuild Solution' S: l, ^- z  [4 d2 O

; w& Z' [' q8 [& |: [3)  Sign the executable from an NX Command Prompt window:3 h' p! y* S6 E: B* ]4 l
        You probably already have one open because you started the Visual' Q3 i" Q1 ?; }1 P7 i
        Studio or Eclipse from it.  Otherwise:2 I, t' O, W( u' ~8 |
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt4 ?( h) E) D8 e, b  x
8 D. }! v8 \- w- p
    Java:# t3 c8 V3 _4 r4 I9 v0 ]( n+ A
        signJar <path to your>.jar
* U  g& k  ~1 x! d% _/ J: h
0 e( c  c5 o% w- B3 Z% i    C/C++:% e7 J" ~' [$ _! e: r9 k/ ]
        NX8.5 and later:
9 ]1 C' B3 U$ c  W: ~            signCpp <path to your>.dll or .exe$ u" m& o1 |  S3 K& B+ [" D2 d
        NX8.0 and earlier:! X" q: e$ b- Q9 s5 _4 r
            nxSign <path to your>.dll or .exe
/ n* j+ D1 w1 |% E2 U( q( t9 t; t7 v% _* G! e' a. F, K
    C# or VB .NET:
# S, Y5 ?9 \) t/ I0 K9 g        NX8.5 and later:$ }; S; Q5 t: h+ o: D- \
            signDotNet <path to your>.dll or .exe
& t: G" y0 d, g; _% Z5 _        NX8.0 and earlier:4 W- p6 e+ q8 R
            signLibrary <path to your>.dll or .exe& m1 T& [  }# `& i( V( `* S/ }, q
$ P4 l! i. [0 ^( N! O9 n0 e
Note:  You do not need to use the path to the signing utilities because the! k( {* b; e5 N5 a- k
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
. [$ b5 \+ @/ h2 r( g6 ^" `folders.9 j: r; I+ p4 w0 J8 J) x8 y  M% ^, W* B( l
0 Y1 I  {' {% G7 F0 i
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

1

主题

56

回帖

395

积分

中级会员

积分
395
发表于 2017-4-21 08:17:55 | 显示全部楼层
非常感谢您的分享和宽大的胸怀!
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了