IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
448 stars 153 forks source link

Trouble getting DevExpress to reinstall with new Indy #436

Closed JohnnyMarauder closed 1 year ago

JohnnyMarauder commented 1 year ago

I am stuck and tried following several messages on DevExpress support, but the nut is I am still getting the error:

E2202 Required package 'IndyCore' not found

I downloaded the repo to C:\Repos\Indy on my system, I did the manual uninstall of the old Indy as I am running XE, opened the .groupproj and was able to get it installed per the instruction (but had to add the paths to the \Lib folder so it would find the idGlobal file) Anyway, it is in there.

I am not sure what DevExpress is doing that it cannot find the new Install, but I suspect it is hard-coded to look for something I have renamed because I cannot have the old and new Indy at the same time. I renamed the C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\source\Indy to Indy.old.

Do I need to create an Indy folder there and copy some files from the C:\Users\Public\Documents\RAD Studio\8.0\Dcp folder where the new files got compiled too?

I wish I knew more on how the stuff under the hood works.

rlebeau commented 1 year ago

Sounds like DevExpress depends on the version of Indy that ships pre-installed in Embarcadero IDEs.

The package files that are in Indy's repo contain package version numbers in their file names (ie, for XE, the packages have 150 appended to their names). However, Embaradero strips off those version numbers from the pre-installed package names (and rightly so - Indy should be doing that anyway, that is scheduled for Indy 11).

If you want to use a newer version of Indy with DevExpress, you are likely going to have to either:

JohnnyMarauder commented 1 year ago

Thank you for helping, Remy. Are there instructions on what I have to change in the Indy150 files to accomplish the latter option?

JohnnyMarauder commented 1 year ago

While waiting for instructions, I did the following: I went into each of the Core, Protocols and Systems folders, and copied the 150. files to their non numbered counterparts. I then edited the various dpk, dproj files and removed "150" wherever I found it. I also did the same thing in the Indy\Lib folder to the groupproj and groupproj.local files. I then opened this newly modified Indy.groupproj file, and compiled and installed the files per the wiki. This all went without a hitch, and Delphi XE opened as normal.

However, when trying to install DevExpress , I still get the E2202 required package IndyCore not found. I read that DevExpress uses dcc32 to compile the packages, so maybe I am missing something in the dcc32.cfg file pointing to the libraries? This is where I am not sure to what my next step is.

Also here is the cmd file I used to create the Indy files to compile and install:

c: cd \repos\Indy\Lib\System copy IndySystem150.cfg1 IndySystem.cfg1 copy IndySystem150.cfg2 IndySystem.cfg2 rem copy IndySystem150.dcu IndySystem.dcu
copy IndySystem150.dpk IndySystem.dpk notepad IndySystem.dpk copy IndySystem150.dproj IndySystem.dproj notepad IndySystem.dproj copy IndySystem150.dproj.local IndySystem.dproj.local copy IndySystem150.RES IndySystem.RES

cd \repos\Indy\Lib\Protocols copy dclIndyProtocols150.cfg1 dclIndyProtocols.cfg1 rem dclIndyProtocols150.dcu dclIndyProtocols.dcu copy dclIndyProtocols150.dpk dclIndyProtocols.dpk notepad dclIndyProtocols.dpk copy dclIndyProtocols150.dproj dclIndyProtocols.dproj notepad dclIndyProtocols.dproj copy dclIndyProtocols150.dproj.local dclIndyProtocols.dproj.local copy dclIndyProtocols150.REA dclIndyProtocols.RES

copy IndyProtocols150.cfg1 IndyProtocols.cfg1 copy IndyProtocols150.cfg2 IndyProtocols.cfg2 rem copy IndyProtocols150.dcu IndyProtocols.dcu copy IndyProtocols150.dpk IndyProtocols.dpk notepad IndyProtocols.dpk copy IndyProtocols150.dproj IndyProtocols.dproj notepad IndyProtocols.dproj copy IndyProtocols150.dproj.local IndyProtocols.dproj.local copy IndyProtocols150.RES IndyProtocols.RES

cd \repos\Indy\Lib\Core copy dclIndyCore150.cfg1 dclIndyCore.cfg1 rem copy dclIndyCore150.dcu dclIndyCore.dcu copy dclIndyCore150.dpk dclIndyCore.dpk notepad dclIndyCore.dpk copy dclIndyCore150.dproj dclIndyCore.dproj notepad dclIndyCore.dproj copy dclIndyCore150.dproj.local dclIndyCore.dproj.local copy dclIndyCore150.identcache dclIndyCore.identcache copy dclIndyCore150.RES dclIndyCore.RES

