PLM之家PLMHome-工业软件践行者

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

  [复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

积分
82170
QQ
发表于 2015-2-25 13:00:05 | 显示全部楼层 |阅读模式

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

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

x
3 P4 K5 ~, D" w0 ~

+ a# W  S0 m5 T" U3 N+ i* F: Y$ v7 f7 P3 t+ ]8 Q
Once you have fully tested your NXOpen API application, you should "sign" it8 Q9 K. p2 G. |4 K3 W& `
before distributing it to your end users.  Even if your end users also have. {5 ?! ^$ e( v- Q
access to the Author license which is required to load and run an NXOpen
3 ?( ?* c8 p2 a8 Q/ C  Xapplication, signing it has its benefits.6 q" s4 e* q: t& H$ a1 q& a8 Q1 K

- E. e# r& J# z) |    - Your application will load faster because NX will immediately recognize  f! E4 c% Z7 u) z9 U" ?
      that it has been signed.: ]$ R% D4 R& t* Y. k! w
    - The syslog (Help-> Log File) will not be cluttered with the output from' F" a! o, k; e
      the multiple checks that NX will do to determine whether it can load: ~9 [' q1 l4 |+ j
      and run the program.* S6 p5 R: p0 \: N0 S

# X: W8 D$ I# \7 Q* m  A( P; @1)  C/C++, C# or VB only (Java: Proceed directly to step 3)% u& |8 E2 t+ u/ g1 h
" ?  `2 b( w3 c1 ]5 R$ c7 z1 j; H
    Add the NXSigningResource to your Visual Studio project
) g5 r/ W: A, j3 h1 q$ z5 I+ ]' `3 R1 J/ F- D% l0 F: B
    In the Solution Explorer, select the Resource Files folder and
# d' B3 T6 M2 X+ \$ O' J! R8 s9 X        <RMB>Add-> Existing Item
+ C- @# A3 C; h  m2 J) J# n- s
% A+ f. p. x, U5 w: [7 s    C/C++:
0 Y+ l. @" w$ k" e! o- i        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp
1 a  e0 ~" u8 L! j" V    C# or VB .NET:
3 w3 {% ^5 Y# ~/ b        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res: L2 m2 b  _1 A0 D; a1 I9 s3 Y. B% T0 K
        Select the newly added NXSigningResource.res and in set
- i+ T+ v( a* Q9 s" @, _; i7 S: I% q! o            Properties-> Build Action = Embedded Resource
0 o( P7 {& N1 W, a, @: G. C1 n  `# x
3 d, o+ a% A" r2)  Make sure the build configuration is set to Release then7 c; B2 j0 Q7 a( _$ M  l2 Q
    Build-> Rebuild Solution) ~& ]; k) D8 z

- S: x# l# o: m" e3)  Sign the executable from an NX Command Prompt window:
. x" d/ M' g+ s: p        You probably already have one open because you started the Visual+ y0 Y. t4 k9 y5 S+ ?+ G; h
        Studio or Eclipse from it.  Otherwise:6 a$ E3 Q$ A$ P( o" `8 d, E2 V1 |+ X
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
* G, j* D- G" W- }# m! U4 r) s  `' \8 e: G6 Y
    Java:
0 g* U/ \& f+ g+ F        signJar <path to your>.jar
$ r* L) L5 B6 h' [9 }( Q+ o7 F5 I; s
    C/C++:
% ]) B2 C9 [9 T$ f1 e  _        NX8.5 and later:
" y- g( l# T" Q, i3 x  R            signCpp <path to your>.dll or .exe! m! {/ @4 w# Y8 {$ \' i! _/ C
        NX8.0 and earlier:
9 ]; j  m2 q0 p" W            nxSign <path to your>.dll or .exe; Y7 r/ _' F* x- o( f% U
* b# E4 |2 E  M
    C# or VB .NET:0 D1 Q/ D5 ]; Q) o9 q5 I+ e" o% i) d
        NX8.5 and later:, K% i* Z, W9 s! i; z- J/ B& c
            signDotNet <path to your>.dll or .exe
$ w+ O# I5 H% R2 [$ [+ v; A        NX8.0 and earlier:
2 L; H7 b) B7 {  n" x( z% j8 f2 {            signLibrary <path to your>.dll or .exe
/ H, |; c# w, \# j9 B2 f, x! ]! C6 f! e5 h1 h8 p0 Z# A# p
Note:  You do not need to use the path to the signing utilities because the2 e/ G  p" \, {) D( q
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII
3 D( j; h0 v. y* W$ ?7 q. u7 dfolders.
# H+ g* @$ p! @4 i5 |
5 {( S1 v% N+ C4 J0 {+ j4 H
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

1

主题

56

回帖

395

积分

中级会员

积分
395
发表于 2017-4-21 08:17:55 | 显示全部楼层
非常感谢您的分享和宽大的胸怀!
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech
回复 支持 反对

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了