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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

; {9 z1 w) `* o
& \5 a; q6 o: E2 {1 y) @, ^5 Q  Z6 i2 \$ n2 \$ C
Once you have fully tested your NXOpen API application, you should "sign" it( U  T/ v& @6 c# @* ~
before distributing it to your end users.  Even if your end users also have4 `+ E+ P/ K3 Z& }" a; E
access to the Author license which is required to load and run an NXOpen4 T, ~" G% _6 {5 l3 z. D1 E
application, signing it has its benefits.4 F1 q) j2 C8 M# X

- N* C2 z/ m+ W    - Your application will load faster because NX will immediately recognize+ W- `  ~/ O& F: R" R' H' ?8 i) s
      that it has been signed.! z8 @) A$ d0 v3 p
    - The syslog (Help-> Log File) will not be cluttered with the output from3 D% g- R" ^: @1 _9 n# A
      the multiple checks that NX will do to determine whether it can load: u( ~: q1 g' Y1 [7 Y2 |
      and run the program.
1 M2 W+ }$ P% y/ [( C2 J; S2 o  h0 |4 l( Q$ w- {+ S+ w  Q* \
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
, G$ n+ x& v! T7 }% y! Y+ L+ M/ F* l3 Q8 u0 q" F' Z9 o9 A, \
    Add the NXSigningResource to your Visual Studio project* m# x2 S' t( Z7 y+ t( O( h
& Z7 T2 T$ q" C+ A
    In the Solution Explorer, select the Resource Files folder and* |' ]* P, Z) u9 t
        <RMB>Add-> Existing Item
8 X' k; `" e4 X
$ d) m. \; Q6 _) p! w    C/C++:9 S6 r( X+ B0 K; q! v
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
' V1 b/ g  W0 o6 w& @    C# or VB .NET:! H) [" f' ?/ D  j, V  _
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
! J+ \9 {+ m: @        Select the newly added NXSigningResource.res and in set
- M# A! h, {# ~# D6 J) G- b7 I            Properties-> Build Action = Embedded Resource6 }0 b7 m+ o/ N5 [! r7 N5 w% L' ~
. Y. x! v+ l( f
2)  Make sure the build configuration is set to Release then
( i2 f( j1 c4 m: f" u2 @6 W& G    Build-> Rebuild Solution
* @/ {8 |. C& r, f" W( p: E# X# W' s6 k& D& f+ B+ a- b
3)  Sign the executable from an NX Command Prompt window:
' X/ D1 i' |! {( [% }# x+ n6 x        You probably already have one open because you started the Visual. Q/ A- w# U' r% }
        Studio or Eclipse from it.  Otherwise:0 {/ C4 F: ^. Y( @
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt/ w! V# v6 |) X+ b* |

& n& r* p! H7 F    Java:
( b4 q- h5 a- T; Q, [- \5 K        signJar <path to your>.jar
" u  E$ a# i+ C9 ^
; ?1 C: Y, ]+ }# ]    C/C++:
& k* J& A, G; B0 Z' Z0 w        NX8.5 and later:
2 f/ b  _2 }- v9 ~6 c1 e" o* |2 v2 O4 K            signCpp <path to your>.dll or .exe
* `! J% P7 L( X4 U! W" E        NX8.0 and earlier:
$ h7 _; G) z  A/ M2 t1 S4 ~            nxSign <path to your>.dll or .exe$ i. l* U1 B$ Z$ @
* e6 N. `" e+ A$ ^0 E
    C# or VB .NET:2 w' v+ g4 ~7 O
        NX8.5 and later:
" ^4 ~8 x' k0 s5 t: G0 w            signDotNet <path to your>.dll or .exe1 h  }" A) K0 z, `) j, H6 u
        NX8.0 and earlier:3 M  t/ Z2 b. }' ?) X
            signLibrary <path to your>.dll or .exe
! Z4 `; \  d* ]" j: X1 |% P" F# s' f1 F3 m' v
Note:  You do not need to use the path to the signing utilities because the
8 H& V' F8 E- _% N4 LPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
! y; Y2 L0 z% X7 r5 c; sfolders.
& |! g$ j/ k' w  S+ H" J# T% l- B$ _. 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二次开发专题模块培训报名开始啦

    我知道了