[DUG] Command Line Compiler
Conor Boyd
Conor.Boyd at trimble.co.nz
Mon Nov 2 13:18:52 NZDT 2009
Hey John,
I'm not sure if I can safely state that the command line compiler
completely ignores the project settings, but to all intents and purposes
it does. This may be historical.
The command line compiler (dcc32.exe) will however use a config file
called dcc32.cfg if it exists in the same folder as the project (.dpr)
you are wanting to compile. Alternatively you can pass all the params
you need on the command line.
The long and the short of it is that there is no easy way to do what you
want (set up the command line compiler to produce the exact same
binaries as from withing the IDE). However, the attraction of the
command line compiler is that it can still be set up to compile your
binaries in a _predictable_ manner.
We use the command line for both our overnight production builds, and
also as part of a Continuous Integration process. This means that we
don't worry so much about compiler/project file settings on an
individual developer's PC, since we can rely on all the binaries coming
out of our automated build process being consistent. We can also ensure
that we apply the same set of compiler options to all the binaries we
produce.
So, yes, the command line compiler is ideal for what you're wanting to
do; it just takes a little bit of work up front to set the environment
up. There is no need to hesitate to use the command line compiler;
there are no differences in the resulting binary other than those
resulting from differences in the configuration file that the compiler
is actually using.
The change in the Delphi license a few releases back was also welcome in
terms of legally allowing the command line compiler to be deployed to
separate build PCs.
We use CC.NET as the build framework for monitoring source control
changes and automatically producing Continuous Integration and
production builds overnight.
We use NAnt as a comprehensive scripting environment to control the
command line compiler over multiple Delphi projects. Among other
things, the NAnt scripts output the appropriate dcc32.cfg config file
for each output and also invoke the command line compiler.
HTH,
Conor
-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of John Bird
Like many I have need to recompile a whole suite of programs, and the
command line compiler seems ideal for this.
However it seems to put the exe files in the same folder as the project
files, which means that it is not following the project setups eg for
Directories/Conditionals Output folder.
I tried comapring the exe files made by the IDE and the command line, eg
for one they are the same size but do have some binary differences.
What are these other differences?
Ideally I want to set up the command line compiler to produce the same
as my IDE compiler, but this does not seem obvious. Or turn on or off
some well defined things, such as turn on optimisations
I found a good article such as
http://www.delphi3000.com/articles/article_4585.asp?SK=
But I hesitate to use the command line if there are other unknown
differences in the exe produced.
But I am getting mightily bored with opening one project after another
and hitting F9
More information about the Delphi
mailing list