author | koda |
Wed, 24 Oct 2012 13:21:18 +0100 | |
changeset 7812 | 00696c1450da |
parent 7810 | da60e6b6baa3 |
child 7813 | 7ac83d79b897 |
permissions | -rw-r--r-- |
6560 | 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 | 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 | 9 |
cd .. |
10 |
||
7810 | 11 |
echo Fetching all DLLs... |
12 |
for %%G in (QtCore4 QtGui4 QtNetwork4 libgcc_s_dw2-1 mingwm10) do ( |
|
7812 | 13 |
xcopy /d/y/l %QTDIR%\%%G.dll bin\ |
7810 | 14 |
) |
15 |
||
16 |
if not exist %CD%\misc\winutils\bin\ mkdir %CD%\misc\winutils\bin\ |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
22 |
||
7812 | 23 |
::this is needed because fpc png unit hardcodes libpng-1.2.12 |
24 |
if not exist %CD%\misc\winutils\bin\libpng13.dll copy /y %CD%\misc\winutils\bin\libpng15-15.dll %CD%\misc\winutils\bin\libpng13.dll |
|
25 |
||
7810 | 26 |
xcopy /d/y %CD%\misc\winutils\bin\*.dll bin |
27 |
xcopy /d/y %CD%\misc\winutils\bin\*.txt bin |
|
6560 | 28 |
|
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
29 |
::setting up the environment... |
6560 | 30 |
call %QTDIR%\qtenv2.bat |
6569 | 31 |
|
6560 | 32 |
echo Running cmake... |
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
33 |
set ERRORLEVEL= |
7812 | 34 |
cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\misc\winutils\lib" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" . |
6560 | 35 |
|
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
36 |
if %ERRORLEVEL% NEQ 0 goto exitpoint |
6569 | 37 |
|
6560 | 38 |
echo Running make... |
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
39 |
set ERRORLEVEL= |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
40 |
mingw32-make |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
41 |
if %ERRORLEVEL% NEQ 0 goto exitpoint |
6569 | 42 |
|
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
43 |
echo Installing... |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
44 |
set ERRORLEVEL= |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
45 |
mingw32-make install > nul |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
46 |
if %ERRORLEVEL% NEQ 0 goto exitpoint |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
47 |
|
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
48 |
echo Creating commodity shortcut... |
7812 | 49 |
copy /y %CD%\misc\winutils\Hedgewars.lnk C:%HOMEPATH%\Desktop\Hedgewars.lnk |
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
50 |
|
6569 | 51 |
echo ALL DONE, Hedgewars has been successfully compiled and installed |
6560 | 52 |
|
7799
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
53 |
:exitpoint |
a88a02c19a5b
tweaks to win build script, hedgewars.pro now supports win32 target
koda
parents:
6569
diff
changeset
|
54 |
cd %CURRDIR% |
6560 | 55 |
pause |