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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
& f6 ]' _1 ?( z, D

- S* e4 a! p) |
1 p3 a7 `- D3 BOnce you have fully tested your NXOpen API application, you should "sign" it7 @6 ^) x! d8 U
before distributing it to your end users.  Even if your end users also have0 Q5 x- P" ~. u7 n, ?
access to the Author license which is required to load and run an NXOpen
" h, d1 d! k1 m# u' j# ^application, signing it has its benefits.5 q- k0 y. _! [7 Y
4 Y" _$ G. x& b3 ]' i9 X! T& K
    - Your application will load faster because NX will immediately recognize3 S  x3 g% H9 [
      that it has been signed.% Z2 C8 {+ J# f1 e% B; W- d: H
    - The syslog (Help-> Log File) will not be cluttered with the output from6 O4 \0 {4 ^8 u6 p% h6 P
      the multiple checks that NX will do to determine whether it can load
6 d' I* J9 A) j, R( J      and run the program.3 g7 W$ }: w2 _) y, \% w
/ e/ w3 ?7 |: R3 f) L# r' ?
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)9 x- J$ ]4 r, b1 Z
6 w, I" L2 O& [% q8 i0 p1 o) t) n$ V
    Add the NXSigningResource to your Visual Studio project* W' o# U4 q& S9 V

$ Q5 O  P2 f" F- j/ S4 o; i7 R$ P    In the Solution Explorer, select the Resource Files folder and" H5 r) n4 y( e& h3 I8 ?' L
        <RMB>Add-> Existing Item
/ p0 g- T8 }+ r( Y
' ^; O0 q! `6 e2 I7 v/ K& E    C/C++:
% m4 U+ b2 [2 J' O% U8 v        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp: K8 E$ k! n6 E6 \! A
    C# or VB .NET:
/ p8 @0 B2 e( N" f        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res3 M* {. F( [* d0 L
        Select the newly added NXSigningResource.res and in set" V7 V& q. i! E, T, z  A3 s  b% Y
            Properties-> Build Action = Embedded Resource' Q# B0 n/ R' Q& |* N) R: l
) l! y* ]4 t* H3 c8 g' J
2)  Make sure the build configuration is set to Release then7 B# V/ |# n- l! N; _% C$ ~) d
    Build-> Rebuild Solution) K; Q* I: m3 |# B

4 f3 }% y' M# l: i( Q! |9 P3)  Sign the executable from an NX Command Prompt window:9 x/ o1 {6 G4 a( \& k# F
        You probably already have one open because you started the Visual2 E$ F! X& Z/ g& Y0 W/ T
        Studio or Eclipse from it.  Otherwise:
) Z- e/ t4 M; M/ ~) b7 b- A            Start-> All Programs-> NX#-> NX Tools-> Command Prompt& Y& A, @  w) X4 \$ b$ S
/ a: x. ]- b& o/ [- r- Y& _, @
    Java:
' m0 v: r9 ]2 w) f) A1 s, L        signJar <path to your>.jar" h, F* r' C7 I) ^% ?( n: {, q! q
, G- R( K$ N& [' k4 t$ S  Q
    C/C++:# N2 I5 @9 X; {
        NX8.5 and later:6 |$ `8 o% a: }* Z' Z9 J  z
            signCpp <path to your>.dll or .exe
/ Q) I- U! ^& o6 n( F4 s& E2 l8 a        NX8.0 and earlier:
# `& K, j/ c" |$ s+ h            nxSign <path to your>.dll or .exe
# v6 i. i& y* q
8 W& G- ^$ q( i( X  K    C# or VB .NET:* g. b; L  g; K" F0 W3 j, N
        NX8.5 and later:# r4 \- X& ~) g
            signDotNet <path to your>.dll or .exe
( H; e# x; r. k9 F# r, U        NX8.0 and earlier:
, o- i& Q; [4 a$ F) K            signLibrary <path to your>.dll or .exe, Q- e% X' J$ O/ C! `
; g  u' w4 `; b  y! V
Note:  You do not need to use the path to the signing utilities because the
; H) c' |4 Y& SPATH of the NX Command Prompt shell already includes both the UGOpen and UGII* g- z$ q" S; R8 E. y
folders.
! k% ]" N2 s9 T
$ M# }$ o3 ]+ X5 h
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了