简体   繁体   English

是否可以在Delphi XE和DataSnap中使用Indy 10.5.8.0?

[英]Is it possible to use Indy 10.5.8.0 in Delphi XE and DataSnap?

The case 案子

I'm trying to update the INDY to the latest version for my Delphi XE (Update 1), so I downloaded the latest INDY10 file (Indy_4545.zip) from indy.fulgan.com/ZIP . 我正在尝试将INDY更新为我的Delphi XE(Update 1)的最新版本,所以我从indy.fulgan.com/ZIP下载了最新的INDY10文件(Indy_4545.zip)。

The packages compiles successfully and I can now even see the new version 10.5.8.0 on the about box dialog, but after a IDE restart I got a message saying: 这些包成功编译,现在我甚至可以在about box对话框中看到新版本10.5.8.0,但是在IDE重启之后我收到一条消息说:

No se encuentra el punto de entrada del procedimiento @Idhttp@TIdCustomHTTP@GetRequestHeaders$qqrv en la biblioteca de vínculos dinámicos IndyProtocols150.bpl. No se encuentra el punto de entrada del procedimiento @ Idhttp @ TIdCustomHTTP @ GetRequestHeaders $ qqrv en la bibliotecadevínculosdinámicosIndyProtocols150.bpl。

My free translation to English: 我免费翻译成英文:

Entry point not found for procedure @Idhttp@TIdCustomHTTP@GetRequestHeaders$qqrv not found on the dynamic link library IndyProtocols150.bpl. 在动态链接库IndyProtocols150.bpl上找不到过程@ Idhttp @ TIdCustomHTTP @ GetRequestHeaders $ qqrv的入口点。

After a quick comparision of old and new IdHTTP.pas I found a lot of changes on the TIdCustomHttp class, including the rename of some methods 在对新旧IdHTTP.pas进行快速比较后,我发现TIdCustomHttp类有很多变化,包括重命名一些方法

  • GetResponseHeaders to GetResponse GetResponseHeaders到GetResponse
  • GetRequestHeaders to GetRequest GetRequestHeaders到GetRequest
  • SetRequestHeaders to SetRequest SetRequestHeaders to SetRequest

Along with changed public/published method firms in this and other and classes interfaces. 与此更改以及其他和类接口中已更改的公共/已发布方法公司一起。

After the update, I got a lot of packages failing to load, including dclcxPivotGridOLAPD15.bpl, which in turns depends on dclDataSnapServer150.bpl which encounters the missing method on the bpl. 更新后,我得到了很多无法加载的软件包,包括dclcxPivotGridOLAPD15.bpl,它依赖于dclDataSnapServer150.bpl,它遇到了bpl上缺少的方法。

AFAIK I can't recompile the dclDataSnapServer150.bpl (and maybe other failing packages, I just stopped here). AFAIK我无法重新编译dclDataSnapServer150.bpl(也许还有其他失败的软件包,我刚刚停在这里)。

DataSnap and DevExpress support on the IDE is a must for my day to day so IDE上的DataSnap和DevExpress支持对我来说是必须的

The questions 问题

  1. Is there a safe pre-established path to update to the newest INDY for Delphi XE? 是否有安全的预先建立的路径来更新到最新的Delphi XE INDY?
  2. If not, am I on the safe side by just parching the source code by creating the old public methods and call the new ones on the implementation part? 如果没有,我是否安全,只需通过创建旧的公共方法并在实现部分调用新的方法来填充源代码?
  3. am I missing something else or am I really stuck with INDY 10.5.7 until the next Delphi minor/major release? 我错过了其他的东西,还是我真的坚持使用INDY 10.5.7直到下一个Delphi次要/主要版本?

[Installing Indy for Delphi XE] [为Delphi XE安装Indy]

Yes, the install process is tedious, but it's worth it to get it done right. 是的,安装过程很繁琐,但要正确完成它是值得的。

This is for all Indy components except SSL. 这适用于除SSL之外的所有Indy组件。 (I haven't tried any of the SSL stuff yet.) (我还没有尝试过任何SSL的东西。)

A.) Seek and destroy all Indy files that come with Delphi. A.)查找并销毁Delphi附带的所有Indy文件。 These are no good as the Indy project is updated every single day with new bug fixes. 这些都不好,因为Indy项目每天都会更新并修复新错误。 If Delphi picks up any of the old files instead of your new fresh Indy library, you will get crazy errors from the IDE at all different times that are very hard to trace. 如果Delphi选择了任何旧文件而不是新的Indy库,那么在很难跟踪的所有不同时间,IDE都会出现疯狂的错误。

i. 一世。 Go to Component-->Install Packages, then completely remove all packages that start with "Indy". 转到组件 - >安装包,然后完全删除所有以“Indy”开头的包。

