diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-12-04 07:44:36 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-12-04 07:44:36 +0000 |
commit | c45272d642c7af5a63f471c3319eee213c2be0b0 (patch) | |
tree | a16ca8c67849d9d5e2b27a6424e3c685041c8107 | |
parent | ebce21e3bc782bcc54cf0456a043a46e928197c8 (diff) | |
download | fpGUI-c45272d642c7af5a63f471c3319eee213c2be0b0.tar.xz |
* Improved the build.bat file to use FPC to detect platform and OS variables.
-rw-r--r-- | src/build.bat | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/build.bat b/src/build.bat index af997ecd..9fef1825 100644 --- a/src/build.bat +++ b/src/build.bat @@ -1,8 +1,16 @@ @echo off
-; I don't know how to store the output to a variable: fpctarget=`fpc -iTP`-`fpc -iTO`
-if exist ..\lib\i386-win32\nul.x goto exists
-echo "Creating missing directory ..\lib\i386-win32"
-mkdir ..\lib\i386-win32
+
+rem We use FPC to found out the Platform and OS to create a lib output path
+fpc -iTP > tmpvar
+set /p myplatform= < tmpvar
+fpc -iTO > tmpvar
+set /p myos= < tmpvar
+del tmpvar
+
+if exist ..\lib\%myplatform%-%myos%\nul.x goto exists
+
+echo Creating missing directory ..\lib\%myplatform%-%myos%
+mkdir ..\lib\%myplatform%-%myos%
goto end
:exists
|