升级 RAD Studio 2009 的网络组件 Indy10 从 10.2.3 到 10.5.5

Indy 10.5.5  适用于:  CodeGear RAD Studio 2009  Delphi for Win32  +  C++Builder

Lara.style 右手拉拉の精品城堡

今天得到了 Indy 10.5.5 版本,从代码看,应该是 RAD Studio 下一个版本的版本,因为 Unicode 环境下采用的字符串编码器的设计就与 10.2.3 完全不同。

传送字串时,可用的编码器除 ASCII 只能用于英文以外,其他均可以在 Unicode 环境下正确解释。他们有:

        Default, UTF7, UTF8, Unicode, BigEndianUnicode

采用 Default 编码器时,完全能够与以前 BDS2007 及以前开发的网络程序通讯,虽然本地运行于 Unicode 环境。

 


关于 Indy 10.5.5 修改内容如下。

    A、源码 System/IdGlobal.pas
     源文件内的默认编码器是 TIdTextEncoding.ASCII,我改了默认编码器是 TIdTextEncoding.Default,主要是为了兼容以前的程序,默认直接以 ANSI 编码发送与接收。

    B、源码 Core/IdIOHandler.pas

        B.1 TIdIOHandler.DefStringEncoding 的默认编码器是 TIdTextEncoding.ASCII,我把他改成了默认编码器由 System/IdGlobal.pas 程序的默认编码器决定。

        B.2 修改了变更编码器时同步 FInputBuffer 与 FWriteBuffer 成员的编码器(虽然没啥用,但还是改了)

        B.3 修改了 ReadLn 函数后返回读取字串时,可能会未删除尾部 CR 而导致多一个字节的 BUG (使用 Unicode 编码器时)。

    C、其他二个 .pas 修改,是因为对变量不必要赋值,编译时报警告。因为不重要,所以不再列出。

 


  总结升级步骤如下:

1、首先卸掉 IndyProtocols 与 IndyCore 组件库。

