Re: Command Line Compiler Config File
- From: "Bruce McGee" <bmcgee@xxxxxxxxxxxx>
- Date: 25 Mar 2007 19:01:54 -0800
Bruce wrote:
I have always used the command line compiler to do automated and
release builds. I couldn't find anything on the command line compiler
in the help file, so I wanted to make sure I was understanding this
correctly and that nothing has changed.
My understanding is that DCC32.exe uses the DCC32.cfg file that is in
the same folder as DCC32.exe, and you can override and/or add new
compiler settings by placing a DCC32.cfg file in the same folder as
your project <projectname>.dpr file.
At one point, a <projectname>.cfg file was also created by the IDE,
and I found I had to delete that file before doing a build to prevent
the command line compiler from using the IDE settings in that file. I
don't think this file is being created anymore (at least I don't see
it in D2007).
I'm assuming this is the extent of it, and that the command line
compiler does not try to pull compiler settings out of the bdsproj or
dproj files.
Do I have this correct?
The .cfg file is used to create the new .dproj files for Delphi 2007
when you load older projects, but it isn't used when compiling from
either the command line or IDE. There is still a dcc32.cfg that gets
used, but you can turn that off using the --no-config switch.
The IDE reads it's build settings from the .dproj file (of course), but
the command line compiler doesn't.
In the environment options, you can set the IDE compiler to show you
the full DCC32 command line you would use to get the same compile and
use that in your batch file.
Another option might be to create your different build configurations
in the IDE and use MSBuild from the command line. You need to set some
environment variables first:
set path=%path%;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
set path=%path%;C:\Program Files\CodeGear\RAD Studio\5.0
set path=%path%;C:\Documents and Settings\All Users\Documents\RAD
Studio\5.0
set BDS=C:\Program Files\CodeGear\RAD Studio\5.0
set FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework\
set FrameworkVersion=v2.0.50727
This will build the default configuration:
msbuild MyProj.dproj
And this will specifically build the "Release" configuration:
msbuild MyProj.dproj /property:configuration=Release
Finally, there is my favourite option: FinalBuilder. It currently
supports MSBuild projects, and will have specific support added for
Delphi 2007 shortly.
Of course, the downside is that if you have a big investment in .cfg
files, they will have to be converted.
--
Regards,
Bruce McGee
Glooscap Software
.
- Follow-Ups:
- Re: Command Line Compiler Config File
- From: Bruce
- Re: Command Line Compiler Config File
- From: John Moshakis
- Re: Command Line Compiler Config File
- References:
- Command Line Compiler Config File
- From: Bruce
- Command Line Compiler Config File
- Prev by Date: Re: Interface / Implementation sections
- Next by Date: Re: Interface / Implementation sections (was: First Screenshots of Delphi 2010 for Win64)
- Previous by thread: Re: Command Line Compiler Config File
- Next by thread: Re: Command Line Compiler Config File
- Index(es):
Relevant Pages
|