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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
0 j2 Q1 ?( e$ \% a! j
  k  n- c4 ]) T' A
( a; Y. {2 s1 k1 r3 a3 A4 N0 f
Once you have fully tested your NXOpen API application, you should "sign" it
5 g1 r: D8 I+ a+ tbefore distributing it to your end users.  Even if your end users also have- n% b, y2 j7 w! Z& X; `
access to the Author license which is required to load and run an NXOpen
' U" g3 K. @" V) vapplication, signing it has its benefits.
: ?* ]- v" ^: [: A" _1 }8 b
( ^0 G* ~. G8 T5 D    - Your application will load faster because NX will immediately recognize' E4 z" A- e! O% q" ]
      that it has been signed.6 y% F; H. K% i3 ?& S3 L
    - The syslog (Help-> Log File) will not be cluttered with the output from5 ]$ B- K% \  }: r+ E
      the multiple checks that NX will do to determine whether it can load  ~, \, M  M% [4 y
      and run the program.
7 E- @) @& X) @9 d3 i4 C# a, E1 X0 B6 L. b4 W% _& q, U! `
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
+ P# X& I$ u$ L3 S' I
% A1 x: X! v* \1 M/ p    Add the NXSigningResource to your Visual Studio project
2 j) _" y9 ?5 H4 h  b+ \- h: W2 F7 o0 L6 b8 U5 ?
    In the Solution Explorer, select the Resource Files folder and. g. J1 v, Y' V' C
        <RMB>Add-> Existing Item
! i) R, {5 t0 ?) F+ |" J' L3 u4 v/ v- C3 D+ V8 w: Z
    C/C++:
4 D* o2 E8 \8 [        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
  U8 ?8 y" |" \$ m    C# or VB .NET:
  y/ ^8 v$ X' ?2 G  R8 l        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
; f* ?- S# {# u# C: Y        Select the newly added NXSigningResource.res and in set
; T) I6 `3 L4 r6 k$ j: L$ P% l; \            Properties-> Build Action = Embedded Resource! s  r7 }2 Y. x2 ?! d- J
  [; U% ^$ h3 ]( a9 S6 r
2)  Make sure the build configuration is set to Release then
% @  z. D% _4 E4 t! p    Build-> Rebuild Solution- v* N( l: [4 s

( D* R7 t1 v; H  ^, f3)  Sign the executable from an NX Command Prompt window:
; G& y' G6 d$ M6 J6 T- K4 l% c" |& U        You probably already have one open because you started the Visual
9 {/ y0 P! x5 o) c        Studio or Eclipse from it.  Otherwise:
7 r5 K' u: U+ y            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
& K$ E% Q- s% ^$ z
" n+ ~3 p% G1 ]  ~4 M    Java:
8 ^5 f: _4 B7 I% v6 v1 R) V. M        signJar <path to your>.jar
* V) b8 f$ D9 B$ ^$ N
" k5 L+ t  {0 I6 o# X$ p( N* C& d    C/C++:
. c& r& v0 \# i7 v0 p  E7 E: @        NX8.5 and later:
( [- [+ g% m' z1 `" \1 \, }2 }3 |            signCpp <path to your>.dll or .exe' X; c2 B3 g6 I+ X9 Y0 @
        NX8.0 and earlier:
7 Z4 b: l( Y/ y6 K) X2 [            nxSign <path to your>.dll or .exe' p8 ?) g& G8 X# r; I: [

' {$ o7 h8 ~' i( Q! m    C# or VB .NET:
0 p; A1 \1 j5 K7 q        NX8.5 and later:1 X; B+ ]  R- S3 i5 d/ b
            signDotNet <path to your>.dll or .exe
9 L$ c$ v) T9 u& ^2 f        NX8.0 and earlier:
; U7 N$ q  u: C6 o# Q' r            signLibrary <path to your>.dll or .exe+ |7 n  b' Y# s  Z$ D# P
9 ^7 f9 v# G& ]! j
Note:  You do not need to use the path to the signing utilities because the( ~# ]2 l* @/ v4 v
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII& u$ ?  f- K9 i% y2 R0 _
folders.
( O1 X. Q! }6 A9 v8 E* K; G# A4 ]# V7 K% \6 c3 _- Q# i
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了