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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
6 g# ?. V, i  d% W
2 N7 H/ t* _6 C

) ?6 I, T, h9 J) d" F+ `Once you have fully tested your NXOpen API application, you should "sign" it% q. O' d; y+ l% V! C% o0 m
before distributing it to your end users.  Even if your end users also have2 G  o3 i6 C  `: l2 X. `1 z
access to the Author license which is required to load and run an NXOpen/ A  i$ t; U0 ?: Q- u
application, signing it has its benefits.# k; D% _% ^' i! t
' ^: w& i; b! w( `8 z( d8 r1 c
    - Your application will load faster because NX will immediately recognize
1 z- L" O) |, m* N      that it has been signed.
$ H; w5 H1 C- u: f% R    - The syslog (Help-> Log File) will not be cluttered with the output from
1 h' i3 K" U2 t. c5 U* K      the multiple checks that NX will do to determine whether it can load  j+ E& P2 Q9 c  Q6 m
      and run the program.
+ Q% P3 c! L! ~+ v% M3 m: c  f* }4 j% f
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)8 g' V) N" w3 l) |
/ h4 P7 z2 r, e/ O' @( s" W( H; _) z, |
    Add the NXSigningResource to your Visual Studio project
* @2 b+ g1 z  p! S$ V3 l  k5 R$ F0 j% b. R, }- u
    In the Solution Explorer, select the Resource Files folder and
- ^1 M5 l; n8 n# R        <RMB>Add-> Existing Item1 h, K0 P% r" g+ N' g9 v7 p8 C" }

3 ?3 P3 {( c7 z$ V+ k4 R    C/C++:
3 r- o! B7 M! |4 G5 S  t8 N        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp  M/ f' g4 o% b6 E% g* N3 B
    C# or VB .NET:
1 T  A1 T. u. e! v& \* L1 y        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
% X5 ^3 B" F- w; O/ G2 Y        Select the newly added NXSigningResource.res and in set: ^+ A3 D4 W- T6 T
            Properties-> Build Action = Embedded Resource. l0 |" h; J5 ~
" O8 {1 O8 {3 g( c9 [# @
2)  Make sure the build configuration is set to Release then
7 q! D# b, f, I! k# M    Build-> Rebuild Solution. G  J6 j5 N4 n3 F/ n: h

0 }! @0 L0 O. ?8 |/ ^, z4 e$ ]+ f* c3)  Sign the executable from an NX Command Prompt window:
# B, E; p9 ]* }* A( j        You probably already have one open because you started the Visual
; Z/ D# ^- X( _7 `: \        Studio or Eclipse from it.  Otherwise:
% I% E7 X/ E* O, c  ?            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
4 h$ G; b3 L( E" `
2 ~8 b9 v; C: W2 g+ S, B6 z    Java:
4 f$ Z* N" e' T/ P        signJar <path to your>.jar
6 s5 [8 A: I6 [" _' c1 U7 o; x5 u
! o9 b. o+ N4 T1 W' ?) E6 K    C/C++:
  k% y) V0 x  r' R) O- J  a- s1 z) O        NX8.5 and later:& Y7 R; `5 v) b7 l
            signCpp <path to your>.dll or .exe" V9 D, i4 F8 [, M7 @- G; `5 a
        NX8.0 and earlier:+ p2 x' J2 H8 ]+ t; R3 X- S
            nxSign <path to your>.dll or .exe
+ w1 X0 v0 G/ N: k7 ]. \. H# l, g# c4 }
    C# or VB .NET:5 p) u! C3 u0 g0 l9 M
        NX8.5 and later:$ K/ E' J" C; g8 ?+ @3 T
            signDotNet <path to your>.dll or .exe" R: Z8 C7 S& T5 r! u
        NX8.0 and earlier:
# A" @) a4 V1 a, g9 ?( t5 P            signLibrary <path to your>.dll or .exe5 d- |3 A, K2 }8 q* u
5 ?5 Z% K4 E9 N. j5 u, X1 m; C; J2 D
Note:  You do not need to use the path to the signing utilities because the
6 J7 b1 o' @" [! q- APATH of the NX Command Prompt shell already includes both the UGOpen and UGII
  B# x4 I2 e1 P) h! u7 D& kfolders.
, Y% t0 F6 K0 w1 e9 L
: L7 j* |( K  r- \1 q4 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二次开发专题模块培训报名开始啦

    我知道了