ii. II。 Close Delphi. 关闭德尔福。

iii. III。 Erase all files that match "dclIndy*.bpl" and "Indy*.bpl" from Delphi's Bin folder. 从Delphi的Bin文件夹中删除与“dclIndy * .bpl”和“Indy * .bpl”匹配的所有文件。
(C:\\Program Files\\Embarcadero\\RAD Studio\\8.0\\bin) (C:\\ Program Files \\ Embarcadero \\ RAD Studio \\ 8.0 \\ bin)

iv. IV。 Erase all files that match "Indy*.dcu" and "Id*.dcu"^^^ in Delphi's Lib sub folders. 删除与Delphi的Lib子文件夹中的“Indy * .dcu”和“Id * .dcu”^^^匹配的所有文件。
(C:\\Program Files\\Embarcadero\\RAD Studio\\8.0\\lib\\win32\\debug) (C:\\ Program Files \\ Embarcadero \\ RAD Studio \\ 8.0 \\ lib \\ win32 \\ debug)
(C:\\Program Files\\Embarcadero\\RAD Studio\\8.0\\lib\\win32\\release) (C:\\ Program Files \\ Embarcadero \\ RAD Studio \\ 8.0 \\ lib \\ win32 \\ release)
^^^ Warning: watch out for non-Indy DCUs that happen to begin with the letters "id" like "idispids.dcu" and "idoc.dcu" ^^^警告:注意碰巧以字母“id”开头的非Indy DCU,如“idispids.dcu”和“idoc.dcu”

v. Delete the entire Indy10 source folder: v。删除整个Indy10源文件夹:
(C:\\Program Files\\Embarcadero\\RAD Studio\\8.0\\source\\Indy10) (C:\\ Program Files \\ Embarcadero \\ RAD Studio \\ 8.0 \\ source \\ Indy10)

B.) Download the latest Indy10_XXXX.zip from http://indy.fulgan.com/ZIP/ (If you get a compile error or runtime error using this zip file for any of the steps below -- don't be discouraged! Re-download the zip file on the following day and try again. This zip file gets updated every day and there is a chance that there may be some bugs/errors on any given day.) B.)http://indy.fulgan.com/ZIP/下载最新的Indy10_XXXX.zip(如果使用此zip文件获得编译错误或运行时错误,请执行以下任何步骤 - 不要气馁!在第二天重新下载zip文件,然后重试。此zip文件每天都会更新,并且在任何一天都可能存在一些错误/错误。)

C.) Extract only the System, Core, and Protocols folders into your own Indy library folder. C.)仅将System,Core和Protocols文件夹提取到您自己的Indy库文件夹中。 ex. 恩。
(c:\\MyDelphiComponents\\Indy\\Core) (C:\\ MyDelphiComponents \\印\\核心)
(c:\\MyDelphiComponents\\Indy\\System) (C:\\ MyDelphiComponents \\印\\系统)
(c:\\MyDelphiComponents\\Indy\\Protocols) (C:\\ MyDelphiComponents \\印\\议定书)

D.) Launch Delphi. D.)启动Delphi。 Ignore all failed package dialogs: These are the Embarcadero packages that rely on Indy! 忽略所有失败的包对话框:这些是依赖于Indy的Embarcadero包! (Just click Ok on all errors, and indicate that any failed packages should not be loaded again.) (只需在所有错误上单击“确定”,并指示不应再次加载任何失败的包。)

E.) Go to Options-->Environment Options-->Delphi Options-->Browsing Path - Remove paths that start with $(BDS)\\Lib\\Indy10 E.)转到选项 - >环境选项 - > Delphi选项 - >浏览路径 - 删除以$(BDS)\\ Lib \\ Indy10开头的路径

F.) Go to Options-->Environment Options-->Delphi Options-->Library Path - Add your new System, Core, and Protocols folders from step C to Delphi's library path. F.)转到选项 - >环境选项 - > Delphi选项 - >库路径 - 将步骤C中的新系统,核心和协议文件夹添加到Delphi的库路径。

G.) Perform the following 5 actions in order: (Just say OK to any dialogs about upgrading the project.) G.)按顺序执行以下5个操作:(只需对任何有关升级项目的对话框说好。)


Important: 重要:

After loading each dpk and before each build, go to: 加载每个dpk之后和每次构建之前,请转到:

Project-->Options-->Description-->Build Control 项目 - >选项 - >描述 - >构建控制

Set radio button to "Explicit Rebuild". 将单选按钮设置为“显式重建”。

