tools/old/build_windows.bat
author Wuzzy <Wuzzy2@mail.ru>
Mon, 19 Nov 2018 01:04:29 +0100
changeset 14232 60622d2a4a3c
parent 13511 b62b14aa88d4
permissions -rw-r--r--
ACF1: Set hero's gear position when skipping first cut scene
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13507
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     1
:: WARNNG WARNING WARNING ::
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     2
:: This Batch script is BROKEN and EXTREMELY OUTDATED!
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     3
:: It does not work with latest version and needs a complete redo or removal.
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     4
:: Its functionality has been disabled.
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     5
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     6
:: Print dummy text and return.
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     7
echo Sorry, this script is outdated. You're on your own.
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     8
exit
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
     9
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    10
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    11
::::::::::::::::::::::::::::::
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    12
:: Old script code follows ...
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    13
::::::::::::::::::::::::::::::
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    14
@echo off
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    15
::edit these variables if you need
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    16
set PASCAL=C:\FPC\2.6.0\bin\i386-win32\
13507
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    17
:: FIXME: Go Qt 5
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    18
set QTDIR=C:\QtSDK\Desktop\Qt\4.7.4\mingw\bin
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    19
set PATH=%PATH%;%PASCAL%
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    20
set BUILD_TYPE="Debug"
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    21
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    22
:setup
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    23
set CURRDIR="%CD%"
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    24
cd ..
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    25
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    26
echo Fetching all DLLs...
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    27
if %BUILD_TYPE%=="Debug" (
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    28
    for %%G in (QtCored4 QtGuid4 QtNetworkd4) do xcopy /d/y %QTDIR%\%%G.dll %CD%\bin\
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    29
)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    30
:: should you libgcc dynamically you should try adding libgcc_s_dw2-1 and mingwm10
13507
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    31
:: FIXME: Use Qt5
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    32
for %%G in (QtCore4 QtGui4 QtNetwork4) do (
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    33
    xcopy /d/y %QTDIR%\%%G.dll %CD%\bin\
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    34
)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    35
13507
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    36
:: FIXME: Use SDL 2.0
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    37
if not exist %CD%\misc\winutils\bin\ mkdir %CD%\misc\winutils\bin\
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    38
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
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    39
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
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    40
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
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    41
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
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    42
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
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    43
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    44
::for video recording
13507
7e188a28f078 Remove and replace old googlecode references
Wuzzy <Wuzzy2@mail.ru>
parents: 11379
diff changeset
    45
:: FIXME: googlecode.com is defunct.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    46
if not exist %CD%\misc\winutils\bin\avformat-54.dll cscript %CD%\tools\w32DownloadUnzip.vbs http://hedgewars.googlecode.com/files/libav-win32-20121022-dll.zip %CD%\misc\winutils\bin
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    47
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    48
::this is needed because fpc png unit hardcodes libpng-1.2.12
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    49
if not exist %CD%\misc\winutils\bin\libpng13.dll copy /y %CD%\misc\winutils\bin\libpng15-15.dll %CD%\misc\winutils\bin\libpng13.dll
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    50
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    51
xcopy /d/y %CD%\misc\winutils\bin\*.dll %CD%\bin\
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    52
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    53
::setting up the environment...
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    54
call %QTDIR%\qtenv2.bat
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    55
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    56
echo Running cmake...
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    57
set ERRORLEVEL=
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    58
cmake . -G "MinGW Makefiles" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" -DCMAKE_BUILD_TYPE="%BUILD_TYPE%" -DCMAKE_PREFIX_PATH="%CD%\misc\winutils\\"
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    59
:: prefix should be last
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    60
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    61
if %ERRORLEVEL% NEQ 0 goto exitpoint
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    62
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    63
echo Running make...
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    64
set ERRORLEVEL=
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    65
mingw32-make VERBOSE=1
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    66
if %ERRORLEVEL% NEQ 0 goto exitpoint
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    67
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    68
echo Installing...
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    69
set ERRORLEVEL=
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    70
mingw32-make install > nul
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    71
if %ERRORLEVEL% NEQ 0 goto exitpoint
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    72
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    73
echo Creating commodity shortcut...
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    74
copy /y %CD%\misc\winutils\Hedgewars.lnk C:%HOMEPATH%\Desktop\Hedgewars.lnk
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    75
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    76
echo ALL DONE, Hedgewars has been successfully compiled and installed
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    77
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    78
:exitpoint
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    79
cd %CURRDIR%
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 9224
diff changeset
    80
pause