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

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

  [复制链接]

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

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

admin 楼主

2015-2-25 13:00:05

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

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

x
# R% u# E9 l3 v# f

# _& ^+ ~, ~7 H* s, N5 d9 V* ~" l& [; C2 E* }) W
Once you have fully tested your NXOpen API application, you should "sign" it1 `3 @2 a6 A1 L6 Z1 d3 e
before distributing it to your end users.  Even if your end users also have
& t7 o- v( O+ ]& A+ o; ]( qaccess to the Author license which is required to load and run an NXOpen
7 t+ @4 i2 E" b2 |4 C9 m0 Vapplication, signing it has its benefits.- n4 B) L, R9 _3 i9 v* X; v6 s
) d+ g1 X, E  t  j" @
    - Your application will load faster because NX will immediately recognize) J' L6 O+ Y, }, [9 S2 J: p
      that it has been signed.
3 A. r: F8 P8 [7 p7 Q    - The syslog (Help-> Log File) will not be cluttered with the output from
. l# f& P0 C) C( D1 _      the multiple checks that NX will do to determine whether it can load
# S6 h4 ^5 D3 X: m8 ]" h      and run the program.
/ _2 ?! k% ]2 O' E+ g7 ^: k" E) v! [1 F- D1 }" A& a
1)  C/C++, C# or VB only (Java: Proceed directly to step 3)
6 E2 d; P2 b  v2 a3 m4 I. q& r; K& M- i, {
    Add the NXSigningResource to your Visual Studio project. I  w' C2 \( z
! Z1 I9 F* W( ?) |6 `, I
    In the Solution Explorer, select the Resource Files folder and- T+ N9 d: m: ], O' m- e3 [
        <RMB>Add-> Existing Item2 u* {9 o1 S$ n/ b+ W* d. ]) A3 f5 a7 f

! S9 o% h6 z7 V* B3 F    C/C++:
6 S, ^2 ^! n8 L% p9 ?+ w        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.cpp" x' q8 h( Z- J# g- o* P
    C# or VB .NET:/ v9 V. s: h+ t7 Y* t( O9 Q
        Browse and select %UGII_BASE_DIR%\UGOPEN\NXSigningResource.res
3 {4 d: g9 u2 s% V9 q8 m: U        Select the newly added NXSigningResource.res and in set
* E+ U$ r. i" K2 ?( H            Properties-> Build Action = Embedded Resource
" B! T9 v; b% J: t$ l4 c. p* C
$ D: Z0 Z& W% _. \2)  Make sure the build configuration is set to Release then
8 ~  ~; z6 g% F2 A    Build-> Rebuild Solution
& D5 {% ?+ Z3 ~6 o% v( v0 f7 f: k
" }. M: z& Z) [. t% k& d0 x3)  Sign the executable from an NX Command Prompt window:4 T+ S0 I9 @' r% O' \2 F
        You probably already have one open because you started the Visual6 c" H- M0 Z/ V; ~" i( p) Q
        Studio or Eclipse from it.  Otherwise:7 S. e, N' C( U; n
            Start-> All Programs-> NX#-> NX Tools-> Command Prompt
& q- W. {- P4 ~7 X3 L: ^7 @! K. Z4 w3 J& e
    Java:  X8 L% ]( B1 d$ R3 Z1 ]
        signJar <path to your>.jar
( h6 \& }/ u8 X7 p1 [* Y. [- s
' p0 ?* j( v. X# E* `" K9 ~    C/C++:
/ M  h, {( S$ y4 J: ]! ]8 N        NX8.5 and later:6 [0 @5 U& N# d* {+ ?: J
            signCpp <path to your>.dll or .exe8 r1 P5 J  |& G3 P
        NX8.0 and earlier:
  L/ f; k6 l/ N7 G2 L: ~& I; }( W$ x5 p! r            nxSign <path to your>.dll or .exe) V# j! B0 z, m* p& o$ t
) p: Y; Q- i; g5 V
    C# or VB .NET:
$ }+ T+ K! G5 |- C5 q0 @        NX8.5 and later:
# G& ]4 ^7 B5 ^9 y            signDotNet <path to your>.dll or .exe
: {6 o% r( w$ ]2 U* m! b% G+ L7 a        NX8.0 and earlier:
  O# c. ]. E9 o            signLibrary <path to your>.dll or .exe
. A$ C+ W! w$ }9 o! }7 M4 }5 r/ |, b* M+ L+ t8 ]
Note:  You do not need to use the path to the signing utilities because the' f% l6 n# u' Y0 f
PATH of the NX Command Prompt shell already includes both the UGOpen and UGII% I( u* |2 h* R( d  ?4 W
folders.
( A8 c: d% z4 s/ G2 G4 ~7 k' J, F1 f1 `* S) [9 ?4 l) 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二次开发专题模块培训报名开始啦

    我知道了