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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
) {  G, v  `  [- ]9 l( W: k: Y

$ e* [6 L$ E, f0 |( R% c" N  E( d" E# p( a6 v
Once you have fully tested your NXOpen API application, you should "sign" it
* v9 l0 t) \% U& y% obefore distributing it to your end users.  Even if your end users also have6 v6 j( Y8 C! d) g
access to the Author license which is required to load and run an NXOpen3 l: M8 F8 j" P
application, signing it has its benefits.; W3 P. e  C9 [& O  G4 E

2 a& Y, j! P' N  D2 V  j* e    - Your application will load faster because NX will immediately recognize6 L9 n. M0 T% X3 j& w
      that it has been signed.. }# k/ P* ~6 `7 ~( I/ h: x
    - The syslog (Help-> Log File) will not be cluttered with the output from
! l" T1 ~9 ?  p& |, Z5 C4 V      the multiple checks that NX will do to determine whether it can load" y" x5 ?% r6 i/ U. `+ G$ U- T
      and run the program." e) n- X: o1 b0 ^9 [8 q+ A
: j$ d+ i8 x, W* I" Z+ Y$ n4 R
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
+ `. t) ^, P' L) f4 E$ g# I+ S9 h
    Add the NXSigningResource to your Visual Studio project$ g- z* a4 T7 N+ |/ z
  t5 S+ p$ }0 h+ Y9 a. I* _
    In the Solution Explorer, select the Resource Files folder and
5 R/ u. F- K3 z3 F        <RMB>Add-> Existing Item" N9 N4 C" M  e

4 j  Y9 Z" f2 @0 _    C/C++:$ o6 O) {% A9 d, e/ z
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp8 M- e4 z" \" j: V* ]
    C# or VB .NET:
! x* W1 X3 J' B  L        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res0 e7 e7 X8 `/ W; q; [4 R) s
        Select the newly added NXSigningResource.res and in set
8 {' ]# h/ N" g( ]- P4 E            Properties-> Build Action = Embedded Resource
7 P1 B' ~5 h* d5 D* `% t0 N( h0 D  I* s
2)  Make sure the build configuration is set to Release then$ N4 r: b& `2 H# y0 c/ ]0 U7 R  T: w
    Build-> Rebuild Solution; a# O2 C; y' b5 k6 S: l

" @$ c% Z( J7 A; M- [2 K% C5 _3)  Sign the executable from an NX Command Prompt window:- _+ V  ?2 }% M
        You probably already have one open because you started the Visual) g5 Q8 N+ r* M0 a1 ~% D
        Studio or Eclipse from it.  Otherwise:9 y/ H1 T: s8 ]+ q+ G: }( P
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
( @1 r/ T) q" T! C: j/ L6 \
1 I9 A5 x4 k. g: z0 d2 e    Java:; O5 _$ E9 }6 b1 R  X; ?
        signJar <path to your>.jar$ o5 R3 ^" e9 I+ X* I" L. S- v* Q
9 C1 A+ N  h) O1 s$ g
    C/C++:- S7 v2 }7 w6 U+ t
        NX8.5 and later:
1 k. Y7 x( b# w7 e* F- m- o% v            signCpp <path to your>.dll or .exe
, h* X  h. B- d+ N9 O  `8 l4 ~        NX8.0 and earlier:
2 O- q2 b! o8 F* m5 A& j: d            nxSign <path to your>.dll or .exe: X& w( I* K/ h
: k0 e# G! h! j& w: `% s
    C# or VB .NET:
" `' A% {$ C- r4 P2 K# H/ X3 f$ ]        NX8.5 and later:+ L1 ?  R* r/ s# s4 x
            signDotNet <path to your>.dll or .exe
( l& A$ y1 j4 @        NX8.0 and earlier:
2 ]& M) `; h- U9 ^, c* k9 I            signLibrary <path to your>.dll or .exe* x9 q3 D! \* U& `# ]2 b
5 j8 z$ i% ~6 ]- D6 d6 o0 T7 c
Note:  You do not need to use the path to the signing utilities because the" d' E* [) P9 u5 I6 q: a; A' x
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
- t! D5 X9 |) wfolders.
  q) C& U: ?# G4 [/ D1 ^1 {- m( i4 n# C: x
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了