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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

( y; g" ~6 ]) j7 W% h6 ?/ k# q: w' e
6 ^6 T$ s4 j8 |! Y- Y6 N7 w. s1 ]" D1 B0 @2 T4 C( ^+ R+ U9 r
Once you have fully tested your NXOpen API application, you should "sign" it! j+ ^$ [# L7 H/ L0 p' S
before distributing it to your end users.  Even if your end users also have
+ e& p1 P# ~, u* t1 k9 iaccess to the Author license which is required to load and run an NXOpen
8 f3 t# v3 S7 d0 j# Napplication, signing it has its benefits.; B6 T! Y2 w# q7 s! L* {1 i1 m6 y0 B
/ Z8 L% b' u9 p/ D, u; Y
    - Your application will load faster because NX will immediately recognize
/ [0 x+ J$ S5 X& |) K      that it has been signed.
' V6 u$ p( ?& o9 H    - The syslog (Help-> Log File) will not be cluttered with the output from
) A% r" |/ ?! U+ i' t      the multiple checks that NX will do to determine whether it can load) U5 i' @' h! t
      and run the program." M2 [' g7 |3 f
/ O4 ~# O( ~3 I: f% U2 v8 @
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
8 h' N$ b# `: I# u$ A- g' z2 W, q7 {; [' T1 B& K" U1 [: ?
    Add the NXSigningResource to your Visual Studio project
0 v- }' R* M1 Z( d
) z/ Y, `0 }: k: O" ?    In the Solution Explorer, select the Resource Files folder and
: t, G& F% E. d+ a- M& e; b        <RMB>Add-> Existing Item
. M, ?- g- p4 m; w  B: l' a* P4 U" l3 \# d; `1 ]7 s' A( B5 }
    C/C++:& {" v6 D# H8 `) S6 s) C
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp9 B( f3 A( p- {1 ~; f# U& U4 `% d: T9 M
    C# or VB .NET:
$ M" I  Q% k+ l0 Z        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
3 z3 n" i9 P& J7 Q$ R  [        Select the newly added NXSigningResource.res and in set
6 e1 x& H9 p6 e) y' ]( u  e% ^) p2 a  U            Properties-> Build Action = Embedded Resource- M4 B& @) D9 J  S0 E$ i! p
; ~. j. B0 @3 j" G  ^& N3 V
2)  Make sure the build configuration is set to Release then
0 @( }: d! |4 d  V7 I    Build-> Rebuild Solution9 O: ?& I0 f" h: R& c2 U7 j6 A* v
" w% B! c% r. ]" ^
3)  Sign the executable from an NX Command Prompt window:
# f! |5 x% }7 ]2 ?/ q) t& O        You probably already have one open because you started the Visual- L$ f$ u# X) |# W4 V( w( s: w" Y
        Studio or Eclipse from it.  Otherwise:# {) n  {+ z; V
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt  w2 t# }5 z" g

0 |" i' I% h, G# B    Java:
$ V' S* p8 o0 p1 H1 `: \  |        signJar <path to your>.jar
/ a9 A' @% F2 W" f6 w4 ]$ E, b, {: G8 w
    C/C++:
( C+ _3 u  k0 T( N% e" y        NX8.5 and later:
  D% [8 E& h8 j; I8 z& s            signCpp <path to your>.dll or .exe3 W  o) J1 h  j
        NX8.0 and earlier:+ m( }8 r/ p4 e1 X
            nxSign <path to your>.dll or .exe$ B* l, Z/ d8 A* W3 z5 ~; r- G% k7 p

& P5 I, z8 y6 _8 T) b1 e+ }    C# or VB .NET:
1 ^. q2 N/ M) K4 B3 @( U  M        NX8.5 and later:  S. y% T" c- ~3 ~4 K2 [
            signDotNet <path to your>.dll or .exe6 _9 N/ e6 H" {
        NX8.0 and earlier:: f. w: t. j3 u' t
            signLibrary <path to your>.dll or .exe5 c! s) r. O; A
3 M) T. }* ?' I+ L6 s9 W) O9 s) _
Note:  You do not need to use the path to the signing utilities because the# j. {+ |: U' ~6 Q! y/ F% ?& }$ F
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII# B. c- |, D( Y3 f1 G5 t6 w
folders.
$ I" G' Z% {5 Q4 Q; o0 T7 a3 b) ]# Y8 o' ^) J: r6 |$ w" G
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了