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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

& ?3 a1 \, f! h/ L" [' ~, W. ^
5 H' J) s' C- E$ m0 Q5 o8 v
0 g4 h+ s$ |* d% I4 WOnce you have fully tested your NXOpen API application, you should "sign" it
1 `# p! h! u5 W$ J0 q9 abefore distributing it to your end users.  Even if your end users also have
( f) c4 t5 X, ]6 raccess to the Author license which is required to load and run an NXOpen5 c! Z' Z9 {1 \9 n
application, signing it has its benefits.& B7 D* n4 H3 d5 }2 K( c
+ h# {2 @' `% K( g% q, Z/ o
    - Your application will load faster because NX will immediately recognize6 F) P1 ~, N- d
      that it has been signed.
" e. w( I' T" ?8 C5 Q    - The syslog (Help-> Log File) will not be cluttered with the output from
/ c( e; d' r1 F( z8 @      the multiple checks that NX will do to determine whether it can load
: B4 \$ m# e- k8 a      and run the program.9 q8 Y, b+ `' P6 ]" t& E) s8 M

; r! N  l  `/ g% h1)  C/C++, C# or VB only (Java: Proceed directly to step 3)* m, X5 F% ]+ [# f6 _) {

6 o; `6 O; x: l3 A    Add the NXSigningResource to your Visual Studio project
+ }# s$ J9 v9 J$ |4 K$ o
9 b" D% a, K) F9 X    In the Solution Explorer, select the Resource Files folder and
; B& E! A; O2 F. y        <RMB>Add-> Existing Item
5 ^" W3 e6 o& O7 p( ?
( e# H! x4 `5 p# P: _; L8 N. l    C/C++:
$ Y6 w0 m# ^3 S) h4 k2 L' R        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
# u  A) Q# m* c+ `& Y  S" w* N6 }    C# or VB .NET:
+ z* w) Q+ h" I* k+ _; u        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
4 K8 }. Y) P% v        Select the newly added NXSigningResource.res and in set
2 @9 v# [: C' [4 A2 o* N* m            Properties-> Build Action = Embedded Resource
! H7 u& b3 f$ i8 ^6 _! w) w2 H' M3 ^) Y9 B. s) K+ d
2)  Make sure the build configuration is set to Release then! G: m# k1 L7 O& f# W
    Build-> Rebuild Solution
  b8 A2 c; M" e# B1 l( ]) M$ j* B$ ~. j. S! V
3)  Sign the executable from an NX Command Prompt window:
6 y7 w) I- a% t7 Y, r6 p# S* U        You probably already have one open because you started the Visual
3 a# Z; s# p$ m) E$ \        Studio or Eclipse from it.  Otherwise:
5 [6 F6 Z/ Z5 y( x( H            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
9 R; g. t- @1 \
$ @! F( _  u; A7 Y9 C0 T$ @, z    Java:
* Y" ^' D" c+ D- N* N: Z: S        signJar <path to your>.jar4 E7 J5 d2 o, X! {6 F1 q4 s6 {0 m5 C/ o
. i0 L2 w7 d. C1 m
    C/C++:
, i4 Q" a5 C) k1 `7 m        NX8.5 and later:9 d/ z1 r8 |" t3 Y& m
            signCpp <path to your>.dll or .exe
! G5 M4 x$ R$ G5 R2 f        NX8.0 and earlier:! u* ~/ f  t) o4 X2 a1 s" V" X
            nxSign <path to your>.dll or .exe
7 [+ }4 U) X% R" _9 X# L4 q+ y2 v4 p
7 m8 p& x. y3 {8 x1 {3 f6 P    C# or VB .NET:' e/ g; C: D$ J# A( O3 u" H' }' [( S$ l
        NX8.5 and later:0 K9 s( ~  F4 B. i9 W" }% ?3 T
            signDotNet <path to your>.dll or .exe. u! R0 h6 e6 F3 t2 d4 L, Z
        NX8.0 and earlier:* H" W  d+ B% [/ N
            signLibrary <path to your>.dll or .exe- |. E2 d- ]/ k- w, z$ K/ x' O; G

) Z+ }! g& `/ m: Q% g7 h5 l3 n: DNote:  You do not need to use the path to the signing utilities because the
: G- {! x4 c7 w  OPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
7 a* `" l4 l3 ofolders.
! K" g) R9 ?$ J% M0 l1 v+ @  p1 d: {
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了