(Actually, this is optional, but I always make packages Explicit Rebuild because they seem easier to handle that way, but I'd like to hear what other people think about this...) (实际上,这是可选的,但我总是制作包Explicit Rebuild,因为它们似乎更容易处理,但我想听听其他人对此的看法......)


  1. Build - System\\IndySystem150.dpk Build - System \\ IndySystem150.dpk
  2. Build - Core\\IndyCore150.dpk Build - Core \\ IndyCore150.dpk
  3. Build first, then Install - Core\\dclIndyCore150.dpk 首先构建,然后安装 - Core \\ dclIndyCore150.dpk
  4. Build - Protocols\\IndyProtocols150.dpk Build - Protocols \\ IndyProtocols150.dpk
  5. Build first, then Install - Protocols\\dclIndyProtocols150.dpk 首先构建,然后安装 - Protocols \\ dclIndyProtocols150.dpk

** Double check that you've set "Explicit Rebuild" on all packages! **仔细检查您是否已在所有包装上设置“明确重建”! ** **

H.) Finally, go to Component-->Install Packages and find all of the packages that rely on Indy that were turned off during step D. Reactivate them, and restart Delphi. H.)最后,转到Component - > Install Packages并找到在步骤D中关闭的所有依赖于Indy的软件包。重新激活它们,然后重新启动Delphi。 (If your new Indy hasn't changed too much from the one released with Delphi, those packages will use the new Indy!) (如果您的新Indy与Delphi发布的版本没有太大变化,那么这些软件包将使用新的Indy!)

++ Note, you may not receive any errors right away when reactivating those Embarcadero packages, but they may pop up at random times later. ++注意,重新激活这些Embarcadero软件包时,您可能不会立即收到任何错误,但它们可能会在以后随机弹出。 For example, I just installed Indy10_4548.zip and all the reactivated packages seemed fine. 例如,我刚刚安装了Indy10_4548.zip,所有重新激活的软件包似乎都没问题。 Then a day later out of the blue, the IDE threw me a message that said it couldn't find GetRequestHeaders in TIdCustomHTTP and that the dclWindowsAzureManagement150.bpl was having trouble as a result. 然后又过了一​​天,IDE给我发了一条消息,说它无法在TIdCustomHTTP中找到GetRequestHeaders,并且dclWindowsAzureManagement150.bpl因此遇到了麻烦。 So I had to go back and disable that Windows Azure package in the IDE. 所以我不得不返回并在IDE中禁用该Windows Azure软件包。

AFAIK you're going to lose some packages that depends strongly on the Indy version deployed with Delphi, most notably the new Datasnap. AFAIK你将失去一些强烈依赖于使用Delphi部署的Indy版本的软件包,最值得注意的是新的Datasnap。

You may try to build your onwn packages to be used instead of standard ones that can't be recompiled, as long as all the needed units are available. 只要所有需要的单元都可用,您可以尝试构建要使用的onwn包而不是无法重新编译的标准包。

IMHO Embarcadero should find a solution about its own code depending on an "unstable" library like Indy. 恕我直言Embarcadero应该找到一个关于自己的代码的解决方案,取决于像Indy这样的“不稳定”库。 That's not acceptable in a professional environment, especially since they are unable to release official updates including the bug fixes from Indy beyond a few months from release. 这在专业环境中是不可接受的,特别是因为他们无法发布官方更新,包括发布后几个月内Indy的错误修复。 For example I found lately that Indy 10.5.5 mail message parsing truncates mail addresses, that not happens in 10.5.8. 例如,我最近发现Indy 10.5.5邮件消息解析截断了邮件地址,这在10.5.8中没有发生。 Of course the 10.5.5 behavior is not acceptable, I am forced to upgrade... 当然10.5.5的行为是不可接受的,我被迫升级......

From other's answers and mainly Remy's comments: 从其他人的答案和主要是雷米的评论:

It is not possible to install Indy 10.5.8.0 without breaking DataSnap in Delphi XE Update 1. 在不破坏Delphi XE Update 1中的DataSnap的情况下,无法安装Indy 10.5.8.0。

Although I don't use Delphi XE my self, but the 2010 version. 虽然我自己不使用Delphi XE,但2010版本。 I was able to upgrade Indy components to the most current version, with the help of this Stack Overflow post: Step by step upgrade of Indy 10 in Delphi 2009 在这个Stack Overflow帖子的帮助下,我能够将Indy组件升级到最新版本: 在Delphi 2009中逐步升级Indy 10

I know the question is for 2009 (but the answer covers 2010 as well), but it worked for me in version 2010, so my guess is that it will help you as well. 我知道这个问题是针对2009年的(但答案也涵盖了2010年),但它在2010版本中对我有用,所以我的猜测是它也会对你有所帮助。 I'd recommend you'd read the comments, since there are some good hints there as well. 我建议你阅读评论,因为那里也有一些很好的提示。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM