+ echo "$report" | ssh nexuiz@rm.endoftheinternet.org cat '>>' public_html/xonotic-merge-notes.txt
+ ;;
+ clean)
+ force=false
+ gotoupstream=false
+ fetchupstream=false
+ gotomaster=false
+ rmuntracked=false
+ killbranches=false
+ # usage:
+ # ./all clean [-m] [-f | -fu | -fU] [-r] [-D]
+ # ./all clean --reclone
+ found=false
+ while :; do
+ if [ x"$1" = x"--reclone" ]; then
+ force=true
+ fetchupstream=true
+ gotoupstream=true
+ gotomaster=true
+ rmuntracked=true
+ killbranches=true
+ elif [ x"$1" = x"-f" ]; then
+ force=true
+ elif [ x"$1" = x"-u" ]; then
+ gotoupstream=true
+ elif [ x"$1" = x"-U" ]; then
+ gotoupstream=true
+ fetchupstream=true
+ elif [ x"$1" = x"-fu" ]; then
+ force=true
+ gotoupstream=true
+ elif [ x"$1" = x"-Fu" ]; then
+ force=true
+ gotoupstream=true
+ fetchupstream=true
+ elif [ x"$1" = x"-m" ]; then
+ gotomaster=true
+ elif [ x"$1" = x"-r" ]; then
+ rmuntracked=true
+ elif [ x"$1" = x"-D" ]; then
+ killbranches=true
+ else
+ break
+ fi
+ found=true
+ shift
+ done
+ if ! $found; then
+ rmuntracked=true
+ fi
+ for d in $repos; do
+ verbose cd "$d0/$d"
+ if $gotoupstream; then
+ if ! $force; then
+ msg "Must also use -f (delete local changes) when using -u"
+ exit 1
+ fi
+ if $gotomaster; then
+ if $fetchupstream; then
+ verbose git fetch origin
+ fi
+ verbose git checkout -f "`repobranch "$d"`"
+ verbose git reset --hard origin/"`repobranch "$d"`"
+ else
+ r=`git symbolic-ref HEAD`
+ r=${r#refs/heads/}
+ rem=`git config "branch.$r.remote" || echo origin`
+ bra=`git config "branch.$r.merge" || echo "$r"`
+ upstream="$rem/${bra#refs/heads/}"
+ if $fetchupstream; then
+ verbose git fetch "$rem"
+ fi
+ if ! git rev-parse "$upstream" >/dev/null 2>&1; then
+ upstream="origin/`repobranch "$d"`"
+ fi
+ verbose git reset --hard "$upstream"
+ fi
+ elif $gotomaster; then
+ if $force; then
+ verbose git checkout -f "`repobranch "$d"`"
+ else
+ verbose git checkout "`repobranch "$d"`"
+ fi
+ elif $force; then
+ verbose git reset --hard
+ fi
+ if $rmuntracked; then
+ case "$d" in
+ .)
+ verbose git clean -df
+ ;;
+ *)
+ verbose git clean -xdf
+ ;;
+ esac
+ fi
+ if $killbranches; then
+ git for-each-ref --format='%(refname)' refs/heads/ | while IFS= read -r B; do
+ if [ x"$B" != x"`git symbolic-ref HEAD`" ]; then
+ verbose git branch -D "${B#refs/heads/}"
+ fi
+ done
+ fi
+ done
+ ;;
+
+ # release building goes here
+ release-prepare)
+ #"$SELF" each git clean -fxd
+ case "$RELEASETYPE" in
+ beta)
+ msg "Building a BETA"
+ ;;
+ release)
+ msg "Building a RELEASE"
+ ;;
+ *)
+ msg "Must either set RELEASETYPE=beta or RELEASETYPE=release"
+ exit 1
+ ;;
+ esac
+ verbose rm -rf Xonotic Xonotic*.zip
+ verbose mkdir -p Xonotic
+ if [ -n "$RELEASEDATE" ]; then
+ verbose echo "$RELEASEDATE" > Xonotic/stamp.txt
+ else
+ verbose date +%Y%m%d > Xonotic/stamp.txt
+ fi
+ verbose git archive --format=tar HEAD -- Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh misc/buildfiles | {
+ verbose cd Xonotic
+ verbose mkdir data fteqcc source source/darkplaces source/fteqcc
+ verbose tar xvf -
+ verbose rm -rf misc/builddeps
+ verbose mv misc/buildfiles/win32/* . || true
+ verbose mv misc/buildfiles/win64 bin64 || true
+ verbose mv misc/buildfiles/osx/* . || true
+ verbose rm -rf misc/buildfiles
+ }
+ {
+ verbose cd darkplaces
+ verbose git archive --format=tar HEAD
+ } | {
+ verbose cd Xonotic/source/darkplaces
+ verbose tar xvf -
+ }
+ {
+ verbose cd fteqcc
+ verbose git archive --format=tar HEAD
+ } | {
+ verbose cd Xonotic/source/fteqcc
+ verbose tar xvf -
+ }
+ {
+ verbose cd data/xonotic-data.pk3dir
+ verbose git archive --format=tar HEAD -- qcsrc Makefile
+ } | {
+ verbose cd Xonotic/source
+ verbose tar xvf -
+ }
+ ;;
+ release-compile-run)
+ host=$1
+ buildpath=$2
+ maketargets=$3
+ makeflags=$4
+ srcdir=$5
+ depsdir=$6
+ targetfiles=$7
+ set -x
+ if [ -n "$targetfiles" ]; then
+ case " $HOSTS_THAT_ARE_DISABLED " in
+ *\ $host\ *)
+ exit
+ ;;
+ esac
+ case " $HOSTS_THAT_ARE_MYSELF " in
+ *\ $host\ *)
+ verbose rsync --delete -zLvaSHP "$srcdir"/ "$buildpath/"
+ verbose rsync --delete -zLvaSHP "$depsdir"/ "$buildpath.deps/"
+ verbose ln -snf "$buildpath.deps" "$buildpath/.deps"
+ verbose eval make -C "$buildpath" clean $maketargets $makeflags
+ for f in $targetfiles; do
+ verbose mv "$buildpath/${f%:*}" "${f##*:}" || true
+ done
+ ;;
+ *)
+ verbose rsync --delete -zLvaSHP "$srcdir"/ "$host:$buildpath/"
+ verbose rsync --delete -zLvaSHP "$depsdir"/ "$host:$buildpath.deps/"
+ verbose ssh "$host" "ln -snf $buildpath.deps $buildpath/.deps && cd $buildpath && nice -`nice` make clean $maketargets $makeflags"
+ for f in $targetfiles; do
+ verbose rsync -zvaSHP "$host:$buildpath/${f%:*}" "${f##*:}" || true
+ done
+ ;;
+ esac
+ # now rebrand the binaries...
+ for f in $targetfiles; do
+ #verbose "$d0/misc/tools/rebrand-darkplaces-engine.sh" "${XONOTIC_BRAND:-$d0/misc/tools/xonotic.brand}" "${f##*:}" || true
+ case "$f" in
+ xonotic*.exe)
+ verbose "$d0/misc/tools/change-icon-of-exe.sh" "$d0/misc/logos/icons_ico/xonotic.ico" "$f"
+ (
+ d=`mktemp -d -t rebrand.XXXXXX`
+ cd "$d"
+ echo "-mygames" > darkplaces.opt
+ zip -9r darkplaces.zip darkplaces.opt
+ cat darkplaces.zip
+ cd "$d0"
+ rm -rf "$d"
+ ) >> "$f"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ release-compile)
+ suffix=$1
+ makeflags=$2
+ fteqcc_maketargets=$3
+ fteqcc_files=$4
+ darkplaces_maketargets=$5
+ darkplaces_files=$6
+ host=xonotic-build-$suffix
+ verbose "$SELF" release-compile-run "$host" /tmp/fteqcc.build."$suffix" "$fteqcc_maketargets" "$makeflags" "Xonotic/source/fteqcc" "$d0/misc/builddeps/dp.$suffix" "$fteqcc_files"
+ verbose "$SELF" release-compile-run "$host" /tmp/Darkplaces.build."$suffix" "$darkplaces_maketargets" "$makeflags" "Xonotic/source/darkplaces" "$d0/misc/builddeps/dp.$suffix" "$darkplaces_files"
+ ;;
+ release-engine-win32)
+ # TODO change to g++ and D3D=1 when D3D gets added
+ verbose "$SELF" release-compile win32 \
+ 'STRIP=: DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -g -Wl,--dynamicbase -Wl,--nxcompat -I.deps/include -L.deps/lib" WINDRES="i586-mingw32msvc-windres" SDL_CONFIG=".deps/bin/sdl-config" LIB_JPEG= CFLAGS_LIBJPEG= WIN32RELEASE=1 D3D=0' \
+ win 'fteqcc.exe:Xonotic/fteqcc/fteqcc.exe' \
+ release 'darkplaces.exe:Xonotic/xonotic.exe darkplaces-sdl.exe:Xonotic/xonotic-sdl.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated.exe'
+ ;;
+ release-engine-win64)
+ # TODO change to g++ and D3D=1 when D3D gets added
+ verbose "$SELF" release-compile win64 \
+ 'STRIP=: DP_MAKE_TARGET=mingw CC="amd64-mingw32msvc-gcc -g -Wl,--dynamicbase -Wl,--nxcompat -I.deps/include -L.deps/lib" WINDRES="amd64-mingw32msvc-windres" SDL_CONFIG=".deps/bin/sdl-config" LIB_JPEG= CFLAGS_LIBJPEG= WIN64RELEASE=1 D3D=0' \
+ win 'fteqcc.exe:Xonotic/fteqcc/fteqcc-x64.exe' \
+ release 'darkplaces.exe:Xonotic/xonotic-x64.exe darkplaces-sdl.exe:Xonotic/xonotic-x64-sdl.exe darkplaces-dedicated.exe:Xonotic/xonotic-x64-dedicated.exe'
+ ;;
+ release-engine-osx-sv-sdl)
+ # gcc on OSX is buggy, needs -fno-reorder-blocks for a release build to succeed
+ verbose "$SELF" release-compile osx \
+ 'STRIP=: CC="gcc -g -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -I.deps/include -L.deps/lib -fno-reorder-blocks"' \
+ all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.osx' \
+ 'sv-release sdl-release' 'darkplaces-sdl:Xonotic/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl-bin darkplaces-dedicated:Xonotic/xonotic-osx-dedicated'
+ ;;
+ release-engine-osx-agl)
+ # gcc on OSX is buggy, needs -fno-reorder-blocks for a release build to succeed
+ verbose "$SELF" release-compile osx \
+ 'STRIP=: CC="gcc -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -I.deps/include -L.deps/lib -fno-reorder-blocks"' \
+ '' '' \
+ 'cl-release' 'darkplaces-agl:Xonotic/Xonotic.app/Contents/MacOS/xonotic-osx-agl-bin'
+ ;;
+ release-engine-osx)
+ verbose "$SELF" release-engine-osx-sv-sdl
+ verbose "$SELF" release-engine-osx-agl
+ ;;
+ release-engine-linux32)
+ verbose "$SELF" release-compile linux32 \
+ 'STRIP=: CC="gcc -m32 -g -I.deps/include -L.deps/lib" DP_MODPLUG_STATIC_LIBDIR=.deps/lib LIB_JPEG=.deps/lib/libjpeg.a' \
+ all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux32' \
+ release 'darkplaces-glx:Xonotic/xonotic-linux32-glx darkplaces-sdl:Xonotic/xonotic-linux32-sdl darkplaces-dedicated:Xonotic/xonotic-linux32-dedicated'
+ ;;
+ release-engine-linux64)
+ verbose "$SELF" release-compile linux64 \
+ 'STRIP=: CC="gcc -m64 -g -I.deps/include -L.deps/lib" DP_MODPLUG_STATIC_LIBDIR=.deps/lib LIB_JPEG=.deps/lib/libjpeg.a' \
+ all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux64' \
+ release 'darkplaces-glx:Xonotic/xonotic-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
+ ;;
+ release-engine)
+ verbose "$SELF" release-engine-linux32 &
+ verbose "$SELF" release-engine-linux64 &
+ verbose "$SELF" release-engine-win32 &
+ verbose "$SELF" release-engine-win64 &
+ verbose "$SELF" release-engine-osx &
+ wait %1
+ wait %2
+ wait %3
+ wait %4
+ wait %5
+ wait
+ ;;
+ release-maps)
+ verbose "$SELF" update-maps
+ ;;
+ release-qc)
+ case "$RELEASETYPE" in
+ beta)
+ verbose make -C Xonotic/source FTEQCC="$d0/Xonotic/fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 clean all
+ ;;
+ release)
+ verbose make -C Xonotic/source FTEQCC="$d0/Xonotic/fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 FTEQCCFLAGS_WATERMARK= clean all
+ ;;
+ esac
+ verbose rm -f Xonotic/source/*/fteqcc.log
+ ;;
+ release-buildpk3-transform-raw)
+ dir=$1