On Tue, 30 Nov 2010 18:35:48 +0100, Mattias Gaertner <[email protected]> wrote:
>On Tue, 30 Nov 2010 17:48:47 +0100 >Bo Berglund <[email protected]> wrote: > >> I would like to specify things like the base location of files using >> environment variables rather than entering full paths. >> >> In Delphi this can be done by using the $(varname) construct, but this >> is apparently not supported by Lazarus. >> I googled my way through and found a reference to using $Env(varname) >> instead. >> >> But when I use this in my lazarus (to specify the location of the FPC >> compiler for instance), lazarus complains that it cannot find the >> executable. > >I implemented resolving macros for the environment option compiler file >name. > >Use on your on risk. >There is currently no real circle detection for macros, so you can >create endless loops. There is already a bug report. Macros?? I am talking about how to use environment variables in file specifications in Lazarus, not about macros... Like for example in Delphi I have this in my project path to define the location of Indy. I have several versions of Indy on my PC because they change Indy around such that old code breaks severely if using the new Indy versions: $(INDY10)\System $(INDY10)\Protocols $(INDY10)\Core In another project I can have: $(INDY9)\System $(INDY9)\Protocols $(INDY9)\Core This way no matter where the individual developer has placed his Indy files he can use the env var to set the location and the project file (*.dof) does not have to be changed when retrieved from CVS. It simply just works... There are also other uses, like in lazarus to specify which FPC to use.. > >> I entered the following as the FPC compiler path: >> >> $Env(FPCBASE)\2.4.2\bin\i386-Win32\fpc.exe > >Should work now. "Now" meaning what? Do I need to grab a newer version of lazarus and rebuild it? -- Bo Berglund Developer in Sweden -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
