6560
|
1 |
@echo off
|
|
2 |
:edit these variables if you need
|
6562
|
3 |
SET PASCAL=C:\FPC\2.4.4\bin\i386-win32\
|
|
4 |
SET QTDIR=C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
|
6560
|
5 |
SET PATH=%PATH%;%PASCAL%
|
|
6 |
|
|
7 |
:SETUP
|
|
8 |
cd ..
|
|
9 |
if not exist bin mkdir bin
|
|
10 |
cd bin
|
|
11 |
|
|
12 |
echo Copying the DLLs...
|
|
13 |
xcopy /d/y ..\misc\winutils\bin\* .
|
|
14 |
xcopy /d/y %QTDIR%\QtCore4.dll .
|
|
15 |
xcopy /d/y %QTDIR%\QtGui4.dll .
|
|
16 |
xcopy /d/y %QTDIR%\QtNetwork4.dll .
|
|
17 |
xcopy /d/y %QTDIR%\libgcc_s_dw2-1.dll .
|
|
18 |
xcopy /d/y %QTDIR%\mingwm10.dll .
|
|
19 |
|
6569
|
20 |
echo Setting up the environment...
|
6560
|
21 |
call %QTDIR%\qtenv2.bat
|
6569
|
22 |
|
6560
|
23 |
echo Running cmake...
|
6569
|
24 |
set errorlevel=
|
6560
|
25 |
cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\..\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\..\misc\winutils\lib" ..
|
|
26 |
|
6569
|
27 |
if %errorlevel% NEQ 0 goto exit
|
|
28 |
|
6560
|
29 |
echo Running make...
|
6569
|
30 |
set errorlevel=
|
6560
|
31 |
mingw32-make -lSDL -lSDL_Mixer install
|
|
32 |
|
6569
|
33 |
if %errorlevel% NEQ 0 goto exit
|
|
34 |
|
6560
|
35 |
echo Creating shortcut...
|
|
36 |
if /i "%PROGRAMFILES(X86)%"=="" (
|
|
37 |
COPY /y ..\misc\winutils\Hedgewars_x86.lnk C:\%HOMEPATH%\Desktop\Hedgewars.lnk
|
|
38 |
) else (
|
|
39 |
COPY /y ..\misc\winutils\Hedgewars_x64.lnk C:\%HOMEPATH%\Desktop\Hedgewars.lnk
|
|
40 |
)
|
6569
|
41 |
echo ALL DONE, Hedgewars has been successfully compiled and installed
|
6560
|
42 |
|
6569
|
43 |
:exit
|
|
44 |
cd ../tools
|
6560
|
45 |
pause
|