[Lazarus] Environment variables in IDE's search path

tiziano de togni tiziano.detogni at gmail.com
Sun May 17 13:46:38 CEST 2009


Mattias Gaertner ha scritto:
> On Sat, 16 May 2009 17:58:12 +0200
> tiziano de togni <tiziano.detogni at gmail.com> wrote:
> 
>>> I added a macro function $Env(name).
>>>
>> Fine! Is it possible to add also a macro function $BatchExt() ('.bat'
>> in windows, '.sh' on linus, no idea on Mac)?
> 
> Can you give an example for this macro?
> 
Well, after compiling a project I need to execute a batch file on 
windows and a shell script on Linux. Using the Execute After Command of 
the IDE.

In my project folder I keep a .bat file and an equivalent .sh file, but 
every time I compile on one side I have to change the .bat to .sh and 
viceversa, so a macro of this kind could solve this problem using the 
command test$BatchExt().

Indeed, I just found a trick that solves my problem.

Using the command: test$TargetOS().cmd the IDE executes the script 
testlinux.cmd or testwin32.cmd for the respective platform.

So, the macro I asked for is not really so useful...
-- 
tiziano de togni
______________________________________
http://digilander.libero.it/tizzziano/




More information about the Lazarus mailing list