tools/build_windows.bat
author Stepan777 <stepik-777@mail.ru>
Thu, 26 Jul 2012 21:58:25 +0400
changeset 7447 01111960a48d
parent 6569 64f9fbd48b9e
child 7799 a88a02c19a5b
permissions -rw-r--r--
uploading to youtube, it works, but user interface is still incomplete
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
6562
e6b35a238d69 somehow my paths slipped in...
koda
parents: 6560
diff changeset
     3
SET PASCAL=C:\FPC\2.4.4\bin\i386-win32\
e6b35a238d69 somehow my paths slipped in...
koda
parents: 6560
diff changeset
     4
SET QTDIR=C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
6560
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
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    20
echo Setting up the environment...
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    21
call %QTDIR%\qtenv2.bat
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    22
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    23
echo Running cmake...
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    24
set errorlevel=
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    25
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
    26
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    27
if %errorlevel% NEQ 0 goto exit
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    28
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    29
echo Running make...
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    30
set errorlevel=
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    31
mingw32-make -lSDL -lSDL_Mixer install
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    32
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    33
if %errorlevel% NEQ 0 goto exit
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    34
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    35
echo Creating shortcut...
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    36
if /i "%PROGRAMFILES(X86)%"=="" (
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    37
	COPY /y ..\misc\winutils\Hedgewars_x86.lnk C:\%HOMEPATH%\Desktop\Hedgewars.lnk 
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    38
) else (
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    39
	COPY /y ..\misc\winutils\Hedgewars_x64.lnk C:\%HOMEPATH%\Desktop\Hedgewars.lnk
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    40
)
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    41
echo ALL DONE, Hedgewars has been successfully compiled and installed
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    42
6569
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    43
:exit
64f9fbd48b9e updated win build script
bovi
parents: 6562
diff changeset
    44
cd ../tools
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    45
pause