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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
8 U2 h6 d5 ^& X6 r6 G9 j/ L  j
; S4 P2 `+ P& o- l! }
# ?: Z8 a! G7 w3 G6 j" k9 O& _$ `) H
Once you have fully tested your NXOpen API application, you should "sign" it: u+ @; m$ c: [5 \
before distributing it to your end users.  Even if your end users also have, a" V7 |' Y8 m. `1 @) x
access to the Author license which is required to load and run an NXOpen
2 e: _1 g* s) X, }5 Napplication, signing it has its benefits.; A9 \8 k9 ?/ D; I! w3 i2 r/ `
  J) p9 h( e* p( }2 n9 V
    - Your application will load faster because NX will immediately recognize
5 Q# V( j) |8 m( v  ]      that it has been signed.
& A' U# S& k8 t: K% g$ ?    - The syslog (Help-> Log File) will not be cluttered with the output from, l) c8 Q% V( s+ k: \
      the multiple checks that NX will do to determine whether it can load
7 L9 q2 P2 J7 F6 I' N      and run the program.6 s4 \3 M9 v# k1 A( G

2 k  j. c/ \' D, X( l7 M1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
6 G8 q) w5 `4 n8 b' H7 K2 `! P6 X
    Add the NXSigningResource to your Visual Studio project
( s; f9 J& z$ Y+ E! P% m) Z9 ~. H
9 n8 W0 i: N4 j6 o: H2 P    In the Solution Explorer, select the Resource Files folder and
; E% z& }& d% t, z! j% z( }        <RMB>Add-> Existing Item1 b9 \- Z2 F( T( l' X& a

$ B& r, z& F. I/ Z% g( R    C/C++:. P0 g0 P9 Z2 E* W
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp& r! Y+ Y, R$ P2 ?# Y1 u* K
    C# or VB .NET:- C2 ^4 ^# E) w
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
. b1 x$ v2 B7 |) b9 F        Select the newly added NXSigningResource.res and in set
2 d6 _+ {: p6 k7 F% i3 c% d! X& z            Properties-> Build Action = Embedded Resource
; i  Z% @# }$ P# m& X! L! c$ |2 ?' A* u! U5 W* G( _8 E* }+ ^
2)  Make sure the build configuration is set to Release then
( u: J2 Z4 t' }2 {5 V! U' C    Build-> Rebuild Solution9 M1 P4 Z9 v/ A+ Y* X# r5 {; H
( `! T! s4 \* f
3)  Sign the executable from an NX Command Prompt window:
1 ^6 W2 T. v' Z) \4 z# x- G        You probably already have one open because you started the Visual
8 g4 \& F2 p; [& A; m% }        Studio or Eclipse from it.  Otherwise:4 l" h1 q* m2 c0 i! y
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt5 \4 y* E% d% ~1 \! {0 p8 [
1 H9 {5 O1 t" R9 [4 T
    Java:1 v/ U/ C7 D; F. i* u# G* k/ f
        signJar <path to your>.jar
# y/ J) {0 Q5 M: U$ W0 R9 u! ^2 E4 }' x, B, M( N
    C/C++:
1 _7 l& N9 h, w) G) \& _% ?( O        NX8.5 and later:) ?3 A6 a6 q2 W. Q' i3 A, D1 x
            signCpp <path to your>.dll or .exe9 B6 c7 ?. s" b/ k/ W
        NX8.0 and earlier:) R  X1 }1 M; W- R9 `: L
            nxSign <path to your>.dll or .exe$ E! I9 r7 H: F( G
  {% Z2 ]) l, |: X0 b
    C# or VB .NET:& ], n% X& M- Q5 E$ |5 |  N9 z$ n. L
        NX8.5 and later:
9 p- m8 H1 A4 a- q/ n& A2 |% F            signDotNet <path to your>.dll or .exe
3 P% M- l7 T$ k( E9 j1 a8 m; ?        NX8.0 and earlier:) O* [  ~( n1 r; {+ o* j
            signLibrary <path to your>.dll or .exe1 Z$ E# G/ \: H* E) @5 Y

$ \- c" S/ x7 zNote:  You do not need to use the path to the signing utilities because the
9 i/ m1 n; C' q3 rPATH of the NX Command Prompt shell already includes both the UGOpen and UGII1 d8 J/ L( L8 _+ X. f$ H4 M
folders.3 w% Q, m4 [) N5 z2 O& x% ~0 A
& _1 y) E# H2 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二次开发专题模块培训报名开始啦

    我知道了