Skip to content
Snippets Groups Projects
Commit 585db4dc authored by Oliver Bock's avatar Oliver Bock
Browse files

Yet another build script update

* Changed Freetype retrieval from cvs to simple tarball download (much faster, no point in using static repo)
* SDL should also be changed to tarball download but 1.2.13 has appearently a bug in its "config-sdl" script (fails to list required libraries!). Let's wait for 1.2.14...
* OGLFT and BOINC are still fetched from their respective repos as there're no proper releases available anyway
* Also: added and implemented "--distclean" target
parent 79c39321
No related branches found
No related tags found
No related merge requests found
...@@ -50,8 +50,6 @@ prepare_generic() ...@@ -50,8 +50,6 @@ prepare_generic()
cd $ROOT cd $ROOT
echo "Preparing source tree..." | tee -a $ROOT/setup.log echo "Preparing source tree..." | tee -a $ROOT/setup.log
mkdir -p 3rdparty/sdl >> $ROOT/setup.log
mkdir -p 3rdparty/freetype2 >> $ROOT/setup.log
mkdir -p 3rdparty/oglft >> $ROOT/setup.log mkdir -p 3rdparty/oglft >> $ROOT/setup.log
mkdir -p 3rdparty/boinc >> $ROOT/setup.log mkdir -p 3rdparty/boinc >> $ROOT/setup.log
...@@ -71,6 +69,7 @@ prepare_generic() ...@@ -71,6 +69,7 @@ prepare_generic()
# prepare additional sources # prepare additional sources
mkdir -p 3rdparty/sdl >> $ROOT/setup.log
cd $ROOT/3rdparty/sdl cd $ROOT/3rdparty/sdl
if [ -d .svn ]; then if [ -d .svn ]; then
echo "Updating SDL..." | tee -a $ROOT/setup.log echo "Updating SDL..." | tee -a $ROOT/setup.log
...@@ -80,15 +79,19 @@ prepare_generic() ...@@ -80,15 +79,19 @@ prepare_generic()
svn checkout http://svn.libsdl.org/branches/SDL-1.2 . >> $ROOT/setup.log svn checkout http://svn.libsdl.org/branches/SDL-1.2 . >> $ROOT/setup.log
fi fi
cd $ROOT/3rdparty/freetype2 # cd $ROOT/3rdparty
if [ -d CVS ]; then # echo "Retrieving SDL (this may take a while)..." | tee -a $ROOT/setup.log
echo "Updating Freetype2..." | tee -a $ROOT/setup.log # wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz >> $ROOT/setup.log 2>&1
cvs update -C >> $ROOT/setup.log 2>&1 # tar -xzf SDL-1.2.14.tar.gz >> $ROOT/setup.log
else # rm SDL-1.2.14.tar.gz >> $ROOT/setup.log
cd .. # mv SDL-1.2.14 sdl >> $ROOT/setup.log
cd $ROOT/3rdparty
echo "Retrieving Freetype2 (this may take a while)..." | tee -a $ROOT/setup.log echo "Retrieving Freetype2 (this may take a while)..." | tee -a $ROOT/setup.log
cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/freetype checkout -r VER-2-3-5-REAL freetype2 >> $ROOT/setup.log 2>&1 wget http://mesh.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.5.tar.bz2 >> $ROOT/setup.log 2>&1
fi tar -xjf freetype-2.3.5.tar.bz2 >> $ROOT/setup.log
rm freetype-2.3.5.tar.bz2 >> $ROOT/setup.log
mv freetype-2.3.5 freetype2 >> $ROOT/setup.log
cd $ROOT/3rdparty/oglft cd $ROOT/3rdparty/oglft
if [ -d .svn ]; then if [ -d .svn ]; then
...@@ -163,9 +166,10 @@ build_generic() ...@@ -163,9 +166,10 @@ build_generic()
echo "Successfully built and installed Freetype2!" | tee -a $ROOT/setup.log echo "Successfully built and installed Freetype2!" | tee -a $ROOT/setup.log
cd $ROOT/3rdparty/oglft/liboglft cd $ROOT/3rdparty/oglft/liboglft
echo "Building OGLFT (this may take a while)..." | tee -a $ROOT/setup.log echo "Building OGLFT..." | tee -a $ROOT/setup.log
# note: svn has no force/overwrite switch. the file might not be updated when patched # note: svn has no force/overwrite switch. the file might not be updated when patched
patch CMakeLists.txt < $ROOT/patches/CMakeLists.txt.liboglft.patch >> $ROOT/setup.log patch CMakeLists.txt < $ROOT/patches/CMakeLists.txt.liboglft.patch >> $ROOT/setup.log
# TODO: patch CMakeLists.txt in case FindFreetype.cmake is not available!
cd $ROOT/build/oglft cd $ROOT/build/oglft
cmake $ROOT/3rdparty/oglft >> $ROOT/setup.log cmake $ROOT/3rdparty/oglft >> $ROOT/setup.log
make >> $ROOT/setup.log make >> $ROOT/setup.log
...@@ -197,7 +201,7 @@ build_mingw() ...@@ -197,7 +201,7 @@ build_mingw()
build_starsphere() build_starsphere()
{ {
echo "Building Starsphere [ORC] (this may take a while)..." | tee -a $ROOT/setup.log echo "Building Starsphere [ORC]..." | tee -a $ROOT/setup.log
export ORC_SRC=$ROOT/src/orc export ORC_SRC=$ROOT/src/orc
export ORC_INSTALL=$ROOT/install export ORC_INSTALL=$ROOT/install
cd $ROOT/build/orc cd $ROOT/build/orc
...@@ -206,7 +210,7 @@ build_starsphere() ...@@ -206,7 +210,7 @@ build_starsphere()
make install >> $ROOT/setup.log make install >> $ROOT/setup.log
echo "Successfully built and installed Starsphere [ORC]!" | tee -a $ROOT/setup.log echo "Successfully built and installed Starsphere [ORC]!" | tee -a $ROOT/setup.log
echo "Building Starsphere [Framework] (this may take a while)..." | tee -a $ROOT/setup.log echo "Building Starsphere [Framework]..." | tee -a $ROOT/setup.log
export FRAMEWORK_SRC=$ROOT/src/framework export FRAMEWORK_SRC=$ROOT/src/framework
export FRAMEWORK_INSTALL=$ROOT/install export FRAMEWORK_INSTALL=$ROOT/install
cd $ROOT/build/framework cd $ROOT/build/framework
...@@ -215,7 +219,7 @@ build_starsphere() ...@@ -215,7 +219,7 @@ build_starsphere()
make install >> $ROOT/setup.log make install >> $ROOT/setup.log
echo "Successfully built and installed Starsphere [Framework]!" | tee -a $ROOT/setup.log echo "Successfully built and installed Starsphere [Framework]!" | tee -a $ROOT/setup.log
echo "Building Starsphere [Application] (this may take a while)..." | tee -a $ROOT/setup.log echo "Building Starsphere [Application]..." | tee -a $ROOT/setup.log
export STARSPHERE_SRC=$ROOT/src/starsphere export STARSPHERE_SRC=$ROOT/src/starsphere
export STARSPHERE_INSTALL=$ROOT/install export STARSPHERE_INSTALL=$ROOT/install
cd $ROOT/build/starsphere cd $ROOT/build/starsphere
...@@ -261,6 +265,18 @@ build_win32() ...@@ -261,6 +265,18 @@ build_win32()
} }
distclean()
{
cd $ROOT
rm -rf 3rdparty
rm -rf build
rm -rf install
rm -f .lastbuild
}
check_last_build() check_last_build()
{ {
LASTBUILD=`cat .lastbuild 2>/dev/null` LASTBUILD=`cat .lastbuild 2>/dev/null`
...@@ -333,6 +349,10 @@ case "$1" in ...@@ -333,6 +349,10 @@ case "$1" in
check_last_build "$1" check_last_build "$1"
echo "Building win32 version:" | tee -a $ROOT/setup.log echo "Building win32 version:" | tee -a $ROOT/setup.log
;; ;;
"--distclean")
distclean
exit 0
;;
*) *)
print_usage print_usage
exit 1 exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment