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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

$ t+ A0 a, r- S8 m0 m3 z- u3 v
2 E8 N2 d; D+ Z! Y7 J8 @  I( P1 `* L
( o1 D* Z$ w9 D; g# mOnce you have fully tested your NXOpen API application, you should "sign" it
+ T3 g  m0 W3 U: n. [before distributing it to your end users.  Even if your end users also have
2 w- G* L* S- Q+ Caccess to the Author license which is required to load and run an NXOpen
& [/ ?4 Z# H$ ~- D" a9 }- ?application, signing it has its benefits.
# N5 t- q9 u! U: `; ~4 A4 f  J* l# h: H4 A3 _
    - Your application will load faster because NX will immediately recognize. |4 c- ?3 B; a/ e" }6 a
      that it has been signed.- K: K6 m, t! l* g' z3 J. }7 t) E
    - The syslog (Help-> Log File) will not be cluttered with the output from
% Y, l* c+ a& e& W9 k! o! D& ~      the multiple checks that NX will do to determine whether it can load- V9 ?% s7 L/ n( f7 t9 O
      and run the program.3 h5 l$ k: l' N/ j1 B

9 }& d% z( m& Q) L+ h1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
! m6 l* e- X8 j) S+ [" P/ _& n* k
    Add the NXSigningResource to your Visual Studio project
  B" t& B  m% V6 w* K) {
, W  \  ], P3 v" O    In the Solution Explorer, select the Resource Files folder and; o/ ]3 [% N$ y: j. h6 {
        <RMB>Add-> Existing Item
3 g( s, z; Z7 X
$ B- h& Z1 h! u9 v/ ^3 D    C/C++:
8 h" j3 Y% H. @( S4 Q! I        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
6 U0 q) o$ y8 b8 C8 X8 e    C# or VB .NET:3 q% a4 R7 l  b
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res8 B4 \. i4 b! B; k- l4 }  Y
        Select the newly added NXSigningResource.res and in set6 z8 J/ E* V7 c
            Properties-> Build Action = Embedded Resource4 k! F0 W3 f. h0 o  O5 K+ ~' [+ a

/ N: l; I* Y8 ?7 {, ^2 I2)  Make sure the build configuration is set to Release then- ]5 P" h" q1 i3 c
    Build-> Rebuild Solution
) G9 c/ F8 ~9 l7 O) J# e+ r7 x+ O4 v9 L% v1 d+ r5 S" ~+ s2 X9 c
3)  Sign the executable from an NX Command Prompt window:
: I* y) S7 L$ r- ~  S        You probably already have one open because you started the Visual
/ @' M* L* i8 ~: f" p. o, O0 A% f        Studio or Eclipse from it.  Otherwise:' G2 I8 f* h9 k) t. I8 T) _
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt3 h5 o' G% C. s6 ?

, x; g2 y  [) J! C- B" ~6 @    Java:
( P8 @8 U; W" h1 j4 R        signJar <path to your>.jar
; V, c0 r' N0 W/ d
# B) K* k6 p4 h3 j# R: j7 R" [/ r2 x    C/C++:  b  |! w2 i6 H* t8 }
        NX8.5 and later:
& s: T! S5 o1 f6 z* f. B5 U            signCpp <path to your>.dll or .exe/ I+ {' a; k3 j/ O8 B$ `
        NX8.0 and earlier:5 X  Z8 Z: z( P) v: {: w" v
            nxSign <path to your>.dll or .exe! l) w' G: U1 o; X" E% r$ y/ O

) J" x- K2 [6 A# ]" B    C# or VB .NET:/ [2 b9 G! @& ]2 ~$ C& ^
        NX8.5 and later:
1 t& @3 e; {2 k) A, S- e* [            signDotNet <path to your>.dll or .exe
% d. K# {( I- C4 P  u# S& H: p        NX8.0 and earlier:. J5 t  t( n+ s( c" [' E
            signLibrary <path to your>.dll or .exe/ |! B7 W1 l# l" y
& p6 V6 }3 G6 c* m! Y% L0 z$ ^
Note:  You do not need to use the path to the signing utilities because the
* E" e+ P. d2 A$ xPATH of the NX Command Prompt shell already includes both the UGOpen and UGII1 h3 f1 w. f' K) Y' H$ F' y6 Y
folders.
. S  e, w5 m0 A3 K  V# ?* `0 S! g# O! [6 [
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了