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

2

8

I'd like to make builds from the command line and I'm wondering if there's a way how to execute the command line compiler with selected build configuration ?

I know there is option --no-config which won't load default dcc32.cfg file but I would like to set the build configuration I've prepared in my project.

I would like to run something like

dcc32.exe --some-option RELEASE Win32 PLATFORM

Is there some option for selecting build configuration ?

Thank you

Whitton answered 20/12, 2011 at 12:22 Comment(0)
S
8

You need to be using msbuild rather than dcc32 for this:

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

Make sure you have called the rsvars.bat file from the RAD Studio bin folder before you attempt to call msbuild. This sets up the necessary environment variables.

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

Suffocate answered 20/12, 2011 at 12:25 Comment(2)
Thanks for your help. Now I have to wait 2 minutes to accept :)Whitton
DCC32 was the right way in Delphi 7, and MSBUILD is the way since Delphi 2007, up to now.Balliett
F
1

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

Freeholder answered 3/1, 2012 at 8:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.