Note: this article is part of explaining compilation outside of IDE.
This can be useful in situations where 3rd party build tools are not able to directly run ecc32.exe/emake.exe (or you just don't want to build "scary" command-line). So, you're using "someone" to build your project as usual - this can be IDE, build server/tool (like FinalBuilder). Just don't forget to set mandatory options for your project.
Now you need to post-process your already compiled project without recompiling it. To achieve this we just need to use another EurekaLog command line parameter: --el_alter_exe.
Here is how the command line would look given that our application has already been compiled and we just want to add EurekaLog's features:
Example (Delphi 4-7)
Example (Delphi 2005-2006)
Example (Delphi 2007+)
Example (Delphi 2007+ with performance boost)
Example (C++ Builder 5-6)
Example (C++ Builder 2006)
ecc32 --el_alter_exe=Project1.bdsproj --el_mode=Builder
Example (C++ Builder 2007+)
ecc32 --el_alter_exe=Project1.cbproj --el_mode=Builder
Note: EurekaLog is able to recognize both project files (such as .dpr) and project configuration files (such as .dproj). It's recommended to specify project configuration files (such as .dproj) when possible.
If you want to specify the complied application's file name use:
(replace "ecc32" -> "emake" for C++ Builder, replace ".dpr" extension if needed - as in the previous example above)
You may also need to specify absolute or relative paths to files in some cases.
Important Note: post-processing will inject information into already compiled executable. It can not recompile or change the project. If you are switching between EurekaLog configurations - your .dpr source file may need to be changed (e.g. to change included EurekaLog units in uses clause). To achieve this we just need to use another EurekaLog command line parameter: --el_prepare.
A typical batch file to build your project with EurekaLog may look like this:
REM Step 1: [Pre-Build] adjust .dpr source before compilation
ecc32 --el_prepare=Project1.dproj --el_config=Project1_Debug.eof
REM Step 2: compile your project
call "C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin\rsvars.bat"
msbuild Project1.dproj /t:Build /p:config=Debug;platform=Win32
REM Step 3: [Post-Build] post-process your project - inject options and/or debug information
ecc32 --el_alter_exe=Project1.dproj;.\Debug\Win32\Project1.exe --el_config=Project1_Debug.eof
--el_config switch is optional.
Note: EurekaLog shows command-line to post-processing your project for your convenience at General tab in EurekaLog project options:
Ready to use command-line in EurekaLog project options
This edit is read-only. Just select all text, copy it into Windows clipboard and insert in place where you want to invoke EurekaLog's post-processing.
You can also use ecc32 to post-process executables compiled by non-Embarcadero compilers (such as Microsoft Visual Studio). You can use NUL as project file name and supply --el_config argument to specify location of EurekaLog options (.eof file). You can create .eof file by exporting EurekaLog options from any project or you can use standalone Settings Editor tool. You would need to add --el_source argument to indicate location of debug information (which is stored in PDB for Visual Studio).
ecc32 --el_alter_exe=NUL;.\MS\VC\MSSample.dll --el_config=.\MS\VC\MSSample.eof --el_source=PDB
Build date: 2019-12-02
Last edited: 2018-06-14
The documentation team uses the feedback submitted to improve the EurekaLog documentation.
We do not use your e-mail address for any other purpose.
We will remove your e-mail address from our system after the issue you are reporting has been resolved.
While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback.
After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.
Permanent link to this article: https://www.eurekalog.com/help/eurekalog/without_recompile.php