Is it possible to run the command line compiler with the selected build configuration in Delphi XE2?

I want to make assemblies from the command line, and I wonder if there is a way to execute a command line compiler with the selected assembly configuration?

I know that there is an option --no-config which will not load the dcc32.cfg file by default, but I would like to set the assembly configuration that I prepared in my project.

I would like to run something like

dcc32.exe --some-option RELEASE Win32 PLATFORM 

Is there an option to select an assembly configuration?

thanks

+8
build delphi delphi-xe2
source share
2 answers

For this you need to use msbuild , not dcc32 :

 msbuild myproject.dproj /p:Config=RELEASE;Platform=Win32 

Make sure you call the rsvars.bat file from the RAD Studio bin before trying to call msbuild . This sets the necessary environment variables.

The great thing about the modern msbuild based build system implemented in Delphi is that you can easily make sure your command line builds are identical to your IDE builds.

+8
source share

As far as I know, you can use dcc64.exe to compile for 64-bit if you do not want to use MSBuild. It is located in the same folder as dcc32.exe (and dccosx.exe for compilation for OSX).

+1
source share

All Articles