PLM之家PLMHome-工业软件与AI结合践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

  |6 x9 j$ G! K+ T
$ _& G) b# D/ i9 A4 ~( ?+ E- }4 Z, u$ a% J
Once you have fully tested your NXOpen API application, you should "sign" it9 [6 J9 {2 _8 ?0 |
before distributing it to your end users.  Even if your end users also have$ n' ^( n% V) o. I: X+ [3 u, g
access to the Author license which is required to load and run an NXOpen
3 n0 R5 B8 @4 U  Japplication, signing it has its benefits.
8 {1 ?$ f+ O1 N1 Q
/ v5 C6 N9 \- ?/ k    - Your application will load faster because NX will immediately recognize/ y# b* H' t7 k! T* K- X8 P6 x
      that it has been signed.
; y) o& d/ h+ v: k. u3 d    - The syslog (Help-> Log File) will not be cluttered with the output from
* }+ L5 L+ {- D0 I  o      the multiple checks that NX will do to determine whether it can load
; c" N) k% W  M0 E# O3 o      and run the program.1 h/ _) G; V: P% T8 l. @
( e. o( i3 n" i; y6 `
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)! s% q: S+ r/ Z" g& A

( d- t1 c" K6 r1 A1 o. J6 J+ V7 p    Add the NXSigningResource to your Visual Studio project
" J& ~; d, m: s
/ g( G% r+ X+ V7 E9 q4 f    In the Solution Explorer, select the Resource Files folder and( c! R/ t$ r5 b  w
        <RMB>Add-> Existing Item. q5 m. b0 @& P2 Z% o& R
3 v) {( M! n, i
    C/C++:3 s9 M# H$ n8 Q4 S# n3 g
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
5 }& i  d) G( V0 T  q5 I/ F    C# or VB .NET:! R0 M4 t; c. G) o  K
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
# J# h# g7 G: D: W3 }% Q3 O        Select the newly added NXSigningResource.res and in set* s2 b1 B% w2 f2 L, r, J1 w4 A; L# @! A
            Properties-> Build Action = Embedded Resource
* F  K8 G2 n( H3 {# r* D+ ~2 y
7 t! C+ k. J& `  f5 u# A. G8 j2)  Make sure the build configuration is set to Release then  k' }7 M# m& u% ]5 @1 Q5 p
    Build-> Rebuild Solution
1 f" O/ H) j& J. O
& v* E; T8 E7 a3)  Sign the executable from an NX Command Prompt window:
& H) y* @; k2 r' a        You probably already have one open because you started the Visual) p# I( L) Y8 ]# d. g! S- }
        Studio or Eclipse from it.  Otherwise:! }7 w5 o: P( o( `. N" B/ c5 q/ K
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt4 m- c0 C; ?& b1 x$ f
3 `) T. D4 W/ D3 }1 f, R( s
    Java:: c4 v( c% a# _# }, |
        signJar <path to your>.jar1 C" s2 g" C8 G& o7 \1 b- m2 T' g

0 s9 L; ]3 l$ j" h    C/C++:8 K; ?" p) O- ^/ p- @* f
        NX8.5 and later:* w" C$ v8 \: j$ t
            signCpp <path to your>.dll or .exe
7 R; E* b2 g4 F7 w& t        NX8.0 and earlier:- V2 U/ ]/ }. T! `
            nxSign <path to your>.dll or .exe9 i4 u0 t+ F1 A+ o" d3 Y
' ~, h! A5 Q% x- b) H
    C# or VB .NET:: N# ^4 R6 o3 P3 g
        NX8.5 and later:0 H( |3 z* C' l+ m' r2 g
            signDotNet <path to your>.dll or .exe
* i/ q7 v+ ]( [2 n9 k! J* H        NX8.0 and earlier:! @+ T" s5 {# X6 o; Y5 ^/ {
            signLibrary <path to your>.dll or .exe
) @- l3 V  {0 L; V5 T4 f0 p8 j! P" {# k( |
Note:  You do not need to use the path to the signing utilities because the! I2 n, L; A+ _7 n/ X( c
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII  z% q, `( y% v1 e! ~) M" {, a8 c
folders.
1 P4 ]! `- j6 R. p: ^$ P# u- P; x
+ B1 x$ M% r0 w" `
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了