Root > Advanced topics > Compiling your project with EurekaLog > Post-processing without (re)compilation

Post-processing without (re)compilation

Previous pageReturn to chapter overviewNext page   

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.

 

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)

 

ecc32 --el_alter_exe=Project1.dpr

 

Example (Delphi 2005-2006)

 

ecc32 --el_alter_exe=Project1.bdsproj

 

Example (Delphi 2007+)

 

ecc32 --el_alter_exe=Project1.dproj

 

Example (Delphi 2007+ with performance boost)

 

ecc32speed --el_alter_exe=Project1.dproj

 

Example (C++ Builder 5-6)

 

emake --el_alter_exe=Project1.bpr

 

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:

 

Example

 

ecc32 --el_alter_exe=Project1.dpr;.\Debug\Win32\Project1.exe

 

(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 settings - 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:

 

Example

 

@echo off

 

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).

 

Example

 

ecc32 --el_alter_exe=NUL;.\MS\VC\MSSample.dll --el_config=.\MS\VC\MSSample.eof --el_source=PDB

 

 

See also:




Send feedback... Build date: 2024-09-30
Last edited: 2023-03-07
PRIVACY STATEMENT
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