PLM之家PLMHome-国产软件践行者

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x

2 m3 C6 f. `/ w" w9 M, ~- B/ l4 L
/ {7 C) W7 Z# `) `# M8 y" Z9 @4 B: D4 ^. h3 O/ L
Once you have fully tested your NXOpen API application, you should "sign" it0 x$ b3 |" V7 G# F+ Z9 W1 w
before distributing it to your end users.  Even if your end users also have
3 i$ B6 g# g" J, g/ o' B9 [access to the Author license which is required to load and run an NXOpen1 w2 V0 T* Q8 U' V; r
application, signing it has its benefits." u- l( J1 z8 ~. a$ I: R
  B7 K" y/ g2 ]# Q% H
    - Your application will load faster because NX will immediately recognize( B. C6 B* _8 j# l; y; k* ~1 |$ A
      that it has been signed.
' _; r+ l' Z* Y    - The syslog (Help-> Log File) will not be cluttered with the output from
, k' ?, G; E- N; M      the multiple checks that NX will do to determine whether it can load
1 b: ~  f2 o7 v8 @$ d6 b& P      and run the program.3 z+ h& I3 ?1 F
/ m, e0 {5 i& q. r4 H) E- \
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)# M0 F6 [) ?5 x  y+ h
: k# }/ K/ m/ D1 b. t8 F
    Add the NXSigningResource to your Visual Studio project
3 G: {/ L$ Q; o' @4 Z9 ?
) w7 z+ K* R! I, d    In the Solution Explorer, select the Resource Files folder and9 U/ `. d) r6 I4 I& C$ v  C
        <RMB>Add-> Existing Item
, A3 z7 U7 ]/ e" x- S% u& _$ O" q. r
    C/C++:+ d* f% \! g& v0 g; n% |, d
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp$ V. ~1 h7 o7 s: T8 `" k" O
    C# or VB .NET:5 i8 o+ P0 j4 c1 B. Q8 _3 s
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res- z+ Y/ w# S% B3 ~1 ?2 r
        Select the newly added NXSigningResource.res and in set
! o+ d- x. ?( J8 i6 T8 X            Properties-> Build Action = Embedded Resource$ N6 T% r1 Q' p9 o, G* z

9 \; f$ K+ I& W# z: n2)  Make sure the build configuration is set to Release then, Q7 Y. v9 O3 A$ _0 A- k+ _
    Build-> Rebuild Solution
: ?+ o0 _& o3 T* I2 ^' t- d3 V
+ q, C, B3 {4 Q9 H6 ?# \- u3)  Sign the executable from an NX Command Prompt window:  M- @) g/ l* v; T- J! q1 ^& |' c
        You probably already have one open because you started the Visual& B8 q3 q" T3 ^$ n
        Studio or Eclipse from it.  Otherwise:
5 D! ?  M: q$ D1 m. u9 f/ t' n            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
* x' b, J  _5 o" J9 x. I
8 Q) O' z- Y: ~: O  _( u% \    Java:
! Z& b7 O2 _4 o        signJar <path to your>.jar
! L2 `% G: s0 |6 u1 a# p: C$ l( K  T: k. w+ Y) G+ `
    C/C++:% `7 |) \  o) n- F
        NX8.5 and later:
: {7 }& p% G: C$ C4 w8 y: S* O            signCpp <path to your>.dll or .exe: P. I& ~; Z0 a5 o" j
        NX8.0 and earlier:
' Y3 D. r. E$ T# M4 L) i            nxSign <path to your>.dll or .exe
  g: q3 k( k& @2 q% Y0 v
( @: [# R8 Q  `. t6 t1 `3 z7 ]; H    C# or VB .NET:
6 i9 \" ]! s5 }        NX8.5 and later:
: z, b) |2 C: l6 a' N7 y            signDotNet <path to your>.dll or .exe
# l2 X# w# _( W        NX8.0 and earlier:
4 |# ]5 v( A8 J( o2 T* ^            signLibrary <path to your>.dll or .exe
$ X) ]' B  ^& i0 K
9 _0 ^" m( ]0 }9 d+ M  |5 B3 j1 e( z* iNote:  You do not need to use the path to the signing utilities because the
, r+ n- _: V' qPATH of the NX Command Prompt shell already includes both the UGOpen and UGII5 x. [; q4 l5 c9 M, }" [' k
folders.- V4 P* K; N3 P, `. v

) B- B* h. L& F- X! 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二次开发专题模块培训报名开始啦

    我知道了