my old build scripts (handy test for checking into sf, too:)

This commit is contained in:
Bill Currie 2007-03-07 14:28:51 +00:00 committed by Jeff Teunissen
parent b4ff94abdc
commit 48ba407984
5 changed files with 269 additions and 0 deletions

65
tools/build_scripts/qf-build Executable file
View file

@ -0,0 +1,65 @@
#!/bin/bash
. ~/.bash_profile
set -e
PATH=/usr/local/bin:$PATH
cd ~/src/quakeforge
cvs up
./bootstrap
#begin linux
cd linux.o
rm -f quakeforge-*.tar.gz
../configure -C --without-clients --with-servers=master
make install
#begin rpm
cd RPM
make rpm
cd ..
#end rpm
#begin deb
DIR=`basename quakeforge-*.tar.gz .tar.gz`
cd debian
rm -rf $DIR
tar zxvf ../${DIR}.tar.gz
cd $DIR
dpkg-buildpackage -rfakeroot -us -uc
rm -rf $DIR
cd ../..
#end deb
cd ..
#end linux
#begin win32
cd qf-win32.o
qf_win32=`pwd`/qf-win32
rm -rf qf-win32 qf-win32*.zip
./cross-configure.sh -C --with-sdl-prefix=/usr/local/cross-tools/i386-mingw32msvc --disable-debug --disable-shared --program-prefix= --disable-debug
../tools/cross/cross-make.sh prefix=${qf_win32} exec_prefix=${qf_win32} pkgdatadir=${qf_win32} PAK=pak QFCC=qfcc GENDEFS='$(top_srcdir)/linux.o/tools/qfdefs/source/gendefs' install
/usr/local/cross-tools/bin/i386-mingw32msvc-strip --strip-unneeded qf-win32/bin/*.exe
python ~/bin/qf-win32.py
for p in {client-{sdl,sdl32,sgl,wgl},devel,server,tools}; do
cp qf-win32-$p.zip /project/website/htdocs/files/qf-win32-$p.zip-
mv /project/website/htdocs/files/qf-win32-$p.zip- /project/website/htdocs/files/qf-win32-$p.zip
done
touch /project/website/htdocs/files/qf-win32-*.zip
#zip -r9 qf-win32.zip qf-win32
#cp qf-win32.zip /project/website/htdocs/files/qf-win32.zip-
#mv /project/website/htdocs/files/qf-win32.zip- /project/website/htdocs/files/qf-win32.zip
cd ..
#end win32
cd ~/src/game-source
cvs up
for f in `find . -name 'Makefile'`; do make -C `dirname $f` clean all; done
cd ..
zip -r9 game-source.zip game-source
tar zcf game-source.tar.gz game-source
tar jcf game-source.tar.bz2 game-source
if cmp game-source.zip /project/website/htdocs/files/game-source.zip; then
echo no change
else
cp game-source.* /project/website/htdocs/files/
fi
#cd ~/src/quakeforge/linux.o/doc
#make doc

View file

@ -0,0 +1,2 @@
#! /bin/sh
nice -15 ~/bin/qf-build 2>&1 1> /dev/null | grep -v 'has not been installed in' | grep -v 'could not find path for' | grep -v 'undefined symbols not allowed in' | grep -v 'install: warning: remember to run'

91
tools/build_scripts/qf-release Executable file
View file

@ -0,0 +1,91 @@
#! /bin/bash
. ~/.bash_profile
set -e
PATH=/usr/local/bin:$PATH
if test $# -lt 1; then
echo 'Usage: qf-reelase <version> [targets]'
exit 1;
fi
ver="$1"
tag=release_`echo $ver | tr . _`
shift
if test $# -ne 0; then
while test $# -ne 0; do
case $1 in
rpm)
do_rpm=1
;;
deb)
do_deb=1
;;
win32)
do_win32=1
;;
*)
echo 'Unknown target'
exit 1
;;
esac
shift
done
else
do_rpm=1
do_deb=1
do_win32=1
fi
mkdir -p ~/release
cd ~/release
rm -rf NEWS quakeforge-* quakeforge_* qfcc_*
cvs -d :pserver:anonymous@cvs.quakeforge.net:/project/cvs co -d "quakeforge-$ver" -r "$tag" quakeforge
cd quakeforge-$ver
cp NEWS ~/release
mkdir linux.o qf-win32.o
sed -e 's@\./config@../config@' tools/cross/cross-configure.sh > qf-win32.o/cross-configure.sh
chmod +x qf-win32.o/cross-configure.sh
./bootstrap
#begin linux
cd linux.o
../configure -C --without-clients --with-servers=master
make changelog
make dist-all-local
if test $do_rpm -eq 1; then
cd RPM
make rpm
mv *.rpm ~/release
cd ..
fi
if test $do_deb -eq 1; then
DIR=`basename quakeforge-*.tar.gz .tar.gz`
cd debian
rm -rf $DIR
tar zxvf ../${DIR}.tar.gz
cd $DIR
QFSMP=-j3 dpkg-buildpackage -rfakeroot -us -uc
rm -rf $DIR
cd ..
mv q*.[a-z]* ~/release
cd ..
fi
#make dist-all-local
mv *.tar.gz *.tar.bz2 *.zip ~/release
cd ..
# end linux
if test $do_win32 -eq 1; then
cd qf-win32.o
qf_win32="quakeforge-$ver-win32"
qf_win32_dir=`pwd`"/$qf_win32"
rm -rf $qf_win32_dir *.zip
./cross-configure.sh -C --with-sdl-prefix=/usr/local/cross-tools/i386-mingw32msvc --disable-debug --disable-shared --program-prefix= --disable-debug
../tools/cross/cross-make.sh -j3 prefix=${qf_win32_dir} exec_prefix=${qf_win32_dir} pkgdatadir=${qf_win32_dir} PAK=pak QFCC=qfcc GENDEFS='$(top_srcdir)/linux.o/tools/qfdefs/source/gendefs' install
/usr/local/cross-tools/bin/i386-mingw32msvc-strip --strip-unneeded "$qf_win32"/bin/*.exe
qf-win32.py "$ver-win32" quakeforge "$qf_win32"
mv *.zip ~/release
cd ..
fi

14
tools/build_scripts/qf-snapshot Executable file
View file

@ -0,0 +1,14 @@
#! /bin/bash
cd ~/snapshot/quakeforge
cvs up > /dev/null
./bootstrap
touch include/config.h.in
cd ..
tar jchf /project/website/htdocs/files/quakeforge-current.tar.bz2- quakeforge
tar zchf /project/website/htdocs/files/quakeforge-current.tar.gz- quakeforge
zip -qr9 /project/website/htdocs/files/quakeforge-current.zip- quakeforge
cd /project/website/htdocs/files
mv quakeforge-current.tar.bz2- quakeforge-current.tar.bz2
mv quakeforge-current.tar.gz- quakeforge-current.tar.gz
mv quakeforge-current.zip- quakeforge-current.zip

97
tools/build_scripts/qf-win32.py Executable file
View file

@ -0,0 +1,97 @@
#! /usr/bin/env python
from os import system
import sys
version = ""
prefix = "qf-win32"
dir = prefix
if len (sys.argv) >= 2:
version = "-" + sys.argv[1]
if len (sys.argv) >= 3:
prefix = sys.argv[2]
if len (sys.argv) >= 4:
dir = sys.argv[3]
if dir and dir[-1] != '/':
dir += '/'
server = [
dir,
dir + "bin",
dir + "bin/hw-master.exe",
dir + "bin/nq-server.exe",
dir + "bin/qw-master.exe",
dir + "bin/qw-server.exe",
]
client_wgl = [
dir,
dir + "bin",
dir + "bin/nq-wgl.exe",
dir + "bin/qw-client-wgl.exe",
dir + "menu.dat.gz",
]
client_sgl = [
dir,
dir + "bin",
dir + "bin/nq-sgl.exe",
dir + "bin/qw-client-sgl.exe",
dir + "menu.dat.gz",
]
client_sdl = [
dir,
dir + "bin",
dir + "bin/nq-sdl.exe",
dir + "bin/qw-client-sdl.exe",
dir + "menu.dat.gz",
]
client_sdl32 = [
dir,
dir + "bin",
dir + "bin/nq-sdl32.exe",
dir + "bin/qw-client-sdl32.exe",
dir + "menu.dat.gz",
]
tools = [
dir,
dir + "bin",
dir + "bin/bsp2img.exe",
dir + "bin/pak.exe",
dir + "bin/qfbsp.exe",
dir + "bin/qfcc.exe",
dir + "bin/qflight.exe",
dir + "bin/qfmodelgen.exe",
dir + "bin/qfprogs.exe",
dir + "bin/qfvis.exe",
dir + "bin/qfwavinfo.exe",
dir + "bin/wad.exe",
dir + "bin/zpak",
]
devel = [
dir + "include",
dir + "lib",
]
print "zip -9 " + prefix + "-server" + version + ".zip " + " ".join (server)
system ("zip -9 " + prefix + "-server" + version + ".zip " + " ".join (server))
print "zip -9 " + prefix + "-client-wgl" + version + ".zip " + " ".join (client_wgl)
system ("zip -9 " + prefix + "-client-wgl" + version + ".zip " + " ".join (client_wgl))
print "zip -9 " + prefix + "-client-sgl" + version + ".zip " + " ".join (client_sgl)
system ("zip -9 " + prefix + "-client-sgl" + version + ".zip " + " ".join (client_sgl))
print "zip -9 " + prefix + "-client-sdl" + version + ".zip " + " ".join (client_sdl)
system ("zip -9 " + prefix + "-client-sdl" + version + ".zip " + " ".join (client_sdl))
print "zip -9 " + prefix + "-client-sdl32" + version + ".zip " + " ".join (client_sdl32)
system ("zip -9 " + prefix + "-client-sdl32" + version + ".zip " + " ".join (client_sdl32))
print "zip -9 " + prefix + "-tools" + version + ".zip " + " ".join (tools)
system ("zip -9 " + prefix + "-tools" + version + ".zip " + " ".join (tools))
if dir:
print "zip -9 " + prefix + "-devel" + version + ".zip " + dir
system ("zip -9 " + prefix + "-devel" + version + ".zip " + dir)
print "zip -r9 " + prefix + "-devel" + version + ".zip " + " ".join (devel)
system ("zip -r9 " + prefix + "-devel" + version + ".zip " + " ".join (devel))