From f1dd1eb75172daa9d4400d4bb7fb84252e98fff9 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 22 Jan 2011 04:51:24 +0000 Subject: [PATCH] updates to scripts in preparation for new beta and release --- mk/linux/makedata-diff.sh | 7 +- mk/linux/makedata.sh | 3 +- mk/linux/makerelease.sh | 6 +- mk/linux/mg-version.sh | 10 +++ mk/linux/mk/autoconf/check_lua.m4 | 117 ---------------------------- mk/linux/mk/autoconf/ogg.m4 | 104 ------------------------- mk/linux/mk/autoconf/vorbis.m4 | 125 ------------------------------ mk/linux/setupBuildDeps.sh | 17 ++-- 8 files changed, 21 insertions(+), 368 deletions(-) create mode 100755 mk/linux/mg-version.sh delete mode 100644 mk/linux/mk/autoconf/check_lua.m4 delete mode 100644 mk/linux/mk/autoconf/ogg.m4 delete mode 100644 mk/linux/mk/autoconf/vorbis.m4 diff --git a/mk/linux/makedata-diff.sh b/mk/linux/makedata-diff.sh index 2374c470..095372c3 100755 --- a/mk/linux/makedata-diff.sh +++ b/mk/linux/makedata-diff.sh @@ -2,16 +2,13 @@ # This script compares two mega-glest data content folders for file differences, # then creates an archive of ONLY the differences (including files ONLY in new version) - -# Below is the old version to compare with. The new version is pulled from -# configure.ac -OLD_VERSION=3.3.7.2 +OLD_VERSION=`./mg-version.sh --oldversion` cd release CURDIR="`pwd`" cd .. -VERSION=`autoconf -t AC_INIT | sed -e 's/[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/g'` +VERSION=`./mg-version.sh --version` RELEASENAME=megaglest-data-updates-$VERSION cd $CURDIR diff --git a/mk/linux/makedata.sh b/mk/linux/makedata.sh index efd8f0c9..13bb2e19 100755 --- a/mk/linux/makedata.sh +++ b/mk/linux/makedata.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=`autoconf -t AC_INIT | sed -e 's/[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/g'` +VERSION=`./mg-version.sh --version` RELEASENAME=megaglest-data RELEASEDIR="`pwd`/release/$RELEASENAME-$VERSION" @@ -20,7 +20,6 @@ find data/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prun find docs/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' find maps/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' find scenarios/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' -#find screens/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' find techs/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' find tilesets/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' find tutorials/ \( -name "*" \) -not \( -name .svn -prune \) -not \( -name "*~" -prune \) -not \( -name "*.bak" -prune \) -exec cp -p --parents "{}" $RELEASEDIR ';' diff --git a/mk/linux/makerelease.sh b/mk/linux/makerelease.sh index 75937d83..3b4d44eb 100755 --- a/mk/linux/makerelease.sh +++ b/mk/linux/makerelease.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=`autoconf -t AC_INIT | sed -e 's/[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/g'` +VERSION=`./mg-version.sh --version` RELEASENAME=megaglest-source RELEASEDIR="`pwd`/release/$RELEASENAME-$VERSION" @@ -17,9 +17,9 @@ find g3d_viewer/ \( -name "*.cpp" -o -name "*.h" \) -exec cp -p --parents "{}" $ find configurator/ \( -name "*.cpp" -o -name "*.h" \) -exec cp -p --parents "{}" $RELEASEDIR ';' find masterserver/ \( -name "*.php" -o -name "*.sql" \) -exec cp -p --parents "{}" $RELEASEDIR ';' popd -AUTOCONFSTUFF="configure.ac autogen.sh Jamrules Jamfile `find mk/jam -name "*.jam"` `find mk/autoconf -name "*.m4" -o -name "config.*" -o -name "*sh"`" +#AUTOCONFSTUFF="configure.ac autogen.sh Jamrules Jamfile `find mk/jam -name "*.jam"` `find mk/autoconf -name "*.m4" -o -name "config.*" -o -name "*sh"`" -cp -p --parents $AUTOCONFSTUFF $RELEASEDIR +#cp -p --parents $AUTOCONFSTUFF $RELEASEDIR cp -p ../../docs/readme*.txt ../../docs/*license*.txt $RELEASEDIR cp -p glest.ini $RELEASEDIR cp -p glestkeys.ini $RELEASEDIR diff --git a/mk/linux/mg-version.sh b/mk/linux/mg-version.sh new file mode 100755 index 00000000..07edbf36 --- /dev/null +++ b/mk/linux/mg-version.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +OLD_MG_VERSION=3.3.7.2 +MG_VERSION=3.4.0 + +if [ "$1" = "--oldversion" ]; then + echo "$OLD_MG_VERSION" +elif [ "$1" = "--version" ]; then + echo "$MG_VERSION" +fi diff --git a/mk/linux/mk/autoconf/check_lua.m4 b/mk/linux/mk/autoconf/check_lua.m4 deleted file mode 100644 index 378e91e9..00000000 --- a/mk/linux/mk/autoconf/check_lua.m4 +++ /dev/null @@ -1,117 +0,0 @@ -# derived from lua.m4 in mod_wombat from httpd.apache.org -# http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/build/ac-macros/lua.m4?view=markup -# which is under Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0 -# -# Apache mod_wombat -# Copyright 2006 The Apache Software Foundation -# -# This product includes software developed at -# The Apache Software Foundation (http://www.apache.org/). -# -# This software makes use of Lua ( http://www.lua.org/ ) -# developed by Copyright 1994-2006 Lua.org, PUC-Rio. -# Lua is distributed under the MIT license -# ( http://www.lua.org/license.html ). -# -# ========================================== -# Check for Lua 5.1 Libraries -# CHECK_LUA(ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) -# Sets: -# LUA_AVAILABLE -# LUA_CFLAGS -# LUA_LIBS -AC_DEFUN([CHECK_LUA], -[ - -AC_ARG_WITH( - lua, - [AC_HELP_STRING([--with-lua=PFX],[Prefix where Lua 5.1 is installed (optional)])], - lua_pfx="$withval", - :) - -# Determine lua lib directory -if test -z "${lua_pfx}"; then - paths="/usr/local /usr" -else - paths="${lua_pfx}" -fi - -[LUA_AVAILABLE=no - LUA_LIBS="" - LUA_CFLAGS=""] - -AC_CHECK_LIB([m], [pow], lib_m=" -lm") -AC_LANG_PUSH([C++]) -for p in $paths ; do - AC_MSG_CHECKING([for lua.hpp in ${p}/include/lua5.1]) - if test -f ${p}/include/lua5.1/lua.hpp; then - AC_MSG_RESULT([yes]) - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS" - LDFLAGS="-L${p}/lib $LDFLAGS $lib_m" - AC_CHECK_LIB(lua5.1, luaL_newstate, - [ - LUA_AVAILABLE=yes - LUA_LIBS="-L${p}/lib -llua5.1" - LUA_CFLAGS="-I${p}/include/lua5.1" - ]) - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS - break - else - AC_MSG_RESULT([no]) - fi -# another test for finding lua on FreeBSD - AC_MSG_CHECKING([for lua.hpp in ${p}/include/lua51]) - if test -f ${p}/include/lua51/lua.hpp; then - AC_MSG_RESULT([yes]) - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS" - LDFLAGS="-L${p}/lib/lua51 $LDFLAGS $lib_m" - AC_CHECK_LIB(lua, luaL_newstate, - [ - LUA_AVAILABLE=yes - LUA_LIBS="-L${p}/lib/lua51 -llua" - LUA_CFLAGS="-I${p}/include/lua51" - ]) - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS - break - else - AC_MSG_RESULT([no]) - fi - AC_MSG_CHECKING([for lua.hpp in ${p}/include]) - if test -f ${p}/include/lua.hpp; then - AC_MSG_RESULT([yes]) - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS" - LDFLAGS="-L${p}/lib $LDFLAGS $lib_m" - AC_CHECK_LIB(lua, luaL_newstate, - [ - LUA_AVAILABLE=yes - LUA_LIBS="-L${p}/lib -llua" - LUA_CFLAGS="-I${p}/include" - ]) - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS - break - else - AC_MSG_RESULT([no]) - fi -done -AC_LANG_POP([C++]) - -AC_SUBST(LUA_AVAILABLE) -AC_SUBST(LUA_LIBS) -AC_SUBST(LUA_CFLAGS) - -if test -z "${LUA_LIBS}"; then - ifelse([$2], , :, [$2]) -else - ifelse([$1], , :, [$1]) -fi - -]) diff --git a/mk/linux/mk/autoconf/ogg.m4 b/mk/linux/mk/autoconf/ogg.m4 deleted file mode 100644 index ed1f66cb..00000000 --- a/mk/linux/mk/autoconf/ogg.m4 +++ /dev/null @@ -1,104 +0,0 @@ -# Configure paths for libogg -# Jack Moffitt 10-21-2000 -# Shamelessly stolen from Owen Taylor and Manish Singh - -dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS -dnl -AC_DEFUN([XIPH_PATH_OGG], -[dnl -dnl Get the cflags and libraries -dnl -AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="") -AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR - Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="") -AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="") -AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes) - - if test "x$ogg_libraries" != "x" ; then - OGG_LIBS="-L$ogg_libraries" - elif test "x$ogg_prefix" != "x" ; then - OGG_LIBS="-L$ogg_prefix/lib" - elif test "x$prefix" != "xNONE" ; then - OGG_LIBS="-L$prefix/lib" - fi - - OGG_LIBS="$OGG_LIBS -logg" - - if test "x$ogg_includes" != "x" ; then - OGG_CFLAGS="-I$ogg_includes" - elif test "x$ogg_prefix" != "x" ; then - OGG_CFLAGS="-I$ogg_prefix/include" - elif test "x$prefix" != "xNONE"; then - OGG_CFLAGS="-I$prefix/include" - fi - - AC_MSG_CHECKING(for Ogg) - no_ogg="" - - - if test "x$enable_oggtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $OGG_CFLAGS" - CPPFLAGS="$CFLAGS $OGG_CFLAGS" - LIBS="$LIBS $OGG_LIBS" -dnl -dnl Now check if the installed Ogg is sufficiently new. -dnl - rm -f conf.oggtest - AC_TRY_RUN([ -#include -#include -#include -#include - -int main () -{ - system("touch conf.oggtest"); - return 0; -} - -],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - - if test "x$no_ogg" = "x" ; then - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - AC_MSG_RESULT(no) - if test -f conf.oggtest ; then - : - else - echo "*** Could not run Ogg test program, checking why..." - CFLAGS="$CFLAGS $OGG_CFLAGS" - LIBS="$LIBS $OGG_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding Ogg or finding the wrong" - echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means Ogg was incorrectly installed" - echo "*** or that you have moved Ogg since it was installed." ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - OGG_CFLAGS="" - OGG_LIBS="" - ifelse([$2], , :, [$2]) - fi - AC_SUBST(OGG_CFLAGS) - AC_SUBST(OGG_LIBS) - rm -f conf.oggtest -]) diff --git a/mk/linux/mk/autoconf/vorbis.m4 b/mk/linux/mk/autoconf/vorbis.m4 deleted file mode 100644 index 2ea6f27e..00000000 --- a/mk/linux/mk/autoconf/vorbis.m4 +++ /dev/null @@ -1,125 +0,0 @@ -# Configure paths for libvorbis -# Jack Moffitt 10-21-2000 -# Shamelessly stolen from Owen Taylor and Manish Singh -# thomasvs added check for vorbis_bitrate_addblock which is new in rc3 - -dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS -dnl -AC_DEFUN([XIPH_PATH_VORBIS], -[dnl -dnl Get the cflags and libraries -dnl -AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="") -AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR - Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="") -AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR - Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="") -AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes) - - if test "x$vorbis_libraries" != "x" ; then - VORBIS_LIBS="-L$vorbis_libraries" - elif test "x$vorbis_prefix" != "x" ; then - VORBIS_LIBS="-L$vorbis_prefix/lib" - elif test "x$prefix" != "xNONE"; then - VORBIS_LIBS="-L$prefix/lib" - fi - - VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm" - VORBISFILE_LIBS="-lvorbisfile" - VORBISENC_LIBS="-lvorbisenc" - - if test "x$vorbis_includes" != "x" ; then - VORBIS_CFLAGS="-I$vorbis_includes" - elif test "x$vorbis_prefix" != "x" ; then - VORBIS_CFLAGS="-I$vorbis_prefix/include" - elif test "x$prefix" != "xNONE"; then - VORBIS_CFLAGS="-I$prefix/include" - fi - - - AC_MSG_CHECKING(for Vorbis) - no_vorbis="" - - - if test "x$enable_vorbistest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS" - CPPFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS" - LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS" -dnl -dnl Now check if the installed Vorbis is sufficiently new. -dnl - rm -f conf.vorbistest - AC_TRY_RUN([ -#include -#include -#include -#include -#include - -int main () -{ - vorbis_block vb; - vorbis_dsp_state vd; - vorbis_info vi; - - vorbis_info_init (&vi); - vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1); - vorbis_analysis_init (&vd, &vi); - vorbis_block_init (&vd, &vb); - /* this function was added in 1.0rc3, so this is what we're testing for */ - vorbis_bitrate_addblock (&vb); - - system("touch conf.vorbistest"); - return 0; -} - -],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - - if test "x$no_vorbis" = "x" ; then - AC_MSG_RESULT(yes) - ifelse([$1], , :, [$1]) - else - AC_MSG_RESULT(no) - if test -f conf.vorbistest ; then - : - else - echo "*** Could not run Vorbis test program, checking why..." - CFLAGS="$CFLAGS $VORBIS_CFLAGS" - LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding Vorbis or finding the wrong" - echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means Vorbis was incorrectly installed" - echo "*** or that you have moved Vorbis since it was installed." ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - VORBIS_CFLAGS="" - VORBIS_LIBS="" - VORBISFILE_LIBS="" - VORBISENC_LIBS="" - ifelse([$2], , :, [$2]) - fi - AC_SUBST(VORBIS_CFLAGS) - AC_SUBST(VORBIS_LIBS) - AC_SUBST(VORBISFILE_LIBS) - AC_SUBST(VORBISENC_LIBS) - rm -f conf.vorbistest -]) diff --git a/mk/linux/setupBuildDeps.sh b/mk/linux/setupBuildDeps.sh index a3857012..1267c770 100755 --- a/mk/linux/setupBuildDeps.sh +++ b/mk/linux/setupBuildDeps.sh @@ -5,11 +5,11 @@ OSTYPE=`uname -m` if [ -f /etc/fedora-release ]; then sudo yum groupinstall "Development Tools" - sudo yum install subversion automake autoconf autogen jam + sudo yum install subversion automake autoconf autogen cmake elif [ -f /etc/SuSE-release ]; then - sudo zypper install subversion gcc gcc-c++ automake + sudo zypper install subversion gcc gcc-c++ automake cmake else - sudo apt-get install build-essential subversion automake autoconf autogen jam + sudo apt-get install build-essential subversion automake autoconf autogen cmake fi if [ -f /etc/SuSE-release ]; then @@ -23,16 +23,9 @@ elif [ "`uname -r`" = $ubuntu804_32 ]; then sudo apt-get install libsdl1.2-dev libxerces28-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev elif [ "$OSTYPE" = "x86_64" ]; then echo "=====> Using build deps for debian based 64 bit linux..." - sudo apt-get install libsdl1.2-dev libxerces-c2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libircclient-dev cmake-curses-gui libgtk2.0-dev + sudo apt-get install libsdl1.2-dev libxerces-c2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev cmake-curses-gui libgtk2.0-dev else echo "=====> Using build deps for debian based 32 bit Linux..." - sudo apt-get install libsdl1.2-dev libxerces-c2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev libircclient-dev + sudo apt-get install libsdl1.2-dev libxerces-c2-dev libalut-dev libgl1-mesa-dev libglu1-mesa-dev libvorbis-dev libwxbase2.8-dev libwxgtk2.8-dev libx11-dev liblua5.1-0-dev libjpeg-dev libpng12-dev libcurl4-gnutls-dev fi -if [ -f /etc/SuSE-release ]; then - sudo zypper install cmake -elif [ -f /etc/fedora-release ]; then - sudo yum install cmake -else - sudo apt-get install cmake -fi