Checking in the build mingw scripts so that they are in svn to better follow the changes.
This commit is contained in:
@@ -2,4 +2,8 @@ Please see
|
|||||||
http://sourceforge.net/project/showfiles.php?group_id=166634&package_id=268019
|
http://sourceforge.net/project/showfiles.php?group_id=166634&package_id=268019
|
||||||
for some scripts to compile PokerTH using mingw.
|
for some scripts to compile PokerTH using mingw.
|
||||||
|
|
||||||
|
The scripts are also provided in the win32_build_scripts subdirectory, but they
|
||||||
|
require specific download and uncompression tools to run, which are provided
|
||||||
|
with the package at the upper link.
|
||||||
|
|
||||||
2008 by Lothar May
|
2008 by Lothar May
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2008 by Lothar May *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the *
|
||||||
|
* Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
// Test file to check if the compiler is working.
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
string s("PokerTH test");
|
||||||
|
cout << s << endl;
|
||||||
|
return 42;
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
@echo off
|
||||||
|
echo PokerTH Win32 mingw build script version 1.0.
|
||||||
|
echo Copyright (C) 2008 Lothar May. License: GPL 2 or later
|
||||||
|
echo BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
echo FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
echo.
|
||||||
|
|
||||||
|
SET PKTH_OldDir=%CD%
|
||||||
|
SET PKTH_BaseDir=%1
|
||||||
|
if not defined PKTH_BaseDir goto noDir
|
||||||
|
if not exist %PKTH_BaseDir% goto dirDoesNotExist
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
echo test > pokerth123_delete_me.txt
|
||||||
|
if not exist %PKTH_BaseDir%\pokerth123_delete_me.txt goto noWriteAccess
|
||||||
|
del %PKTH_BaseDir%\pokerth123_delete_me.txt
|
||||||
|
if exist %PKTH_BaseDir%\pokerth123_delete_me.txt goto noWriteAccess
|
||||||
|
echo.
|
||||||
|
echo Using "%PKTH_BaseDir%" as base directory.
|
||||||
|
echo.
|
||||||
|
echo This script should be run AFTER pokerth_download_libs.cmd.
|
||||||
|
echo.
|
||||||
|
echo It will perform the following steps:
|
||||||
|
echo - Clean the current build of PokerTH
|
||||||
|
echo - Update the PokerTH sources from svn
|
||||||
|
echo - Build PokerTH from the sources
|
||||||
|
echo.
|
||||||
|
echo You may run this script again at any time, in case you
|
||||||
|
echo wish to update your version.
|
||||||
|
echo.
|
||||||
|
echo Press Ctrl+c to abort.
|
||||||
|
echo The process will start if you press any other key.
|
||||||
|
pause
|
||||||
|
echo.
|
||||||
|
echo Checking for an installation of Qt
|
||||||
|
if not exist %PKTH_BaseDir%\qt\bin\qmake.exe goto noQmake
|
||||||
|
if not exist %PKTH_BaseDir%\svn\bin\svn.exe goto noSvn
|
||||||
|
if not exist %PKTH_BaseDir%\mingw\bin\mingw32-make.exe goto otherScriptFirst
|
||||||
|
if not exist %PKTH_BaseDir%\pokerth goto otherScriptFirst
|
||||||
|
SET PATH=%PKTH_BaseDir%\svn\bin;%PKTH_BaseDir%\qt\bin;%PKTH_BaseDir%\mingw\bin;%PATH%
|
||||||
|
SET QMAKESPEC=win32-g++
|
||||||
|
SET QTDIR=%PKTH_BaseDir%\qt
|
||||||
|
|
||||||
|
cd pokerth
|
||||||
|
if exist Makefile. (
|
||||||
|
echo.
|
||||||
|
echo Cleaning the current build
|
||||||
|
mingw32-make distclean
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Running svn update
|
||||||
|
svn update
|
||||||
|
echo.
|
||||||
|
echo Building PokerTH
|
||||||
|
qmake pokerth.pro
|
||||||
|
mingw32-make
|
||||||
|
move release\pokerth.exe .\pokerth.exe
|
||||||
|
echo.
|
||||||
|
echo Done compiling PokerTH. Have a lot of fun!
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:noSvn
|
||||||
|
echo Could not find svn.exe
|
||||||
|
goto otherScriptFirst
|
||||||
|
|
||||||
|
:noQmake
|
||||||
|
echo Could not find qmake.exe
|
||||||
|
goto otherScriptFirst
|
||||||
|
|
||||||
|
:otherScriptFirst
|
||||||
|
echo Make sure to run pokerth_download_libs.cmd BEFORE this script.
|
||||||
|
echo Also make sure that you use the same base directory for both scripts.
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:noWriteAccess
|
||||||
|
echo Could not write files to directory "%PKTH_BaseDir%".
|
||||||
|
echo Make sure the directory name is correct (do not use spaces or non-ASCII).
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:dirDoesNotExist
|
||||||
|
echo The directory "%PKTH_BaseDir%" does not exist.
|
||||||
|
echo Please provide a valid directory.
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:noDir
|
||||||
|
echo Usage: compile_pokerth_win32.cmd ^<BaseDir^>.
|
||||||
|
echo Make sure that the base directory exists and is writable.
|
||||||
|
echo Use a FULL PATH without trailing slash for the base directory.
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:end
|
||||||
|
cd /d %PKTH_OldDir%
|
||||||
@@ -0,0 +1,303 @@
|
|||||||
|
@echo off
|
||||||
|
echo PokerTH Win32 mingw download script version 1.0.
|
||||||
|
echo Copyright (C) 2008 Lothar May. License: GPL 2 or later
|
||||||
|
echo BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
echo FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
echo.
|
||||||
|
echo This script uses and downloads other software.
|
||||||
|
echo Please mind their licenses.
|
||||||
|
echo.
|
||||||
|
echo Press enter to confirm, Ctrl+c to abort. Further information will follow.
|
||||||
|
pause
|
||||||
|
echo.
|
||||||
|
|
||||||
|
SET SOURCEFORGE_MIRROR=mesh.dl
|
||||||
|
SET PKTH_OldDir=%CD%
|
||||||
|
SET PKTH_BaseDir=%1
|
||||||
|
if not defined PKTH_BaseDir goto noDir
|
||||||
|
if not exist %PKTH_BaseDir% goto dirDoesNotExist
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
echo test > pokerth123_delete_me.txt
|
||||||
|
if not exist %PKTH_BaseDir%\pokerth123_delete_me.txt goto noWriteAccess
|
||||||
|
del %PKTH_BaseDir%\pokerth123_delete_me.txt
|
||||||
|
if exist %PKTH_BaseDir%\pokerth123_delete_me.txt goto noWriteAccess
|
||||||
|
|
||||||
|
echo Using "%PKTH_BaseDir%" as base directory.
|
||||||
|
echo.
|
||||||
|
echo This script will download and install the prerequisites for building PokerTH
|
||||||
|
echo - mingw with gcc-core, gcc-g++, binutils, mingw-runtime,
|
||||||
|
echo w32api, mingw32-make, mingw-utils
|
||||||
|
echo - Qt - will be compiled from the sources
|
||||||
|
echo - GnuTLS - using the binary release
|
||||||
|
echo - zlib and libcurl - will be compiled from the sources
|
||||||
|
echo - boost - will be compiled from the sources
|
||||||
|
echo - SDL, SDL_mixer - using binary releases
|
||||||
|
echo - subversion
|
||||||
|
echo.
|
||||||
|
echo Downloading all and building some of these libraries might require up to
|
||||||
|
echo 5 (five) GB hard disc space. Roughly 200 MB will be downloaded.
|
||||||
|
echo ONLY continue, if you are SURE that you have enough disc space available.
|
||||||
|
echo.
|
||||||
|
echo Files within the base directory might be OVERWRITTEN WITHOUT WARNING.
|
||||||
|
echo Make sure that you have FULL RIGHTS in the base directory!
|
||||||
|
echo.
|
||||||
|
echo You need to run this script only once (if successful).
|
||||||
|
echo It might take SEVERAL HOURS.
|
||||||
|
echo.
|
||||||
|
echo If unsure, press Ctrl+c and abort.
|
||||||
|
echo The process will start if you press any other key.
|
||||||
|
pause
|
||||||
|
echo.
|
||||||
|
echo Downloading mingw packages
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/gcc-core-3.4.5-20060117-3.tar.gz -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/gcc-g++-3.4.5-20060117-3.tar.gz -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/binutils-2.18.50-20080109-2.tar.gz -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/mingw-runtime-3.14.tar.gz -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/w32api-3.11.tar.gz -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/mingw32-make-3.81-20080326-2.tar.gz -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/mingw/mingw-utils-0.3.tar.gz
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking mingw packages
|
||||||
|
mkdir mingw
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y gcc-core-3.4.5-20060117-3.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw gcc-core-3.4.5-20060117-3.tar
|
||||||
|
del gcc-core-3.4.5-20060117-3.tar
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y gcc-g++-3.4.5-20060117-3.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw gcc-g++-3.4.5-20060117-3.tar
|
||||||
|
del gcc-g++-3.4.5-20060117-3.tar
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y binutils-2.18.50-20080109-2.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw binutils-2.18.50-20080109-2.tar
|
||||||
|
del binutils-2.18.50-20080109-2.tar
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y mingw-runtime-3.14.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw mingw-runtime-3.14.tar
|
||||||
|
del mingw-runtime-3.14.tar
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y w32api-3.11.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw w32api-3.11.tar
|
||||||
|
del w32api-3.11.tar
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y mingw32-make-3.81-20080326-2.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw mingw32-make-3.81-20080326-2.tar
|
||||||
|
del mingw32-make-3.81-20080326-2.tar
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y mingw-utils-0.3.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -omingw mingw-utils-0.3.tar
|
||||||
|
del mingw-utils-0.3.tar
|
||||||
|
echo.
|
||||||
|
echo Testing g++
|
||||||
|
set PATH=%PKTH_BaseDir%\mingw\bin;%PATH%
|
||||||
|
g++ %PKTH_OldDir%\helper_src\pkth_test.cpp -o pkth_test
|
||||||
|
if not errorlevel 0 goto gppFailure
|
||||||
|
pkth_test
|
||||||
|
if not errorlevel 42 goto gppFailure
|
||||||
|
del pkth_test.exe
|
||||||
|
echo Successful
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
if not exist %PKTH_BaseDir%\qt. (
|
||||||
|
echo.
|
||||||
|
echo Downloading Qt
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://ftp.ntua.gr/pub/X11/Qt/qt/source/qt-win-opensource-src-4.3.4.zip
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking Qt
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y qt-win-opensource-src-4.3.4.zip
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
ren qt-win-opensource-src-4.3.4 qt
|
||||||
|
)
|
||||||
|
if not exist %PKTH_BaseDir%\qt goto qtFailure
|
||||||
|
echo.
|
||||||
|
echo Compiling Qt
|
||||||
|
SET PATH=%PKTH_BaseDir%\qt\bin;%PATH%
|
||||||
|
SET QMAKESPEC=win32-g++
|
||||||
|
SET QTDIR=%PKTH_BaseDir%\qt
|
||||||
|
cd qt
|
||||||
|
configure -static -fast -no-qt3support -no-openssl -no-sql-sqlite
|
||||||
|
qmake projects.pro -o Makefile -spec win32-g++
|
||||||
|
mingw32-make sub-src
|
||||||
|
echo.
|
||||||
|
echo Done compiling Qt
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
if not exist %PKTH_BaseDir%\zlib. (
|
||||||
|
echo.
|
||||||
|
echo Downloading zlib
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/libpng/zlib-1.2.3.tar.gz
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking zlib
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y zlib-1.2.3.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y zlib-1.2.3.tar
|
||||||
|
del zlib-1.2.3.tar
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
ren zlib-1.2.3 zlib
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Compiling zlib
|
||||||
|
cd zlib
|
||||||
|
mingw32-make -fwin32\makefile.gcc
|
||||||
|
echo.
|
||||||
|
echo Done compiling zlib
|
||||||
|
SET ZLIB_PATH=%PKTH_BaseDir%\zlib
|
||||||
|
SET ZLIB_LIBPATH=%PKTH_BaseDir%\zlib
|
||||||
|
SET ZLIB_SOURCE=%PKTH_BaseDir%\zlib
|
||||||
|
SET ZLIB_BINARY=zlib
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
if not exist %PKTH_BaseDir%\GnuTLS. (
|
||||||
|
echo.
|
||||||
|
echo Downloading GnuTLS
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://josefsson.org/gnutls4win/gnutls-2.3.8.zip
|
||||||
|
mkdir GnuTLS
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -oGnuTLS gnutls-2.3.8.zip
|
||||||
|
REM Wait 5 seconds for the file cache.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
REM Remove files for dynamic linking, we do not want to accidently use them
|
||||||
|
mkdir GnuTLS\lib\unused
|
||||||
|
move GnuTLS\lib\*.dll.a GnuTLS\lib\unused
|
||||||
|
move GnuTLS\lib\*.la GnuTLS\lib\unused
|
||||||
|
)
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
if not exist %PKTH_BaseDir%\curl. (
|
||||||
|
echo.
|
||||||
|
echo Downloading curl
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://curl.haxx.se/download/curl-7.18.1.tar.bz2
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking curl
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y curl-7.18.1.tar.bz2
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y curl-7.18.1.tar
|
||||||
|
del curl-7.18.1.tar
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
ren curl-7.18.1 curl
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Compiling curl
|
||||||
|
cd curl
|
||||||
|
mingw32-make mingw32-zlib
|
||||||
|
echo.
|
||||||
|
echo Done compiling curl
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
if not exist %PKTH_BaseDir%\boost. (
|
||||||
|
echo.
|
||||||
|
echo Downloading boost and bjam
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/boost/boost_1_35_0.7z -O http://%SOURCEFORGE_MIRROR%.sourceforge.net/sourceforge/boost/boost-jam-3.1.16-1-ntx86.zip
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking boost and bjam
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y boost_1_35_0.7z
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y boost-jam-3.1.16-1-ntx86.zip
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
move boost-jam-3.1.16-1-ntx86\bjam.exe mingw\bin\bjam.exe
|
||||||
|
move boost-jam-3.1.16-1-ntx86\LICENSE_1_0.txt mingw\bin\bjam_LICENSE_1_0.txt
|
||||||
|
rd boost-jam-3.1.16-1-ntx86
|
||||||
|
ren boost_1_35_0 boost
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Compiling boost
|
||||||
|
cd boost
|
||||||
|
bjam link=static --build-dir=%PKTH_BaseDir%\pkth_boost_delete_me_after_build --toolset=gcc stage
|
||||||
|
echo.
|
||||||
|
echo Done compiling boost
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
if not exist %PKTH_BaseDir%\SDL. (
|
||||||
|
echo.
|
||||||
|
echo Downloading SDL precompiled
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking SDL
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y SDL-devel-1.2.13-mingw32.tar.gz
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y SDL-devel-1.2.13-mingw32.tar
|
||||||
|
del SDL-devel-1.2.13-mingw32.tar
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
ren SDL-1.2.13 SDL
|
||||||
|
)
|
||||||
|
if not exist %PKTH_BaseDir%\SDL_mixer. (
|
||||||
|
echo.
|
||||||
|
echo Downloading SDL_mixer precompiled
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.8.zip -O http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.8-win32.zip
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking SDL_mixer
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y SDL_mixer-1.2.8.zip
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
ren SDL_mixer-1.2.8 SDL_mixer
|
||||||
|
mkdir SDL_mixer\bin
|
||||||
|
mkdir SDL_mixer\lib
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y -oSDL_mixer\bin SDL_mixer-1.2.8-win32.zip
|
||||||
|
echo.
|
||||||
|
echo Creating import library
|
||||||
|
cd SDL_mixer\bin
|
||||||
|
pexports SDL_mixer.dll > SDL_mixer.def
|
||||||
|
dlltool -d SDL_mixer.def -D SDL_mixer.dll -l libsdl_mixer.a
|
||||||
|
move libsdl_mixer.a ..\lib
|
||||||
|
cd /d %PKTH_BaseDir%
|
||||||
|
)
|
||||||
|
if not exist %PKTH_BaseDir%\svn. (
|
||||||
|
echo.
|
||||||
|
echo Downloading subversion
|
||||||
|
%PKTH_OldDir%\third_party_apps\curl -O http://subversion.tigris.org/files/documents/15/41077/svn-win32-1.4.6.zip
|
||||||
|
if not errorlevel 0 goto downloadFailed
|
||||||
|
echo.
|
||||||
|
echo Unpacking subversion
|
||||||
|
%PKTH_OldDir%\third_party_apps\7za x -y svn-win32-1.4.6.zip
|
||||||
|
REM Wait 5 seconds for the file cache, else ren might fail.
|
||||||
|
@ping 127.0.0.1 -n 5 -w 1000 > nul
|
||||||
|
ren svn-win32-1.4.6 svn
|
||||||
|
)
|
||||||
|
SET PATH=%PKTH_BaseDir%\svn\bin;%PATH%
|
||||||
|
if not exist %PKTH_BaseDir%\svn\bin\svn.exe goto svnFailure
|
||||||
|
if not exist %PKTH_BaseDir%\pokerth. (
|
||||||
|
echo.
|
||||||
|
echo Checking out latest PokerTH sources from svn
|
||||||
|
svn co https://pokerth.svn.sourceforge.net/svnroot/pokerth/trunk/pokerth
|
||||||
|
echo.
|
||||||
|
echo Done checking out latest PokerTH sources
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Copying DLLs
|
||||||
|
copy /Y %PKTH_BaseDir%\SDL\bin\SDL.dll %PKTH_BaseDir%\pokerth\
|
||||||
|
copy /Y %PKTH_BaseDir%\SDL_mixer\bin\SDL_mixer.dll %PKTH_BaseDir%\pokerth\
|
||||||
|
copy /Y %PKTH_BaseDir%\mingw\bin\mingwm10.dll %PKTH_BaseDir%\pokerth\
|
||||||
|
echo.
|
||||||
|
echo This script has finished. You may run the pokerth_build.cmd now.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:svnFailure
|
||||||
|
echo Could not find svn.exe
|
||||||
|
echo subversion installation failed.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:perlFailure
|
||||||
|
echo Could not find perl.exe
|
||||||
|
echo perl installation failed.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:qtFailure
|
||||||
|
echo Could not unzip qt and/or rename qt folder.
|
||||||
|
echo Check that you have full rights.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:gppFailure
|
||||||
|
echo Could not compile/run test.cpp.
|
||||||
|
echo mingw installation failed.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:downloadFailed
|
||||||
|
echo Download failed.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:noWriteAccess
|
||||||
|
echo Could not write files to directory "%PKTH_BaseDir%".
|
||||||
|
echo Make sure the directory name is correct (do not use spaces or non-ASCII).
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:dirDoesNotExist
|
||||||
|
echo The directory "%PKTH_BaseDir%" does not exist.
|
||||||
|
echo Please provide a valid directory.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:noDir
|
||||||
|
echo Usage: compile_pokerth_win32.cmd ^<BaseDir^>.
|
||||||
|
echo Make sure that the base directory exists and is writable.
|
||||||
|
echo Use a FULL PATH without trailing slash for the base directory.
|
||||||
|
goto pkth_end
|
||||||
|
|
||||||
|
:pkth_end
|
||||||
|
cd /d %PKTH_OldDir%
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
These are some tools to help compiling the development version of PokerTH on Windows
|
||||||
|
using the mingw g++ compiler.
|
||||||
|
|
||||||
|
This script has been tested on Windows XP and Windows Vista. When updating this script from a
|
||||||
|
previous version, delete the base pokerth directory first, and start from the scratch.
|
||||||
|
|
||||||
|
Compiling all libraries and PokerTH itself could take SEVERAL HOURS, and uses up a lot of disc space.
|
||||||
|
You need up to 5 GB of free disc space to perform a full build.
|
||||||
|
|
||||||
|
Direct internet access (without proxy) is required!
|
||||||
|
|
||||||
|
Please follow these instructions:
|
||||||
|
|
||||||
|
1. Create a base directory for all PokerTH related projects.
|
||||||
|
This should be an empty directory. There should be no spaces or non-ASCII characters in the directory name.
|
||||||
|
Example: C:\pokerth_root
|
||||||
|
The directory must be fully writable.
|
||||||
|
|
||||||
|
2. Open a command line window (Start -> Run -> "cmd.exe")
|
||||||
|
|
||||||
|
3. Change directory to where you have unpacked the package which contains this readme.
|
||||||
|
There should be no spaces or non-ASCII characters in the directory name.
|
||||||
|
Example: "cd /d C:\Tools\pokerth_win32_build"
|
||||||
|
|
||||||
|
4. Run the script which downloads and builds all required libraries, and provide
|
||||||
|
the base directory as parameter. Interaction is required at the beginning after
|
||||||
|
downloading Qt.
|
||||||
|
Example: "pokerth_download_libs.cmd C:\pokerth_root"
|
||||||
|
|
||||||
|
This could take several hours. If you need to interrupt the script, you can do so
|
||||||
|
by pressing Ctrl+c. After interrupting, you may
|
||||||
|
- start from the scratch (delete everything within the base directory)
|
||||||
|
- if you know what happened when you interrupted the script, you might delete
|
||||||
|
the folder from the current step which was running (e.g. the "boost"-folder
|
||||||
|
or whichever) and restart the script.
|
||||||
|
Please keep the command line open for step 6.
|
||||||
|
|
||||||
|
5. You may delete the directory "pkth_boost_delete_me_after_build" within the base
|
||||||
|
directory, but you should keep all other directories for step 6.
|
||||||
|
|
||||||
|
6. If the script was successful, you can finally build PokerTH. This takes only a few minutes.
|
||||||
|
Run the script which updates and builds the current PokerTH svn version.
|
||||||
|
Example: "pokerth_build.cmd C:\pokerth_root"
|
||||||
|
You will find the executable file in C:\pokerth_root\pokerth.
|
||||||
|
|
||||||
|
7. At a later time, if you wish to update your development version of PokerTH, you only
|
||||||
|
need to repeat step 6.
|
||||||
|
|
||||||
|
|
||||||
|
Known issue: By default, there is no .jpg/.gif avatar support in the svn build.
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
|
* Copyright (C) 2008 by Lothar May *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the *
|
||||||
|
* Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
***************************************************************************/
|
||||||
Reference in New Issue
Block a user