[Lazarus] Build modes, macros and conditionals

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Oct 24 23:43:40 CEST 2010


On Sun, 24 Oct 2010 23:15:31 +0200
Marco van de Voort <marcov at stack.nl> wrote:

> On Sun, Oct 24, 2010 at 10:49:11PM +0200, Mattias Gaertner wrote:
> > There are some new options to create 
> > * sets of compiler options - called "Build modes",
> > * project and package macros - called "Build macros"
> > * and rules to set macros, paths and options automatically depending on
> > target platform - called "Conditionals".
> > 
> > See here for details and examples:
> > 
> > http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Build_modes
> > http://wiki.lazarus.freepascal.org/Macros_and_Conditionals
> > 
> > Please test.
> > 
> > Important compatibility note:
> > When opening a new project with an old IDE, you will only see the
> > default mode. If you save the project with the old IDE you will loose
> > all other modes, all macros and conditionals. 
> 
> Looks nice. One small interesting aspect: it might be worthwhile to set
> environment variables from the scripts.

The environment variables are in the run parameters and are independent
of the compiler options. At the moment you can not
use macros in the environment options.
If someone needs that please create a feature report and/or a patch.

 
> These values can then be included into the source (e.g. for an about box)
> using {$I %envvar%} syntax. 
> 
> See also the "Getting a program's "true name" thread.


Mattias




More information about the Lazarus mailing list