PLM之家PLMHome-国产软件践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

: w3 d! R% C- D9 c" Z4 P, S$ g
/ @( _" u7 R% t8 B% F. ^2 p0 l! g
& q, {, i, F7 c) D" Q. t: f. `Once you have fully tested your NXOpen API application, you should "sign" it8 g3 |3 }) [& F7 h# G
before distributing it to your end users.  Even if your end users also have3 S+ i5 E$ R/ F$ |
access to the Author license which is required to load and run an NXOpen( D3 X9 e6 t; e/ a1 Q$ f4 e7 \; G
application, signing it has its benefits.- b9 c/ ~+ z/ r; s% k' S  k
" k+ _% \' R+ A" s6 U+ g1 j! F
    - Your application will load faster because NX will immediately recognize$ {4 V* g# U1 |
      that it has been signed.
9 a/ G- v2 T8 {0 Y/ O% e    - The syslog (Help-> Log File) will not be cluttered with the output from
& X$ T- h- h. B      the multiple checks that NX will do to determine whether it can load7 h8 k5 i8 z( ?+ }
      and run the program.+ d0 g1 C& J0 w( p& g! ~, \: i

8 L( U; k. @) u7 s8 J/ W& ?1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
/ D! B+ U$ a- V+ P% W# P& @% W- x5 V* k" x$ a) f4 U. |
    Add the NXSigningResource to your Visual Studio project
) e/ d; t# ^' c7 h/ U5 P: G( J' v: v  A( Y# N: a8 q5 Q- u
    In the Solution Explorer, select the Resource Files folder and
; H$ t7 F" }* [& ~* z" J# I        <RMB>Add-> Existing Item! ]# d. x' @( M2 B, m' ]) P
, z' b& j; a8 f, }3 d% p. r8 ?5 z
    C/C++:
9 D( S# E6 C9 e        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
* k) k; {* S' p3 K    C# or VB .NET:
7 |3 S( q9 F. v) f        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
4 j) L$ D5 P$ `        Select the newly added NXSigningResource.res and in set3 U  m  O( Z- W1 H) `- \) I
            Properties-> Build Action = Embedded Resource
7 b# i+ C; S8 {  |4 e
2 u! j, A& P. i1 ?, L2)  Make sure the build configuration is set to Release then
# J1 q, f# l' \! @1 s    Build-> Rebuild Solution
. ^5 K$ O  x$ N- O
. r* v2 T3 T1 T) m+ l& @3)  Sign the executable from an NX Command Prompt window:
% ~- J, U6 c7 ]! l) F" F        You probably already have one open because you started the Visual
7 _, r" o: Q- t        Studio or Eclipse from it.  Otherwise:
6 r* a9 Z: ~; O. X            Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 P8 G7 e" o4 l  u% F6 U

, j1 O* k# m& v; i8 o2 z8 O' |. r" O    Java:
6 k! r) x9 c4 h% w, }5 C        signJar <path to your>.jar: t# O3 @! q: g  Q$ x( H' k

0 v9 N" F. E2 x3 A' E* B    C/C++:
' x, a4 e' D# e4 O, u8 k+ N; T        NX8.5 and later:/ i% F2 x* M' V9 n
            signCpp <path to your>.dll or .exe+ ^- L. A/ X2 H1 U7 E
        NX8.0 and earlier:
' O/ F' m' Y, w& }, s            nxSign <path to your>.dll or .exe4 D+ Q  V( z* Z
6 o4 I5 h6 H9 A
    C# or VB .NET:+ C, u2 F) e" P
        NX8.5 and later:' q, b& g: b0 Z1 u
            signDotNet <path to your>.dll or .exe( `) L; D8 v9 T6 ]  q$ }. ?
        NX8.0 and earlier:
+ I3 T1 C9 T7 _/ Y  y; [% x. E) d: U: b            signLibrary <path to your>.dll or .exe
  `2 C. N+ |3 K6 U! u* |
/ n  M0 P3 G/ w2 ]6 dNote:  You do not need to use the path to the signing utilities because the8 i( Z" g$ a2 D3 X! u( P1 |
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII3 c# `9 a9 l$ t& W7 c! K
folders." k+ Y2 y4 v- p! _5 h$ O0 ^

( h  D5 ]  D; z* H- r0 P
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了