tools/build_windows.bat
author bovi
Sat, 14 Jan 2012 05:03:21 +0100
changeset 6560 ca07e6be08d0
child 6562 e6b35a238d69
permissions -rw-r--r--
GCI task: cmd.exe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     1
@echo off
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     2
:edit these variables if you need
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     3
SET PASCAL=c:\Development\FPC\2.4.4\bin\i386-win32\
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     4
SET QTDIR=c:\Development\QtSDK\Desktop\Qt\4.7.4\mingw\bin
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     5
SET PATH=%PATH%;%PASCAL%
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     6
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     7
:SETUP
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     8
cd ..
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     9
if not exist bin mkdir bin
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    10
cd bin
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    11
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    12
echo Copying the DLLs...
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    13
xcopy /d/y ..\misc\winutils\bin\* .
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    14
xcopy /d/y %QTDIR%\QtCore4.dll .
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    15
xcopy /d/y %QTDIR%\QtGui4.dll .
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    16
xcopy /d/y %QTDIR%\QtNetwork4.dll .
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    17
xcopy /d/y %QTDIR%\libgcc_s_dw2-1.dll .
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    18
xcopy /d/y %QTDIR%\mingwm10.dll .
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    19
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    20
call %QTDIR%\qtenv2.bat
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    21
echo Running cmake...
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    22
cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\..\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\..\misc\winutils\lib" ..
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    23
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    24
echo Running make...
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    25
mingw32-make -lSDL -lSDL_Mixer install
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    26
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    27
echo Creating shortcut...
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    28
if /i "%PROGRAMFILES(X86)%"=="" (
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    29
	COPY /y ..\misc\winutils\Hedgewars_x86.lnk C:\%HOMEPATH%\Desktop\Hedgewars.lnk 
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    30
) else (
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    31
	COPY /y ..\misc\winutils\Hedgewars_x64.lnk C:\%HOMEPATH%\Desktop\Hedgewars.lnk
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    32
)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    33
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    34
echo ALL DONE, Hedgewars has been successfully compiled and installed
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    35
pause