Note: this article is part of explaining compilation outside of IDE.
EurekaLog provides ecc32.exe, emake.exe, and ecc32speed.exe command-line compilers. These compilers pass all command line options to default dcc32.exe and make.exe compilers.
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 (see below) to indicate what IDE should be used.
Additionally, these EurekaLog post-process compilers supports additional EurekaLog-related options, which allows you to customize EurekaLog's post-processing behaviour.
Notes:
EurekaLog IDE expert calls ecc32.exe/emake.exe/ecc32speed.exe to post-process executables after compilation. Unlike command line, you have no direct control over calls to ecc32.exe/emake.exe/ecc32speed.exe when doing compilation from IDE. However, you still can use the custom EurekaLog arguments which are discussed below. Do the following to add any custom argument for ecc32.exe/emake.exe/ecc32speed.exe being invoked from IDE:
Important note: Double-quotes in the example above is a part of the settings syntax for the "Custom/Manual" page and not a part of the command-line arguments itself. If you need to include double-quote symbol inside command line argument - escape it as \q. For example:
The above line is just example, you can alter it as you want to.
Notes:
EurekaLog-specific options for ecc32.exe/emake.exe/ecc32speed.exe are:
1. --el_prepare/--el_alter_exeThese options instructs the EurekaLog compiler to not compile the project (via invoking dcc32/emake) and only add the EurekaLog options and debug data into already compiled application (you can also optionally specify the compiled application's filename).
Note: you must have a compiled .exe/.dll/.bpl file and a corresponding .map file to use --el_alter_exe option.
Basically, --el_prepare switch acts as pre-build event, --el_alter_exe acts as post-build event:
You should never specify both --el_prepare and --el_alter_exe in the same command line. Use either --el_prepare or --el_alter_exe or none.
These switches are useful when used with 3rd party tools that are not able to directly run the ecc32.exe command-line compiler. It's also useful if you don't want to bother with compiling your project by yourself (via direct call to dcc32.exe/make.exe) and assign this task to someone else (such as IDE, FinalBuilder, etc.).
Path ".\Debug\Win32\" is only an example. Replace it with your value or just remove it (in case of .exe file being in the same folder as project file).
Part in [] is optional, but recommended. Of course, you should remove [] symbols for real-life examples (e.g. --el_alter_exe=ProjectFile.cbproj;.\Debug\Win32\ProjectFile.exe).
Note: you can specify NUL as project file name if the following conditions are satisfied:
You may optionally use --el_source switch (see below) for non-Embarcadero compilers. --el_mode switch have no effect for non-Embarcadero compilers.
See this article to learn more about using NUL and --el_source.
2. --el_targetSpecifies output file name. Optional. By default EurekaLog tries to get this from project's options (which is not always possible). It's not needed for --el_alter_exe switch, since output file name can be specified inside --el_alter_exe switch itself.
Usually this switch is needed for projects with multiple build configurations, because EurekaLog may not know which build configuration to use.
Note: this option is ignored when --el_prepare or --el_alter_exe switches are used.
3. --el_buildconfig
This option allows you to specify a build configuration name. This name is used to select a different EurekaLog's configuration file. Usual names are 'Debug' and 'Release', but you are free to create any other custom configuration.
Build configuration name is used to select .eof file to load EurekaLog settings from. The base configuration is used by default (e.g. Project1.eof). Specifying non-empty build configuration name will load EurekaLog configuration from the corresponding Project1_BuildConfigurationName.eof file instead.
If there is no such .eof file - base configuration will be used.
Note: this option is ignored when --el_config switch is used.
4. --el_configThis option is used to compile your project with a different (alternative) EurekaLog settings than settings which are stored in the project itself (or build configuration).
See also: how to get .eof file.
By default EurekaLog uses EurekaLog settings from project base settings file (e.g. Project1.eof). It also respect external settings option. You don't need to use this option if you want to compile your EurekaLog-enabled project (because your typical project settings will be used automatically). You only need to use this option when your project does not contain EurekaLog settings; or you want to override your settings.
See also:
5. --el_pidSpecifies Project ID (PID). Project ID is a unique GUID of the project. It is used by EurekaLog to identify projects. For example, for password storing (caching), BugID creation, alias building in bug trackers, etc. Different projects are supposed to have different project IDs.
By default - project ID is extracted from .dproj, .bdsproj, .cproj files and then stored in the base settings file (Project1.eof). You may want to specify project ID manually when using external settings (e.g. using --el_config option), sharing configurations between projects, or if you simply have a different project for essentially the same program.
You may create a new GUID to use as the project ID. Or you may copy the GUID from .dproj/.bdsproj/.cproj file.
Note: this option is ignored when --el_prepare switch is used.
6. --el_modeSwitches between Delphi and C++ Builder project. Optional. You must add this switch only if you rename EurekaLog compiler's file. Possible values are "Delphi" or "Builder".
Default is "Delphi mode" for ecc32.exe/ecc32speed.exe and "C++ Builder mode" for emake.exe.
Note: ecc32.exe and emake.exe is the same file.
7. --el_ideSpecifies alternative IDE version. IDE version affects which dcc32.exe is used to compile project, also how .map file is parsed, and how unit names are encoded. You have to use correct IDE version. E.g. version 7 when you work with project compiled by Delphi 7.
Default version is determined by ecc32.exe/emake.exe/ecc32speed.exe location. For example, ecc32.exe from C:\Program Files\EurekaLog 7\Packages\Delphi7\ will use version 7, ecc32.exe from C:\Program Files\EurekaLog 7\Packages\Studio14\ will use version 14. Therefore, you have to specify this option only if you are calling ecc32.exe/emake.exe/ecc32speed.exe from another folder, or when you want to compile/post-process project for another/different IDE.
Note: see IDE name mapping.
8. --el_compiler
This options instructs the EurekaLog to use alternative command-line compiler instead of default dcc32.exe/make.exe,
Notes:
9. --el_source
This option specifies which source should be used to create EurekaLog debug information. Default is .map file which should be in Borland-compatible format. Microsoft .map files are not supported. C++ Builder mode (see --el_mode switch above) regenerates .map file from .tds file (or injected TD32 info) - to complete .map file with line numbers.
Possible values are "" (empty string, default - use project's preferences), "MAP" (use .map file, default), "TDS" (use TD32), "PDB" (use PDF file), or "DBG" (use DBG file).
Warning: non-default values are experimental.
See this article to learn more about using --el_source with Microsoft compilers. This option is also useful if you are using 3rd party tool chain for RAD Studio IDE. For example, you may want to use UniLink (ulink.exe) with C++ Builder. You may want to use --el_source=TDS in that case.
Note: this option is ignored when --el_prepare switch is used. 10. --el_injectjcl/--el_createjcl
These options will additionally inject JCL (JEDI Code Library) debug information directly into your executable (--el_injectjcl), or create an external .jdbg file (--el_createjcl). This option does not replace normal EurekaLog post-processing. I.e. JCL debug information is added over EurekaLog's own data.
JCL debug information is supported by modern IDE versions, thus it is very useful to add to your .bpl files (and any other DLL which may be loaded/used by IDE).
Note: these options are ignored when --el_prepare switch is used.
11. --el_createdbg
This option will create an additional .dbg file.
This option requires map2dbg.exe tool present in EurekaLog's \Bin folder. You have manually download this tool and copy it into \Bin folder of EurekaLog! Check the following locations:
DBG is debug information format supported by Microsoft. You can use this option when you need to work on your executables with Microsoft tools.
Notes:
12. --el_strip
This option will strip embedded non-EurekaLog debug information (such as TDS/TD32, DWARF, etc.) from the specified executable.
It is useful, if you plan to distribute the file to your end users. In that case you want your file have EurekaLog and EurekaLog's debug information, but do not need other debug information, which you are likely to use during debugging from IDE. Passing the file through ecc32/emake with this option will remove (strip) debug information in formats like TDS/TD32, DWARF, etc. We recommend to do that for production (e.g. Release build configuration).
Notes:
13. --el_wait Specifies timeout in seconds. Default is 60. This timeout is used by EurekaLog to wait for executable file to become unlocked for writes. This feature is used to workaround anti-viruses locking compiled executable.
The value of 0 indicate that EurekaLog should not wait for executable to become writable and fail immediately.
14. --el_detailed_exit_code Asks ecc32/emake to return details about performed work via process exit code.
When --el_detailed_exit_code flag is not set Ecc32/emake returns 0 on success by default:
When --el_detailed_exit_code flag is set Ecc32/emake returns non-zero exit code on success:
15. --el_verbose/--el_verbose_no_logs These option instructs the EurekaLog compiler to produce more messages for debug purposes. If you have some strange issues with EurekaLog compiler - try to use this option to see what's going wrong.
Usually you don't need this option, it is used only for troubleshooting.
EurekaLog compiler will also create a few debug files. You can safely delete them if they aren't needed. They aren't used by EurekaLog and are generated only for debugging purposes. Those files are:
--el_verbose_no_logs option will not create additional log files.
Important Note: This option is limited in ecc32speed.exe. We recommend to use ecc32.exe/emake.exe for this option.
16. --el_gui_errorShows errors in message boxes instead of writing them to the console. Optional.
Usually you want to add this switch, if you run compiler from IDE or other GUI tool. You probably don't want to specify it, if you run compiler from console or automated build script.
Note: EurekaLog compiler will set exit code (ERRORLEVEL) to non-zero value on any failure. Your build script can diagnose for success/failure compiles by analyzing process return code.
17. --el_priority
This option specifies class of process priority for ecc32.exe/emake.exe/ecc32speed.exe. You can use any valid numeric value for process priority.
18. --el_nologo
This option suppresses standard ecc32.exe/emake.exe/ecc32speed.exe's logo message with version and copyright information. You can use this option to get cleaner console output (for example, to redirect and analyze output).
This option does not affect actual processing of your project.
19. --el_nostats
This option suppresses writing compilation statistical information (such as sizes, times, etc.). You can use this option to get cleaner console output (for example, to redirect and analyze output).
This option does not affect actual processing of your project.
ExamplesSome examples of full command lines:
See also:
|