2、备份原有文件。(我个人认为是不需要的,原因是因BDS2009附带的 Indy10.2.3 组件太多的 BUG, 几乎是无法采用,而且在 $(BDS)/source/Indy/Indy10 目录下文件也是不全的(system/IdCTypes.pas 就没有)。

   A、改 "Indy10" 目录为 “Indy10.1" 
        $(BDS)/Include/Indy10
        $(BDS)/lib/Indy10
        $(BDS)/lib/debug/Indy10
        $(BDS)/source/Indy/Indy10

   B、改以下文件为 “*120.bpl.1"

        $(BDS)/bin/IndySystem120.bpl
        $(BDS)/bin/IndyCore120.bpl
        $(BDS)/bin/dclIndyCore120.bpl
        $(BDS)/bin/IndyProtocols120.bpl
        $(BDS)/bin/dclIndyProtocols120.bpl

3、将源码复制到到

        $(BDS)/source/Indy/Indy10

4、修改 Tools -> Options

    修改以下节点的目的是为了直接输出文件到安装目录。

   A、[Evniornment Options] [C++ Options] [Path and Directories] 节点
        Package output directory: = $(BDS)/bin
        BPI / LIB output directory: = $(BDS)/lib

   B、[Evniornment Options] [Delphi Options] [Library - Win32] 节点

        Package output directory: = $(BDS)/bin
        DCP output directory: = $(BDS)/lib

5、打开项目  $(BDS)/source/Indy/Indy10/Indy120.groupproj

6、按次序编译,   原则上开发机器使用 Debug 版本。

7、安装以下组件

        dclIndyCore120.bpl
        dclIndyProtocols120.bpl

8、原有工程升级 Indy10 组件到 10.5.5,  请使用 UEdit32 等文件编辑器打开您的工程文件 (.cproj 或 .dproj), 修改时您粗心了可不要说是我教的。

        IndySystem.lib         改为    IndySystem120.lib
        IndySystem.bpi        改为    IndySystem120.bpi
        IndyCore.lib             改为    IndyCore120.lib
        IndyCore.bpi         改为    IndyCore120.bpi
        IndyProtocols.lib      改为    IndyProtocols120.lib
        IndyProtocols.bpi     改为    IndyProtocols120.bpi

9、恭喜,已经完成!

 

 

后记:

 

主要是 Indy10.2.3 版对 Unicode 支持 BUG 太多,无法兼容 RAD2007 开发的客户端通讯程序。

升级后,一切原来是很严重问题均迎刃而解. 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
indy10.2.3 full 完全安装版 D7~2010 版本:indy10.2.3 经delphi7下的安装成功,delphi11和delphi6的安装没有试用 【自动安装】 Lib\Fulld7.bat 双击运行即可。 自动会把bpl文件拷到C:\windows\system32 重新打开delphi7会自动加载 dclIndyCore70.bpl dclIndyProtocols70.bpl 【手工安装】 1.windows的path路径中增加D7的路径 在启用delphi7时,要能加载dclIndyCore70.bpl这个文件 如果是自动安装,这个文件会拷到C:\windows\system32\dclIndyCore70.bpl,所以不用改path 2.delphi7菜单中Library路径中 添加indy10\LIB路径下的System、Core、Protocols下的三个目录 添加indey10\D7 因为这个目录下有bpl和dcu文件 3.删除delphi7目录Bin下的indy*.BPL文件,这是官方旧版本的文件,放心删除。 4.删除delphi7目录下的 Id*.DCU文件,一般都是在lib目录里。 5.打开indy10\lib目录,安装DPK包顺序如下: (1)编译 System\IndySystem70.dpk (只需要compile) (这个不是设计包,不需要install) (2)编译 Core\IndyCore70.dpk (只需要compile) 编译安装Core\dclIndyCore70.dpk (设计包,先complie后install) (3)编译 Protocols\IndyProtocols70.dpk (只需要compile) 编译安装Protocols\dclIndyProtocols70.dpk (设计包,先complie后install) 6.完成 【第二次手工安装】 第一步: indy10\D7目录下的5个文件 复制到delphiD:\Delphi7_Ent\Projects\Bpl IndySystem70.bpl IndyCore70.bpl IndyProtocols70.bpl dclIndyCore70.bpl dclIndyProtocols70.bpl 第二步: 打开delphi7菜单 Component/install packpages/ add dclIndyCore70.bpl 再 add dclIndyProtocols70.bpl 第三步 打开delphi7菜单中Library路径中 添加indy10\LIB路径下的System、Core、Protocols下的三个目录 完成!更简单。前提是要有现成bpl的文件,如果没有bpl文件,还得需要dpk编译
IDE Fix Pack 6.1.1 for RAD Studio 2009,2010,XE,XE2,XE3,XE4,XE5,XE6,XE7,XE8,D10,D101,D102 IDE Fix Pack is a collection of unofficial bug fixes and performance optimizations for the RAD Studio IDE, Win32/Win64/Andoird-ARM compiler and Win32 debugger. ------ Installation: 1. Start IDEFixPackRegXxx.exe under your user account 2. Select the IDE registry keys for which you want to install the bugfix 3. Press the “Install” button Uninstall: 1. Start IDEFixPackRegXxx.exe under your user account 2. Press the “Uninstall” button. This will uninstall the bugfix for all (not only the selected) IDE registry keys. ------ Changed from 6.1 to 6.1.1 (2017-10-30) Fixed: -x-fvs (fast interface virtual stub) ECX usage detection failed for some record return types. Changed from 6.0 to 6.1 (2017-10-29) Added: Option -x-ff to enable “fast floating point” (like Borland C++’s -ff command line option) Added: Option -x-fvs and -x-fvs=n to enable fast interface virtual stub (n=1: replace XCHG, n=2: keep the CPU’s return stack buffer in order) Added: Option -x-fpr to remove XCHG from the function prolog code. Added: DLL import table section folding and duplicate name/ordinal elimination, also for delay dll imports Changed: Split “Compiler64.X86” patch into multiple smaller patches and removed the “Compiler64.X86” patch name Changed: EditorFocusFix now skips the SetActiveWindow call if the mainform (undocked) is not the active window Changed from 5.96 to 6.0 (2017-09-28) Added: Win64 compile speed optimizations Added: Delphi 10.2 Update 1 support Added: Editor Block Completion UTF8 fix (Delphi 2009 only) Changed from 5.95 to 5.96 (2017-04-09) Fixed: Disable DynArraySetLength patch if 10.1 Berlin Update 2 is detected. Fixed: “clang template debug symbol bloat” disabled for 10 Seattle and newer. Added: IDE minimize doesn’t shrink main window to width and height zero. Added: RAD Studio 10.2 support (RTM only)
1.windows的path路径中增加D7的路径 在启用delphi7时,要能加载dclIndyCore70.bpl这个文件 如果是自动安装,这个文件会拷到C:\windows\system32\dclIndyCore70.bpl,所以不用改path 2.delphi7菜单中Library路径中 添加indy10\LIB路径下的System、Core、Protocols下的三个目录 添加indey10\D7 因为这个目录下有bpl和dcu文件 3.删除delphi7目录Bin下的indy*.BPL文件,这是官方旧版本的文件,放心删除。 4.删除delphi7目录下的 Id*.DCU文件,一般都是在lib目录里。 5.打开indy10\lib目录,安装DPK包顺序如下: (1)编译 System\IndySystem70.dpk (只需要compile) (这个不是设计包,不需要install) (2)编译 Core\IndyCore70.dpk (只需要compile) 编译安装Core\dclIndyCore70.dpk (设计包,先complie后install) (3)编译 Protocols\IndyProtocols70.dpk (只需要compile) 编译安装Protocols\dclIndyProtocols70.dpk (设计包,先complie后install) 6.完成 【第二次手工安装】 第一步: indy10\D7目录下的5个文件 复制到 D:\Delphi7_Ent\Projects\Bpl IndySystem70.bpl IndyCore70.bpl IndyProtocols70.bpl dclIndyCore70.bpl dclIndyProtocols70.bpl 第二步: 打开delphi7菜单 Component/install packpages/ add dclIndyCore70.bpl 再add dclIndyProtocols70.bpl 第三步 打开delphi7菜单中Library路径中 添加indy10\LIB路径下的System、Core、Protocols下的三个目录 完成!更简单。前提是要有现成bpl的文件,如果没有bpl文件,还得需要dpk编译

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值