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

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

  [复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

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

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

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

x
# a) `' Z! _5 N

9 V2 L7 [/ A6 j9 k8 ~9 M$ q1 c. p$ y9 U4 k/ ~
Once you have fully tested your NXOpen API application, you should "sign" it
4 O, d! B) w- O8 t$ ^before distributing it to your end users.  Even if your end users also have
; n+ x3 |! a; Z3 Saccess to the Author license which is required to load and run an NXOpen+ H! k( c4 d8 S8 b1 r6 z# ?
application, signing it has its benefits.
5 F" h5 r0 o* C) g5 b: ?
. M7 w( W) c' W& w% L9 N    - Your application will load faster because NX will immediately recognize
7 a# r' b+ e; Y% d# D- Z1 C      that it has been signed.
) g2 @# u1 K0 U; i    - The syslog (Help-> Log File) will not be cluttered with the output from
0 G: f8 b' J; u; n# M3 o! \      the multiple checks that NX will do to determine whether it can load5 k0 Y# c: m) u4 n
      and run the program.+ [+ @% v2 O1 |  N% [
3 n. r1 G: n! U! Y7 {1 ^* W
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)9 d% W* h4 {: _- g& J8 A: D
( T" p0 ?' n- t; m* c/ G0 A: h5 f" d
    Add the NXSigningResource to your Visual Studio project
* |' j+ o) r. B, Z4 K, a3 z3 R8 a# g8 R& v( J0 B0 S
    In the Solution Explorer, select the Resource Files folder and+ \- ~( t4 m# m* }) ^9 K
        <RMB>Add-> Existing Item* ]; j8 t! }8 v, ^/ i8 U
9 n' }  m3 @9 M! s6 H' S: R9 V
    C/C++:# x1 _. f! p4 X
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp$ h: s9 h9 d% u! e/ t, V  n0 n
    C# or VB .NET:
2 G# h3 g' n: ]        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res+ g! |+ g% y; a, ~' w
        Select the newly added NXSigningResource.res and in set& d3 D/ ^8 b) }+ Q+ p7 n; `, d; a: ^
            Properties-> Build Action = Embedded Resource" e% O7 r# A( @: a

8 x" T7 F, t* {; z4 M  u2)  Make sure the build configuration is set to Release then
( H( q" \; P$ o" X- d( n    Build-> Rebuild Solution
4 y4 w* ^7 m! y0 h% S" j
/ u7 i4 c% h1 P3)  Sign the executable from an NX Command Prompt window:. F, y7 c( n$ f9 m! Y2 P4 F
        You probably already have one open because you started the Visual
- ?- l/ j9 }( l, H0 Q: N        Studio or Eclipse from it.  Otherwise:
7 U+ T8 W7 T* w9 _& v5 \            Start-> All Programs-> NX#-> NX Tools-> Command Prompt7 K" D) G0 ]) E% ~. v
" `- g4 i2 U0 V9 A$ q
    Java:
/ B5 x# K/ u- w1 I  L; U        signJar <path to your>.jar
1 |0 R# t5 |- b" A
; `) M3 \/ m% \" \6 ~% S% N    C/C++:/ ~  L- ^9 o4 f* j; d
        NX8.5 and later:
; [3 p8 L( l& j, D: u/ g            signCpp <path to your>.dll or .exe
! s6 {* A" m! v5 l5 y        NX8.0 and earlier:+ e& K2 k: D4 p+ `
            nxSign <path to your>.dll or .exe% m& J" ^8 n+ I- Z2 B
. J5 I/ L# l' f
    C# or VB .NET:
; s$ _: T  f! e7 [0 m        NX8.5 and later:8 F7 N2 M: @: J) T
            signDotNet <path to your>.dll or .exe% m6 Q! W% \. _" K" j$ I+ V
        NX8.0 and earlier:! l( V/ A% Z4 B
            signLibrary <path to your>.dll or .exe
& K- R/ _# ?- F! a8 ^& L# @! H+ E. q# P1 l/ X% z$ D# p
Note:  You do not need to use the path to the signing utilities because the
! B4 }0 r& _# o8 B) lPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
8 Q) w9 S  f8 t6 cfolders.% z% q+ w% P# J* E2 E

5 U8 E1 C+ e7 g; `
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了