diff options
Diffstat (limited to 'src/build.bat')
-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
|