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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
3 n% Z+ C" i: P

9 B9 K* q0 W4 y; g- j; O' U, C, P4 j
Once you have fully tested your NXOpen API application, you should "sign" it' T3 `, H1 h, C4 E" j
before distributing it to your end users.  Even if your end users also have
7 I+ z3 p9 b+ s) P& i, B$ N* Zaccess to the Author license which is required to load and run an NXOpen
" t. g4 P7 B2 g) a; Eapplication, signing it has its benefits.
3 |4 |' e# a& e+ X6 P4 s8 S' }# m  ^" [( r
    - Your application will load faster because NX will immediately recognize& O$ r- J" d. h  z) z
      that it has been signed.
8 ?: _1 `# `$ z. w; Z- `9 C    - The syslog (Help-> Log File) will not be cluttered with the output from
* T$ M4 P  p* x; l+ z      the multiple checks that NX will do to determine whether it can load
! ?, `/ H( X3 o# H% p7 `; V9 M      and run the program.
: J0 {  }- R2 m2 W/ @# w6 \& ~" h* G  K1 W, s3 P# f6 r
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
' A6 @! m1 q8 t. J; j0 B0 W  X2 @
    Add the NXSigningResource to your Visual Studio project
* _- ~& l. ?9 @; w4 T; X0 E: f$ U
! X' r. l% b' N) |7 \    In the Solution Explorer, select the Resource Files folder and
5 X3 m0 a% b! X8 Z( O        <RMB>Add-> Existing Item
8 S- B* A* K2 k: i( W; J' n0 i( S+ t. f5 r) M0 f
    C/C++:
4 ~1 K& |; q% |8 h* u7 ]        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp, M- |5 D: |/ o  G
    C# or VB .NET:( q/ t- |7 K1 R% V6 k0 @& l" |: W
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res0 [) n6 G% s: E8 Q4 @( i5 P
        Select the newly added NXSigningResource.res and in set3 P/ ]( X& S  F. H8 F) q# k
            Properties-> Build Action = Embedded Resource
4 w1 b  b" _2 T  Y
+ R6 b4 d( Z" l' D- e2)  Make sure the build configuration is set to Release then8 ~) D. ?! v5 N; o% ]- s
    Build-> Rebuild Solution
1 _% k: j- \: w5 ?
, L  C1 X( U7 |1 R; v0 }3)  Sign the executable from an NX Command Prompt window:& U) P' A% X! `/ L. E
        You probably already have one open because you started the Visual
0 ]' n9 l% Z8 j' M3 p7 ^$ X5 t        Studio or Eclipse from it.  Otherwise:) u" r* |4 M$ Y( |. I0 {7 U8 u; u
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt: Y# Z( _4 k3 P
5 A7 |) G/ q/ ^8 A$ `( a
    Java:/ E& o. ~- t8 t4 V, y. i
        signJar <path to your>.jar% H9 Y0 ~5 H/ ?7 E7 W3 }  I$ ^* w

! [" k8 h* X5 ^; l2 m; P    C/C++:
9 |5 \( L* t  L1 K8 w* B' T        NX8.5 and later:
. |+ H/ o" Q7 ~            signCpp <path to your>.dll or .exe% }( L5 X6 ]6 J" N
        NX8.0 and earlier:
+ C- Z2 T# i8 J& V& v' ]8 P            nxSign <path to your>.dll or .exe6 g* D& P) p/ C# s' _5 R5 @( N

9 Y0 b( @* l" i" M! R. m( O    C# or VB .NET:
2 A# d, d7 c# F, Y+ l        NX8.5 and later:
" b4 `) [5 q0 m2 r* l. z1 V& ~            signDotNet <path to your>.dll or .exe
2 D, W1 Q& o( W: z2 J        NX8.0 and earlier:; \/ x4 ^: u4 `$ J
            signLibrary <path to your>.dll or .exe
' C3 P' y8 n: I: R
* q, @  v3 j0 r8 Z6 g( \4 e5 N1 fNote:  You do not need to use the path to the signing utilities because the
8 s. _) _+ y" C* H3 L2 |0 FPATH of the NX Command Prompt shell already includes both the UGOpen and UGII
6 c4 r: f' S9 E1 _$ x& Mfolders.  ^8 g  M8 Z& v. O& @5 j; T+ Q
. {) P8 O! ]% Z/ X% ^
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了