Note: this article is part of explaining compilation outside of IDE.
Important Note: usually, you call ecc32.exe/emake.exe from [EurekaLog installation folder]\Packages\[IDE name]\ folder or from \bin folder of your IDE. That way ecc32.exe/emake.exe will know which IDE you are using. However, if you are calling ecc32.exe/emake.exe from \bin folder of EurekaLog, or if you copy ecc32.exe/emake.exe to another folder - then it will NOT know which IDE you are using. You have to supply --el_ide command line switch to indicate what IDE should be used.
Using ecc32.exe/emake.exe/ecc32speed.exe with Delphi 2007+ is very easy. That's because Delphi 2007+ uses MS-Build tool and have pre/post-build commands - so calling of ecc32.exe/emake.exe/ecc32speed.exe can be performed automatically during build.
Note: do not confuse IDE build events and EurekaLog build events. This article uses only IDE build events.
The simplest way to use ecc32.exe/emake.exe in Delphi 2007+ is to add a call to ecc32.exe/emake.exe/ecc32speed.exe to Pre-Build and Post-Build events:
(replace Studio16 with real name of your IDE)
Important Note: "Config" variable may be not available in your IDE. In this case - please, remove --el_buildconfig switch from the command line or specify build configuration name explicitly (e.g. --el_buildconfig=Debug).
See Post-processing without (re)compilation article for more information about used command-line switches.
For example:
Adding a call to ecc32/emake/ecc32speed to your project
If you do this - you'll no longer need to perform any special actions to build your project. It doesn't matter how you build it: manually (msbuild Project1.dproj /t:Win32 /p:config=Debug), with build server/tool - the ecc32.exe/emake.exe/ecc32speed.exe will be invoked automatically (as long as MS-Build is used).
Notes:
See also:
|