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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
# j$ }; l  M3 o) [

6 Z4 D, t/ M- Y- t! E2 I* I2 e7 N( _" S  J' W
Once you have fully tested your NXOpen API application, you should "sign" it
- Q  d# i! T; [+ |6 N7 T5 Ybefore distributing it to your end users.  Even if your end users also have0 ]' s. H' L, ?9 e
access to the Author license which is required to load and run an NXOpen
5 V5 ~  C4 n# W, g- g, `7 fapplication, signing it has its benefits.# y7 F1 O4 q+ z
& o7 b- `: t( n4 ^) n
    - Your application will load faster because NX will immediately recognize
, ^5 R5 ?- ?3 w% T; w6 O* a  _6 J( N. I      that it has been signed.
% N( o) {  T7 e: Q0 v- \    - The syslog (Help-> Log File) will not be cluttered with the output from$ N9 K( b* V8 D: ]
      the multiple checks that NX will do to determine whether it can load+ a! T( B7 `4 j( D+ f
      and run the program.
; E9 A5 f0 o% |3 [
# X4 x0 a8 {' L4 c4 u/ Q. O3 P1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
. W% h4 {: q, }4 b( i) |/ D5 p' H( W+ D. o
    Add the NXSigningResource to your Visual Studio project7 Q9 ?( A) d3 @; c8 r. @

$ d# I$ T1 _4 h    In the Solution Explorer, select the Resource Files folder and" [* \8 m) N: y2 T$ e* J$ D
        <RMB>Add-> Existing Item
  I; b! F8 F( \' A& k
6 Z8 |" e9 ?2 ]: M. {    C/C++:
' n" W2 K& M& x" y2 @) q( {        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
- l; [2 D& V7 _    C# or VB .NET:2 W: x: `2 i& S2 K* D4 H
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
) @  E4 J$ }. H        Select the newly added NXSigningResource.res and in set
" x  B: c8 s3 R! k            Properties-> Build Action = Embedded Resource/ b, H' i3 ]/ U( ~3 r7 @
4 Q& y9 i; j$ J$ G9 s
2)  Make sure the build configuration is set to Release then5 V# z4 P) T& B6 H+ B5 a
    Build-> Rebuild Solution
1 R  n+ v7 T4 ~. f, A, U3 T
: u1 A# ^; h& B- K4 [- i5 O& T  P3)  Sign the executable from an NX Command Prompt window:
3 S. {) W+ @( a# O4 @  b        You probably already have one open because you started the Visual
/ Q) i+ t# K( R) j# l& r* L        Studio or Eclipse from it.  Otherwise:+ ]7 l5 n# i, {' F8 @5 `
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt2 v9 c; I& [9 E# U3 P$ v0 J

0 ?" N1 W+ |2 {! Y    Java:6 T5 T- w5 b% a+ S2 B
        signJar <path to your>.jar
, {4 R8 u# \  m5 X; D5 B; R: E: ]- q1 V, u* b% t7 R2 H0 R: q
    C/C++:
2 }# n8 @* `1 O        NX8.5 and later:
" |) d" I  j7 N            signCpp <path to your>.dll or .exe
- d5 v$ [4 T  P& j- ^' T  s7 f        NX8.0 and earlier:6 k6 c  K( a. ^& E6 L! a# ~
            nxSign <path to your>.dll or .exe
! a3 N7 V" t3 G+ x# }% p0 a! L
) E2 m9 b1 A  A  F3 {3 x    C# or VB .NET:; L' A+ O& G  W' l" R) J% ?; x. H& h8 B
        NX8.5 and later:( n) J2 o9 w' Q' z2 {
            signDotNet <path to your>.dll or .exe
, ~  n% I# R7 O3 o, W        NX8.0 and earlier:
$ w$ t2 B* ?- @            signLibrary <path to your>.dll or .exe
; v+ P* }6 Q# g
' r" h8 ^! c5 H# Z' z2 l( j6 J! hNote:  You do not need to use the path to the signing utilities because the3 \: R2 y6 ~5 [2 I9 a
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
! }8 A0 ^+ O  e/ ~% M! ?; E1 lfolders.( Z1 i/ G3 W  u5 X9 j4 R4 Y

9 k2 a  L& m$ O- }3 M0 U0 ^4 U
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了