tools/build_windows.bat
author unc0rr
Wed, 24 Oct 2012 12:41:46 +0400
changeset 7808 cc1805cd9138
parent 7799 a88a02c19a5b
child 7810 da60e6b6baa3
permissions -rw-r--r--
Make explosion look depend less on fps

@echo off
::edit these variables if you need
set PASCAL=C:\FPC\2.4.4\bin\i386-win32\
set QTDIR=C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
set PATH=%PATH%;%PASCAL%

:setup
set CURRDIR="%CD%"
cd ..

echo Copying the DLLs...
REM xcopy /d/y %CD%\misc\winutils\bin\* .
xcopy /d/y %QTDIR%\QtCore4.dll bin
xcopy /d/y %QTDIR%\QtGui4.dll bin
xcopy /d/y %QTDIR%\QtNetwork4.dll bin
xcopy /d/y %QTDIR%\libgcc_s_dw2-1.dll bin
xcopy /d/y %QTDIR%\mingwm10.dll bin

::setting up the environment...
call %QTDIR%\qtenv2.bat

echo Running cmake...
set ERRORLEVEL=
cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\misc\winutils\lib" .

if %ERRORLEVEL% NEQ 0 goto exitpoint

echo Running make...
set ERRORLEVEL=
mingw32-make
if %ERRORLEVEL% NEQ 0 goto exitpoint

echo Installing...
set ERRORLEVEL=
mingw32-make install > nul
if %ERRORLEVEL% NEQ 0 goto exitpoint

echo Creating commodity shortcut...
COPY /y %CD%\misc\winutils\Hedgewars.lnk C:%HOMEPATH%\Desktop\Hedgewars.lnk

echo ALL DONE, Hedgewars has been successfully compiled and installed

:exitpoint
cd %CURRDIR%
pause