Reputation: 1838
Following the question, I am trying to modify the source code of Indy10 (IdHTTPProxyServer.pas). But failed to recompile the indy10 project... My IDE is XE2, and following are the steps I did..
Remove package "Indy 10 Core Design Time" and "Indy 10 Protocols Design Time" in Menu->Component->Install Packages
Open IndyProtocols.dpk
Make changes in IdHTTPProxyServer.pas
Compile
And then sometimes it shows error "Access violation in rtl160.bpl", sometimes it shows error "Exception xxx(any component) in coreide160.bpl at XXXXXX"
As I am not really familiar with the develop environment, I totally do not understand what is wrong ... Any help will be appreciated.
Thanks
Thanks for all replies. All your suggestions make me realize the develop environment more. Finally I accept the answer of @Marcus Adams as there are more than one developers in the project. It is better not to change the source files of the IDE.
Upvotes: 1
Views: 878
Reputation: 36654
You can skip the component / package compilation steps and simply create the Indy components at run time.
Add the Indy Lib Core/Protocols/System paths to the project search path and you are done.
Upvotes: 1
Reputation: 12084
Neither of the errors you mentioned are compiler errors. Its unlikely they are caused by the compiler itself. They are probably coming from somewhere else in the call chain leading up to the compile.
A short term solution would be to compile from the command line. MSBuild is the build engine Delphi uses under the hood.
cd
to change directories to the location of IndyProtocols.dpkmsbuild IndyProtocols.dpk /target:Build /p:config=Release
If you want to do a debug version just change /p:config=Release
to /p:config=Debug
. Note that case is important when working with msbuild because the project files are xml, which is case sensitive.
Also, for what its worth you should try to avoid making changes directly to the libraries shipped with the IDE. If you found a bug in a supplied library that you need fixed for a specific project you can usually get by with copying the offending file into your project's folder and making your changes to it there. You'll also likely need to copy several other dependent files as well. If you take this approach the compiler will inform you which dependents need to be copied with errors such as Unit * was compiled with a different version of *.*
Now if you really want to debug the IDE you can try but the rtl
and coreide
packages used throughout the IDE and are both compiled as release versions (no debugging info) so it may be difficult to determine what's causing the errors you're seeing.
Anyways, you can run a second instance of the IDE with the IndyProtocols.dpk loaded in the project manager. Then use Run > Attach to Process
from the first IDE instance to attach the debugger to the second IDE instance. After that just try building IndyProtocols.dpk from the second IDE instance. If all goes as expected the debugger will catch the errors and let you break at where they occurred so you can dig around.
Upvotes: 1
Reputation: 53850
Normally, when I change source code, I save the modified source file to my project folder. That way, just that unit gets recompiled.
If you changed a particular .pas file, just save it to your project folder and recompile. Leave the original Delphi (and Indy) source files untouched.
This also makes it easier to update in the future, since your changes don't get lost after an update, and your changes don't affect other projects.
Upvotes: 3
Reputation: 12729
There are a couple of VCL design-time packages (to do with DataSnap) that link to the bundled version of Indy. If you are going to update your indy, you need to do the following things:
Only then should you compile your new version of Indy.
Upvotes: 1