tools/build_windows.bat
changeset 7812 00696c1450da
parent 7810 da60e6b6baa3
child 7813 7ac83d79b897
equal deleted inserted replaced
7811:49ab679cb384 7812:00696c1450da
     8 set CURRDIR="%CD%"
     8 set CURRDIR="%CD%"
     9 cd ..
     9 cd ..
    10 
    10 
    11 echo Fetching all DLLs...
    11 echo Fetching all DLLs...
    12 for %%G in (QtCore4 QtGui4 QtNetwork4 libgcc_s_dw2-1 mingwm10) do (
    12 for %%G in (QtCore4 QtGui4 QtNetwork4 libgcc_s_dw2-1 mingwm10) do (
    13     xcopy /d/y %QTDIR%\%%G.dll bin\
    13     xcopy /d/y/l %QTDIR%\%%G.dll bin\
    14 )
    14 )
    15 
    15 
    16 if not exist %CD%\misc\winutils\bin\ mkdir %CD%\misc\winutils\bin\
    16 if not exist %CD%\misc\winutils\bin\ mkdir %CD%\misc\winutils\bin\
    17 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
    17 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
    18 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
    18 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
    19 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
    19 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
    20 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
    20 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
    21 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
    21 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
    22 
    22 
       
    23 ::this is needed because fpc png unit hardcodes libpng-1.2.12
       
    24 if not exist %CD%\misc\winutils\bin\libpng13.dll copy /y %CD%\misc\winutils\bin\libpng15-15.dll %CD%\misc\winutils\bin\libpng13.dll
       
    25 
    23 xcopy /d/y %CD%\misc\winutils\bin\*.dll bin
    26 xcopy /d/y %CD%\misc\winutils\bin\*.dll bin
    24 xcopy /d/y %CD%\misc\winutils\bin\*.txt bin
    27 xcopy /d/y %CD%\misc\winutils\bin\*.txt bin
    25 
    28 
    26 ::setting up the environment...
    29 ::setting up the environment...
    27 call %QTDIR%\qtenv2.bat
    30 call %QTDIR%\qtenv2.bat
    28 
    31 
    29 echo Running cmake...
    32 echo Running cmake...
    30 set ERRORLEVEL=
    33 set ERRORLEVEL=
    31 cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\misc\winutils\lib" .
    34 cmake -G "MinGW Makefiles" -DCMAKE_INCLUDE_PATH="%CD%\misc\winutils\include" -DCMAKE_LIBRARY_PATH="%CD%\misc\winutils\lib" -DPNG_LIBRARY="%CD%\misc\winutils\bin\libpng13.dll" .
    32 
    35 
    33 if %ERRORLEVEL% NEQ 0 goto exitpoint
    36 if %ERRORLEVEL% NEQ 0 goto exitpoint
    34 
    37 
    35 echo Running make...
    38 echo Running make...
    36 set ERRORLEVEL=
    39 set ERRORLEVEL=
    41 set ERRORLEVEL=
    44 set ERRORLEVEL=
    42 mingw32-make install > nul
    45 mingw32-make install > nul
    43 if %ERRORLEVEL% NEQ 0 goto exitpoint
    46 if %ERRORLEVEL% NEQ 0 goto exitpoint
    44 
    47 
    45 echo Creating commodity shortcut...
    48 echo Creating commodity shortcut...
    46 COPY /y %CD%\misc\winutils\Hedgewars.lnk C:%HOMEPATH%\Desktop\Hedgewars.lnk
    49 copy /y %CD%\misc\winutils\Hedgewars.lnk C:%HOMEPATH%\Desktop\Hedgewars.lnk
    47 
    50 
    48 echo ALL DONE, Hedgewars has been successfully compiled and installed
    51 echo ALL DONE, Hedgewars has been successfully compiled and installed
    49 
    52 
    50 :exitpoint
    53 :exitpoint
    51 cd %CURRDIR%
    54 cd %CURRDIR%