copy IndyCore150.cfg1 IndyCore.cfg1 copy IndyCore150.cfg2 IndyCore.cfg2 rem copy IndyCore150.dcu IndyCore.dcu copy IndyCore150.dpk IndyCore.dpk notepad IndyCore.dpk copy IndyCore150.dproj IndyCore.dproj notepad IndyCore.dproj copy IndyCore150.dproj.local IndyCore.dproj.local copy IndyCore150.RES IndyCore.RES

cd \repos\Indy\Lib copy Indy150.groupproj Indy.groupproj notepad Indy.groupproj copy Indy150.groupproj.local Indy.groupproj.local notepad Indy.groupproj.local

JohnnyMarauder commented 1 year ago

With these changes made and modifying the dcc32.cfg to include the paths to the new Indy as follows:

-aWinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE -u"C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\lib\win32\release";"C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\lib\Obj";C:\Repos\Indy\Lib\Core;C:\Repos\Indy\Lib\Protocols;C:\Repos\Indy\Lib\System

I started the install of DevExpress again and now I get slightly further but with a different error:

Cannot compile dxHttpIndyRequestRS15.dpk Compiler: C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\Bin\dcc32.exe Embarcadero Delphi for Win32 compiler version 22.0 Copyright (c) 1983,2010 Embarcadero Technologies, Inc. C:\Forbin\DevExpress VCL\Library\RS15\cxVer.inc(719) C:\Forbin\DevExpress VCL\Library\RS15\dxHttpIndyRequest.pas(168) C:\Forbin\DevExpress VCL\Library\RS15\dxHttpIndyRequestRS15.dpk(52) Error: E2466 Never-build package '.dxHttpIndyRequestRS15' requires always-build package 'IndyProtocols' Error: E2466 Never-build package '.dxHttpIndyRequestRS15' requires always-build package 'IndySystem' Error: E2466 Never-build package '.dxHttpIndyRequestRS15' requires always-build package 'IndyCore'

Not sure what to do on this one. I've posted this to the DevExpress support page as well.

JohnnyMarauder commented 1 year ago

I might be going about this all wrong. What do I need to change in the new Indy so I can compile and install it side-by-side with the original Indy that comes with XE?

rlebeau commented 1 year ago

I went into each of the Core, Protocols and Systems folders, and copied the 150. files to their non numbered counterparts. I then edited the various dpk, dproj files and removed "150" wherever I found it. I also did the same thing in the Indy\Lib folder to the groupproj and groupproj.local files. I then opened this newly modified Indy.groupproj file, and compiled and installed the files per the wiki. This all went without a hitch, and Delphi XE opened as normal.

In addition to stripping off the version numbers from the file names, you will likely also need to update the projects to use the LIBSUFFIX directive so the final compiled BPL files still DO have version numbers on them.

I started the install of DevExpress again and now I get slightly further but with a different error:

C:\Forbin\DevExpress VCL\Library\RS15\dxHttpIndyRequestRS15.dpk(52)
Error: E2466 Never-build package '.dxHttpIndyRequestRS15' requires always-build package 'IndyProtocols'
Error: E2466 Never-build package '.dxHttpIndyRequestRS15' requires always-build package 'IndySystem'
Error: E2466 Never-build package '.dxHttpIndyRequestRS15' requires always-build package 'IndyCore'

Not sure what to do on this one.

See https://docwiki.embarcadero.com/RADStudio/en/E2220_Never-build_package_%27%25s%27_requires_always-build_package_%27%25s%27_(Delphi)

Indy's packages are set to IMPLICITBUILD ON by default:

https://docwiki.embarcadero.com/RADStudio/en/Implicit_Build_(Delphi)

I suspect that Embarcadero probably switches this to OFF in the pre-installed Indy packages.

What do I need to change in the new Indy so I can compile and install it side-by-side with the original Indy that comes with XE?

The two versions can't be installed side-by-side. Only one version can be active in the IDE at a time.

JohnnyMarauder commented 1 year ago

Thanks for the help. I did find that DevExpress did install, but just failed on the 4 or 5 components that actually used Indy. Otherwise it installed and I was able to open my project that referenced both Indy (the new one) and the DevExpress controls.

But, it turns out the program still fails to receive the response packet from a Shark270 Meter (modbus protocol). So I am not sure if this is an Indy problem or a delphi-modbus library(that also uses Indy) problem. The code does work with other modbus meters. I may have to purchase a retail modbus TCP library unless you have any thoughts.

rlebeau commented 1 year ago

I couldn't really comment on that without seeing the actual modbus protocol data and the code that is trying to read it.