X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=all;h=64cd09977905099018505f0f63de0af3c09af378;hp=f1eb1971a54b0f983c447f7db628ee17a8ae8714;hb=62c00cf9b98a79af6cb77422590d5d51be4bec8c;hpb=5f0d658ff8f8a1dc3a85cf249e17f65ebf22176b diff --git a/all b/all index f1eb1971..64cd0997 100755 --- a/all +++ b/all @@ -110,17 +110,17 @@ enter() } repos_urls=" -. | | master | -data/xonotic-data.pk3dir | | master | -data/xonotic-music.pk3dir | | master | -data/xonotic-nexcompat.pk3dir | | master | no -darkplaces | | div0-stable | svn -netradiant | | master | -div0-gittools | | master | no -d0_blind_id | http://github.com/divVerent/d0_blind_id.git | master | -data/xonotic-maps.pk3dir | | master | -mediasource | | master | no -fteqcc | http://github.com/Blub/qclib.git | master | +. | | master | +data/xonotic-data.pk3dir | | master | +data/xonotic-music.pk3dir | | master | +data/xonotic-nexcompat.pk3dir | | master | no +darkplaces | | div0-stable | svn +netradiant | | master | +div0-gittools | | master | no +d0_blind_id | | master | +data/xonotic-maps.pk3dir | | master | +mediasource | | master | no +fteqcc | | xonotic-stable | noautocrlf " # todo: in darkplaces, change repobranch to div0-stable @@ -308,10 +308,19 @@ fix_git_config() verbose git config --unset remote.origin.pushurl || true fi verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - verbose git config core.autocrlf input - if [ -z "`git config push.default`" ]; then + case ",`repoflags "$d"`," in + *,noautocrlf,*) + verbose git config --unset core.autocrlf || true + ;; + *) + verbose git config core.autocrlf input + ;; + esac + if [ -z "`git config push.default || true`" ]; then verbose git config push.default current # or is tracking better? fi + verbose git config filter.mapclean.clean "tr -d '\r' | grep '^[^/]'" + verbose git config filter.mapclean.smudge "cat" } mkzip() @@ -330,6 +339,47 @@ mkzip0() zip -0y "$@" } +mirrorspeed() +{ + # first result is to be ignored, but we use it to check status + git ls-remote "$1" refs/heads/master >/dev/null 2>&1 || return 1 + { time -p git ls-remote "$1" refs/heads/master; } 2>&1 >/dev/null | head -n 1 | cut -d ' ' -f 2 | tr -d . | sed 's,^0*,,' + # unit: clock ticks (depends on what "time" returns +} + +bestmirror() +{ + pre=$1; shift + suf=$1; shift + + if ! { time -p true; } >/dev/null 2>&1; then + return 1 + fi + + bestin= + bestt= + for in in "$@"; do + m=$pre$in$suf + if t=`mirrorspeed "$m"`; then + msg "$m -> $t ticks" + if [ -n "$t" ]; then + if [ -z "$bestt" ] || [ "$t" -lt "$bestt" ]; then + bestin=$in + bestt=$t + fi + fi + else + msg "$m -> FAIL" + fi + done + if [ -n "$bestin" ]; then + msg "Best mirror seems to be $pre$bestin$suf" + echo "$bestin" + else + return 1 + fi +} + case "$cmd" in fix_upstream_rebase) for d in $repos; do @@ -429,12 +479,14 @@ case "$cmd" in case "$2" in nl) ;; de) ;; + best) ;; default) ;; *) msg "Invalid location!" msg "Possible locations for the -l option:" msg " nl (Netherlands, run by merlijn)" msg " de (Germany, run by divVerent)" + msg " best (find automatically)" msg " default (currently nl)" exit 1 ;; @@ -447,6 +499,23 @@ case "$cmd" in fi shift done + case "$location" in + best) + newbase=`echo "$base" | sed "s,://\(.*\.\)\?git.xonotic.org/,:// .git.xonotic.org/,"` + case "$newbase" in + *\ *) + if location=`bestmirror $newbase"xonotic.git" de nl`; then + : + else + location=current + fi + ;; + *) + location=current + ;; + esac + ;; + esac case "$location" in default) location= @@ -702,6 +771,7 @@ case "$cmd" in cleanqc=false compiled0=false debug=debug + snowleopardhack=false if [ -z "$CC" ]; then export CC="gcc -DSUPPORTIPV6" fi @@ -709,6 +779,7 @@ case "$cmd" in case "$1" in -0) compiled0=true + shift ;; -c) cleand0=true @@ -736,6 +807,7 @@ case "$cmd" in ;; *) # AGL cannot be compiled on systems with a kernel > 10.x (Snow Leopard) + snowleopardhack=true TARGETS="sv-$debug sdl-$debug" ;; esac @@ -757,7 +829,13 @@ case "$cmd" in sdl) TARGETS="$TARGETS sdl-debug" ;; - glx|agl|wgl) + agl) + TARGETS="$TARGETS cl-debug" + if $snowleopardhack; then + export CC="$CC -arch i386" + fi + ;; + glx|wgl) TARGETS="$TARGETS cl-debug" ;; dedicated) @@ -1028,6 +1106,12 @@ case "$cmd" in reportecho "$o" } for d in $repos; do + case "$d" in + fteqcc) + # sorry, fteqcc repo is managed manually + continue + ;; + esac enter "$d0/$d" verbose base="`repobranch "$d"`" reportecho "In $d:" @@ -1111,6 +1195,11 @@ case "$cmd" in reportecho4 "--> test failed, postponed" fi else + # apply crlf, or other cleanup filters (non-behavioural changes) + git reset --hard + find . -type f -exec touch {} \; + git commit -a --amend -C HEAD || true # don't fail if nothing to commit + echo "MERGING" case ",`repoflags "$d"`," in *,svn,*) @@ -1164,36 +1253,49 @@ case "$cmd" in # ./all clean [-m] [-f | -fu | -fU] [-r] [-D] # ./all clean --reclone found=false - while :; do - if [ x"$1" = x"--reclone" ]; then + for X in "$@"; do + if [ x"$X" = x"--reclone" ]; then force=true fetchupstream=true gotoupstream=true gotomaster=true rmuntracked=true killbranches=true - elif [ x"$1" = x"-f" ]; then + elif [ x"$X" = x"-f" ]; then force=true - elif [ x"$1" = x"-u" ]; then + elif [ x"$X" = x"-u" ]; then gotoupstream=true - elif [ x"$1" = x"-U" ]; then + elif [ x"$X" = x"-U" ]; then gotoupstream=true fetchupstream=true - elif [ x"$1" = x"-fu" ]; then + elif [ x"$X" = x"-fu" ]; then force=true gotoupstream=true - elif [ x"$1" = x"-fU" ]; then + elif [ x"$X" = x"-fU" ]; then force=true gotoupstream=true fetchupstream=true - elif [ x"$1" = x"-m" ]; then + elif [ x"$X" = x"-m" ]; then gotomaster=true - elif [ x"$1" = x"-r" ]; then + elif [ x"$X" = x"-r" ]; then rmuntracked=true - elif [ x"$1" = x"-D" ]; then + elif [ x"$X" = x"-D" ]; then killbranches=true + elif echo "$X" | grep '^-FFFF*UUUU*$' >/dev/null; then + msg '' + msg ' _____' + msg ' ,--'\''-\\P/`\\ FFFFFFF' + msg ' __/_ B/,-.\\ FFFFFFF' + msg ' / _\\ (// O\\\\ FFFFFF' + msg '| (O `) _\\._ _)\\ FFFUU' + msg '| |___/.^d0~~"\\ \\ UUUU' + msg '| |`~'\'' \\ | UUUU' + msg '| | __,C>|| UUUU' + msg '\\ /_ ,-/,-'\'' | UUUU' + msg ' \\\\_ \\_>~'\'' / UUUU-' + msg '' else - break + msg "Unknown arg: $X" fi found=true shift @@ -1259,6 +1361,7 @@ case "$cmd" in git rev-parse refs/heads/master >/dev/null 2>&1 || verbose git branch -t master origin/master || true git rev-parse "refs/heads/`repobranch "$d"`" >/dev/null 2>&1 || verbose git branch -t "`repobranch "$d"`" origin/"`repobranch "$d"`" || true fi + checkself "$cmd" "$@" done ;; @@ -1393,9 +1496,9 @@ case "$cmd" in # 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 + case "${f##*:}" in xonotic*.exe) - verbose "$d0/misc/tools/change-icon-of-exe.sh" "$d0/misc/logos/icons_ico/xonotic.ico" "$f" + 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" @@ -1404,7 +1507,7 @@ case "$cmd" in cat darkplaces.zip cd "$d0" rm -rf "$d" - ) >> "$f" + ) >> "${f##*:}" ;; esac done @@ -1483,10 +1586,11 @@ case "$cmd" in release-qc) case "$RELEASETYPE" in beta) - verbose make -C Xonotic/source FTEQCC="../fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 clean all + verbose make -C Xonotic/source FTEQCC="../../../fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 clean all + # back out of: source/qcsrc/server ;; release) - verbose make -C Xonotic/source FTEQCC="../fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 FTEQCCFLAGS_WATERMARK= clean all + verbose make -C Xonotic/source FTEQCC="../../../fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 FTEQCCFLAGS_WATERMARK= clean all ;; esac verbose rm -f Xonotic/source/*/fteqcc.log @@ -1514,7 +1618,7 @@ case "$cmd" in # music: reduce bitrate verbose export do_jpeg=true verbose export jpeg_qual_rgb=80 - verbose export jpeg_qual_a=95 + verbose export jpeg_qual_a=97 verbose export do_dds=false verbose export do_ogg=true verbose export ogg_qual=1 @@ -1529,7 +1633,7 @@ case "$cmd" in verbose export do_jpeg=false verbose export do_jpeg_if_not_dds=true verbose export jpeg_qual_rgb=80 - verbose export jpeg_qual_a=95 + verbose export jpeg_qual_a=99 verbose export do_dds=true verbose export dds_flags= verbose export do_ogg=true