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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

! s) j! D; ~' G6 _/ B3 k
: H2 k7 ?* t0 c0 d
; ]: O+ w, _5 `2 DOnce you have fully tested your NXOpen API application, you should "sign" it- Y& W2 u/ @" p* _
before distributing it to your end users.  Even if your end users also have$ e# T4 Q( R" s7 t) w2 \8 P# |4 Z, \
access to the Author license which is required to load and run an NXOpen
1 j# Q1 d) g' D. h3 ]7 X! L, B  Aapplication, signing it has its benefits.
6 t# A$ ~: `3 u2 F8 t  p8 G; h
6 x% K/ S1 X' |, U    - Your application will load faster because NX will immediately recognize$ W* T$ S9 J5 q- ?6 P- m; D: [
      that it has been signed.( J  e; s' e- r. K2 q0 m
    - The syslog (Help-> Log File) will not be cluttered with the output from) ^! y+ k3 O5 m3 H# [
      the multiple checks that NX will do to determine whether it can load. v( ^9 e( M' `4 h0 ^+ r
      and run the program.! z# o& R# K" F' Y$ U
3 l2 C1 @; F, O+ k* @% V9 n
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
2 d# Z' J7 |( c$ C: R
0 J9 E+ M; }  s* S- m7 a    Add the NXSigningResource to your Visual Studio project
# s* X6 {3 O. ~( n) l3 F' R! }. c: L- g
    In the Solution Explorer, select the Resource Files folder and
1 ^) L7 C6 A  n( k: v        <RMB>Add-> Existing Item
5 \3 k! c  x5 u: P' u
" E) P# o9 `9 y# C) M5 Q+ |    C/C++:
8 [) D4 L/ D% T. a" ]+ b6 O        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
! q1 V0 Z8 D6 v  c% T. `% v    C# or VB .NET:: P0 `( }8 L$ R& ]$ N
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res, O! B  V; E+ P. t
        Select the newly added NXSigningResource.res and in set  y0 J/ r! Z- F4 k
            Properties-> Build Action = Embedded Resource  V+ r  z+ Q, z9 o8 l" x: S

7 i9 c+ b# d. `( C! F2)  Make sure the build configuration is set to Release then6 M& e; K( [. I. `
    Build-> Rebuild Solution4 @5 A4 i0 _$ ?& _% @) f5 [
& P' M% ]! v* i6 I
3)  Sign the executable from an NX Command Prompt window:
3 O. Y2 z) m' {; u        You probably already have one open because you started the Visual
2 a; d% H# L9 Z: T8 E5 D: [* G        Studio or Eclipse from it.  Otherwise:
" Y! M" p, y2 V7 h& ^            Start-> All Programs-> NX#-> NX Tools-> Command Prompt! u6 S* |- ]8 k' {8 A! ~% U7 W

7 c  t; u) s& m4 y    Java:/ ~& A. B# g( `; J
        signJar <path to your>.jar
. R) q5 }' T* \8 [# e5 I5 m" K2 V; h. L/ N& k7 D$ @
    C/C++:
, s5 h+ F: l: S( I        NX8.5 and later:
4 q# L& s, Q: B& f. a( x            signCpp <path to your>.dll or .exe- T: S" ~) C* b' p
        NX8.0 and earlier:
0 p9 M) P; ?1 t; m2 P$ V6 {! p            nxSign <path to your>.dll or .exe
3 |% E7 K/ R5 U. q4 d2 S
0 @  R1 L5 M3 H    C# or VB .NET:
. O$ t) H6 Y' P- n& J( T        NX8.5 and later:7 ?! H, p- K; `6 x$ a8 q( o* ^$ W
            signDotNet <path to your>.dll or .exe8 `% n- u+ V7 b( @0 f
        NX8.0 and earlier:
1 w; k7 j1 T4 N) Z0 f            signLibrary <path to your>.dll or .exe
9 ?* _; N  \  t0 [/ r& B( U! f0 y: d# V: R% b' U  y( L+ X$ Z
Note:  You do not need to use the path to the signing utilities because the- r! S/ g; q  b' d8 K5 i: O" N
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
. c: M4 s: y" |; p/ Wfolders.& U* K4 C* o. A: t9 `, H
' n+ T& w6 U. P1 k) @- _# J
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了