tools/build_windows.bat
author koda
Wed, 24 Oct 2012 10:18:42 +0100
changeset 7810 da60e6b6baa3
parent 7799 a88a02c19a5b
child 7812 00696c1450da
permissions -rw-r--r--
download SDL dlls if not present
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     1
@echo off
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
     2
::edit these variables if you need
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
     3
set PASCAL=C:\FPC\2.4.4\bin\i386-win32\
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
     4
set QTDIR=C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
     5
set PATH=%PATH%;%PASCAL%
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     6
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
     7
:setup
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
     8
set CURRDIR="%CD%"
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     9
cd ..
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    10
7810
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    11
echo Fetching all DLLs...
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    12
for %%G in (QtCore4 QtGui4 QtNetwork4 libgcc_s_dw2-1 mingwm10) do (
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    13
    xcopy /d/y %QTDIR%\%%G.dll bin\
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    14
)
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    15
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    16
if not exist %CD%\misc\winutils\bin\ mkdir %CD%\misc\winutils\bin\
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    17
if not exist %CD%\misc\winutils\bin\SDL.dll cscript %CD%\tools\w32DownloadUnzip.vbs http://www.libsdl.org/release/SDL-1.2.15-win32.zip %CD%\misc\winutils\bin
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    18
if not exist %CD%\misc\winutils\bin\SDL_image.dll cscript %CD%\tools\w32DownloadUnzip.vbs http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12-win32.zip %CD%\misc\winutils\bin
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    19
if not exist %CD%\misc\winutils\bin\SDL_net.dll cscript %CD%\tools\w32DownloadUnzip.vbs http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8-win32.zip %CD%\misc\winutils\bin
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    20
if not exist %CD%\misc\winutils\bin\SDL_mixer.dll cscript %CD%\tools\w32DownloadUnzip.vbs http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12-win32.zip %CD%\misc\winutils\bin
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    21
if not exist %CD%\misc\winutils\bin\SDL_ttf.dll cscript %CD%\tools\w32DownloadUnzip.vbs  http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11-win32.zip %CD%\misc\winutils\bin
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    22
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    23
xcopy /d/y %CD%\misc\winutils\bin\*.dll bin
da60e6b6baa3 download SDL dlls if not present
koda
parents: 7799
diff changeset
    24
xcopy /d/y %CD%\misc\winutils\bin\*.txt bin
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    25
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    26
::setting up the environment...
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    27
call %QTDIR%\qtenv2.bat
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    28
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    29
echo Running cmake...
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    30
set ERRORLEVEL=
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    31
cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\misc\winutils\lib" .
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    32
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    33
if %ERRORLEVEL% NEQ 0 goto exitpoint
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    34
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    35
echo Running make...
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    36
set ERRORLEVEL=
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    37
mingw32-make
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    38
if %ERRORLEVEL% NEQ 0 goto exitpoint
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    39
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    40
echo Installing...
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    41
set ERRORLEVEL=
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    42
mingw32-make install > nul
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    43
if %ERRORLEVEL% NEQ 0 goto exitpoint
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    44
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    45
echo Creating commodity shortcut...
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    46
COPY /y %CD%\misc\winutils\Hedgewars.lnk C:%HOMEPATH%\Desktop\Hedgewars.lnk
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    47
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    48
echo ALL DONE, Hedgewars has been successfully compiled and installed
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    49
7799
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    50
:exitpoint
a88a02c19a5b tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents: 6569
diff changeset
    51
cd %CURRDIR%
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    52
pause