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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
% v5 c3 y: x  B8 x$ v

2 V  _% u' G" a; O3 a2 s, ~$ f( f) y4 ~, W' l3 L7 T- K
Once you have fully tested your NXOpen API application, you should "sign" it* o# K# x1 a, H/ x; e- z" E
before distributing it to your end users.  Even if your end users also have
% I& c! B+ [  M) ]" P/ faccess to the Author license which is required to load and run an NXOpen
9 F0 j! O/ p6 [application, signing it has its benefits.
" E& B' T$ o: H# I
# e$ {" J* {- X2 q8 U  |% v/ K    - Your application will load faster because NX will immediately recognize
4 }  H4 D. ]* i9 d2 \      that it has been signed.
, c8 b$ ~' [& _, w5 B9 c( R- j* J    - The syslog (Help-> Log File) will not be cluttered with the output from4 H6 Y8 U1 }& S: j* l4 @
      the multiple checks that NX will do to determine whether it can load
4 [& {$ U; U5 ]2 ^: h      and run the program.6 D2 o' ]4 Y0 k: j4 A: e  O9 I
# t7 ]# m; B! T( X' w
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)4 ]5 u$ ]+ L2 H  B% c; T/ |
& [4 D0 \4 i4 X4 {$ I
    Add the NXSigningResource to your Visual Studio project1 Q0 @- [/ S' _. f! t! R1 A6 O

% n1 m2 H: g9 C  Y+ W. W    In the Solution Explorer, select the Resource Files folder and
$ R( q2 m4 w; n- B        <RMB>Add-> Existing Item4 e3 P/ X! E' h. R
% X' Q  _, \1 Q8 S
    C/C++:) }* p# e! c; L" `
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp( g: J6 x5 T0 F" q# I& B! U+ |
    C# or VB .NET:1 {0 r8 R' U# m2 F0 Z4 s
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res( R( z# i$ C3 P. s2 v" o: M
        Select the newly added NXSigningResource.res and in set
/ l' A$ f  p2 p8 n# L* O, H' w            Properties-> Build Action = Embedded Resource+ |) j- E/ g4 p4 `5 K8 J

7 Z3 D- o$ P4 _7 E; e& K6 Q2)  Make sure the build configuration is set to Release then# F! D( [, ~. X) a
    Build-> Rebuild Solution6 q4 q7 R# @, u% L7 b" g  @
: Q, R* M" ?' @
3)  Sign the executable from an NX Command Prompt window:! Y- k5 B, P/ f) b
        You probably already have one open because you started the Visual
0 n; X3 g5 q+ U4 [! a. |        Studio or Eclipse from it.  Otherwise:
8 t% U6 c( w! d3 u4 M  P9 E            Start-> All Programs-> NX#-> NX Tools-> Command Prompt; t) _& \. @; w0 B/ N

, `" t: n1 `2 t5 N' N& P    Java:
+ |8 P: A% f/ X" u' \; C        signJar <path to your>.jar7 n( w: X3 a. }
, @" C' Y) x# n
    C/C++:
! \% a0 E# T3 D( Z% t; v! M* T2 n0 D        NX8.5 and later:
! ^  c- ^% o4 w" `2 k# V            signCpp <path to your>.dll or .exe/ ~0 V3 w) e& U# ]9 t9 w! `( R
        NX8.0 and earlier:$ v$ A8 D% E/ h; a* e! @( C+ ?
            nxSign <path to your>.dll or .exe: F$ `, h# @. I
9 P( @4 ~: d0 p, K$ |# N3 _
    C# or VB .NET:
3 ^+ Q, c/ _) U7 X+ ]        NX8.5 and later:
/ R3 g1 R0 `) y- G# H  J            signDotNet <path to your>.dll or .exe0 p# @1 g* _# U3 x( c
        NX8.0 and earlier:  i4 h# K, a& D
            signLibrary <path to your>.dll or .exe
. @' ^& M/ K( t) J' K6 ^
9 u6 U0 d* i  A' M: }6 f) B3 ]Note:  You do not need to use the path to the signing utilities because the
  A- @& \/ ]0 @; i8 dPATH of the NX Command Prompt shell already includes both the UGOpen and UGII3 h% i3 n0 _" a4 p2 Z
folders.
" _4 S' p5 [* A5 t' l4 o* N. E& D+ }: y3 s- Y* k
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了