6 # I use this in EVERY shell script ;)
11 while ! [ -f ./all ]; do
12 if [ x"`pwd`" = x"/" ]; then
13 echo "Cannot find myself."
14 echo "Please run this script with the working directory inside a Xonotic checkout."
22 # If we are on WINDOWS:
27 # Windows hates users. So this script has to copy itself elsewhere first...
28 cp "$SELF" ../all.xonotic.sh
29 export WE_HATE_OUR_USERS=1
30 exec ../all.xonotic.sh "$@"
41 self=`git hash-object "$SELF"`
44 self_new=`git hash-object "$SELF"`
45 if [ x"$self" != x"$self_new" ]; then
46 msg "./all has changed."
47 if [ -z "$XONOTIC_FORBID_RERUN_ALL" ]; then
48 msg "Rerunning the requested operation to make sure."
49 export XONOTIC_FORBID_RERUN_ALL=1
52 msg "Please try $SELF update, and then retry your requested operation."
69 echo "the root directory"
79 if git ls-files -u | grep ' 1 '; then
81 echo "MERGE CONFLICT."
82 echo "change into the \"$1\" project directory, and then:"
83 echo "- edit the files mentioned above with your favorite editor,"
84 echo " and fix the conflicts (marked with <<<<<<< blocks)"
85 echo "- for binary files, you can select the files using"
86 echo " git checkout --ours or git checkout --theirs"
87 echo "- when done with a file, 'git add' the file"
88 echo "- when done, 'git commit'"
97 while [ x"$yesno" != x"y" -a x"$yesno" != x"n" ]; do
108 check_mergeconflict "$1"
113 data/xonotic-data.pk3dir | | master |
114 data/xonotic-maps.pk3dir | | master |
115 data/xonotic-music.pk3dir | | master |
116 data/xonotic-nexcompat.pk3dir | | master |
117 mediasource | | master |
118 darkplaces | | div0-stable | svn
119 fteqcc | git://github.com/Blub/qclib.git | master |
120 div0-gittools | | master |
121 netradiant | | master |
122 d0_blind_id | http://github.com/divVerent/d0_blind_id.git | master |
124 # todo: in darkplaces, change repobranch to div0-stable
126 repos=`echo "$repos_urls" | grep . | cut -d '|' -f 1 | tr -d ' '`
128 base=`git config remote.origin.url`
131 base=${base%xonotic.git}
134 echo "The main repo is not xonotic.git, what have you done?"
141 repo_t=`echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 2 | tr -d ' '`
142 if [ -n "$repo_t" ]; then
152 if [ x"$1" = x"." ]; then
153 echo "$base""xonotic.git"
155 echo "$base${1##*/}.git"
162 repo_t=`echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 3 | tr -d ' '`
163 if [ -n "$repo_t" ]; then
172 echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 4 | tr -d ' '
175 repos=`for d in $repos; do
177 if [ x"$p" = x"$d" ] || [ -d "$d" ] || ! { [ -f "$d.no" ] || [ -f "$p" ]; }; then
182 if [ "$#" = 0 ]; then
188 fix_upstream_rebase()
190 if [ -z "$r_me" ] || [ -z "$r_other" ]; then
193 r_base=`git merge-base "$r_me" "$r_other"`
195 # no merge-base? upstream did filter-branch
196 if [ -n "$r_base" ]; then
197 # otherwise, check if the two histories are "similar"
198 r_l_me=`git log --pretty="format:%s" "$r_other".."$r_me" | grep -v "^Merge" | sort -u`
199 r_l_other=`git log --pretty="format:%s" "$r_me".."$r_other" | grep -v "^Merge" | sort -u`
201 # heuristics: upstream rebase/filter-branch if more than 50% of the commits of one of the sides are in the other too
202 r_lc_me=`echo "$r_l_me" | wc -l`
203 r_lc_other=`echo "$r_l_other" | wc -l`
204 r_lc_together=`{ echo "$r_l_me"; echo "$r_l_other"; } | sort -u | wc -l`
205 r_lc_same=$(($r_lc_me + $r_lc_other - $r_lc_together))
207 if [ $(( $r_lc_same * 2 )) -gt $(( $r_lc_me )) ] || [ $(( $r_lc_same * 2 )) -gt $(( $r_lc_other )) ]; then
208 if yesno "Probable upstream rebase detected, automatically fix?" 'git log --oneline --graph --date-order --left-right "$r_other"..."$r_me"'; then
209 git reset --hard "$r_me"
219 fix_upstream_rebase_mergeok()
221 r_me=`git rev-parse --revs-only HEAD^1 2>/dev/null || true`
222 r_other=`git rev-parse --revs-only HEAD^2 2>/dev/null || true`
226 fix_upstream_rebase_mergefail()
228 r_me=`git rev-parse --revs-only HEAD 2>/dev/null || true`
229 r_other=`git rev-parse --revs-only MERGE_HEAD 2>/dev/null || true`
236 enter "$d0/$d" verbose
237 verbose fix_upstream_rebase_mergefail && verbose fix_upstream_rebase_mergeok
242 if [ x"$1" = x"-N" ]; then
247 branch=`repobranch "$d"`
248 if [ -d "$d0/$d" ]; then
250 enter "$d0/$d" verbose
251 verbose git config remote.origin.url "$url"
252 verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
254 verbose git config remote.origin.autocrlf input
256 r=`git symbolic-ref HEAD`
258 if git config branch.$r.remote >/dev/null 2>&1; then
259 if ! verbose git pull; then
260 fix_upstream_rebase_mergefail || true
261 check_mergeconflict "$d"
262 echo "Pulling failed. Press ENTER to continue, or Ctrl-C to abort."
265 fix_upstream_rebase_mergeok || true
270 checkself "$cmd" "$@"
272 verbose git remote prune origin
276 verbose git clone "$url" "$d0/$d"
277 enter "$d0/$d" verbose
278 if [ "$branch" != "master" ]; then
279 verbose git checkout --track -b "$branch" origin/"$branch"
286 misc/tools/xonotic-map-compiler-autobuild download
291 if [ -z "$branch" ]; then
294 branch=${remote#origin/}
305 enter "$d0/$d" verbose
307 if [ -n "$b" ] && git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
309 verbose git checkout "$b"
310 elif [ -n "$b" ] && git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
312 verbose git checkout --track -b "$b" "$remote/$b"
315 if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
317 verbose git checkout "$b"
318 elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
320 verbose git checkout --track -b "$b" "$remote/$b"
322 echo "WTF? Not even branch $b doesn't exist in $d"
327 checkself "$cmd" "$@"
331 echo "The requested branch was not found in any repository."
339 if [ -z "$branch" ]; then
343 if [ -z "$branch" ]; then
346 r=`git symbolic-ref HEAD`
353 dv=`visible_repo_name "$d"`
354 enter "$d0/$d" verbose
355 if git rev-parse "refs/heads/$branch" >/dev/null 2>&1; then
356 echo "Already having this branch in $dv."
358 if yesno "Branch in $dv?"; then
359 if [ -n "$srcbranch" ]; then
362 b=origin/"`repobranch "$d"`"
363 verbose git fetch origin || true
365 # TODO do this without pushing
366 verbose git checkout -b "$branch" "$b"
367 verbose git config "branch.$branch.remote" "$remote"
368 verbose git config "branch.$branch.merge" "refs/heads/$branch"
378 cd "$d0/$d" # am in a pipe, shouldn't use enter
379 git branch -a -v -v | cut -c 3- | sed "s/^(no branch)/(no_branch)/" | sed "s,^,$d ,"
384 while read -r d BRANCH REV UPSTREAM TEXT; do
385 if [ x"$BRANCH" = x"`repobranch "$d"`" ]; then
390 UPSTREAM=${UPSTREAM#\[}
391 UPSTREAM=${UPSTREAM%\]}
392 UPSTREAM=${UPSTREAM%:*}
395 TEXT="$UPSTREAM $TEXT"
399 if [ x"$REV" = x"->" ]; then
402 BRANCH=${BRANCH#remotes/}
403 ID=`echo "$BRANCH" | tr -c "A-Za-z0-9." "_"`
404 branches_list="$branches_list $BRANCH" # TEH SORT MAKEZ IT UNIEQ
405 eval "r=\$branches_repos_$ID"
414 eval "branches_repos_$ID=\$r"
416 echo -n "$branches_list" | xargs -n 1 echo | sort -u | while IFS= read -r BRANCH; do
417 ID=`echo "$BRANCH" | tr -c "A-Za-z0-9." "_"`
418 eval "r=\$branches_repos_$ID"
419 printf "%-60s %s\n" "$BRANCH" "$r"
426 dv=`visible_repo_name "$d"`
427 enter "$d0/$d" verbose
428 r=`git symbolic-ref HEAD`
430 if git log HEAD..origin/"`repobranch "$d"`" | grep .; then
431 # we have uncommitted changes
432 if yesno "Could merge from \"`repobranch "$d"`\" into \"$r\" in $dv. Do it?"; then
433 if ! verbose git merge origin/"`repobranch "$d"`"; then
434 check_mergeconflict "$d"
435 exit 1 # this should ALWAYS be fatal
445 dv=`visible_repo_name "$d"`
446 enter "$d0/$d" verbose
447 r=`git symbolic-ref HEAD`
449 diffdata=`git diff --color HEAD`
450 if [ -n "$diffdata" ]; then
451 # we have uncommitted changes
452 if yesno "Uncommitted changes in \"$r\" in $dv. Commit?" 'echo "$diffdata" | less -r'; then
453 verbose git commit -a
456 rem=`git config "branch.$r.remote" || echo origin`
457 bra=`git config "branch.$r.merge" || echo "$r"`
458 upstream="$rem/${bra#refs/heads/}"
459 if ! git rev-parse "$upstream" >/dev/null 2>&1; then
460 upstream="origin/`repobranch "$d"`"
462 logdata=`git log --color "$upstream".."$r"`
463 if [ -n "$logdata" ]; then
464 if yesno "Push \"$r\" in $dv?" 'echo "$logdata" | less -r'; then
465 verbose git push "$rem" HEAD
468 if [ x"$submit" = x"-s" ]; then
471 verbose git push "$rem" HEAD:"${bra%%/*}/finished/${bra#*/}"
479 if [ -n "$WE_HATE_OUR_USERS" ]; then
480 TARGETS="sv-debug cl-debug"
481 if [ -z "$CC" ]; then
484 elif [ x"`uname`" = x"Darwin" ]; then
487 TARGETS="sv-debug cl-debug sdl-debug"
490 # AGL cannot be compiled on systems with a kernel > 10.x (Snow Leopard)
491 TARGETS="sv-debug sdl-debug"
494 export CC="gcc -I$PWD/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks/SDL.framework/Headers -F$PWD/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks"
496 TARGETS="sv-debug cl-debug sdl-debug"
517 cleanqc=true # version info
520 if [ $# -gt 0 ] && [ x"$1" = x"" ]; then
521 # if we give the command make the arg "", it will surely fail (invalid filename),
522 # so better handle it as an empty client option
525 elif [ -n "$1" ]; then
527 TARGETS_SAVE=$TARGETS
532 TARGETS="$TARGETS sdl-debug"
535 TARGETS="$TARGETS cl-debug"
538 TARGETS="$TARGETS sv-debug"
541 BAD_TARGETS="$BAD_TARGETS $X"
545 if [ -n "$TARGETS" ]; then # at least a valid client
547 else # no valid client, let's assume this option is not meant to be a client then
548 TARGETS=$TARGETS_SAVE
552 if [ -z "$MAKEFLAGS" ]; then
553 if [ -f /proc/cpuinfo ]; then
554 ncpus=$((`grep -c '^processor :' /proc/cpuinfo`+0))
555 if [ $ncpus -gt 1 ]; then
561 MAKEFLAGS="$MAKEFLAGS DP_LINK_TO_LIBJPEG=1"
564 if [ -n "$WE_HATE_OUR_USERS" ]; then
565 MAKEFLAGS="$MAKEFLAGS DP_MAKE_TARGET=mingw"
569 enter "$d0/d0_blind_id" verbose
570 if ! [ -f Makefile ]; then
571 verbose sh autogen.sh
575 verbose make $MAKEFLAGS clean
577 verbose make $MAKEFLAGS
579 enter "$d0/fteqcc" verbose
581 verbose make $MAKEFLAGS clean
583 verbose make $MAKEFLAGS
585 enter "$d0/data/xonotic-data.pk3dir" verbose
587 verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" "$@" $MAKEFLAGS clean
589 verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" "$@" $MAKEFLAGS
591 enter "$d0/darkplaces" verbose
592 if [ x"$BAD_TARGETS" = x" " ]; then
593 echo "Warning: invalid empty client, default clients will be used."
596 verbose make $MAKEFLAGS clean
598 for T in $TARGETS; do
599 verbose make $MAKEFLAGS "$@" "$T"
601 for T in $BAD_TARGETS; do
602 echo "Warning: discarded invalid client $T."
605 verbose "$SELF" update-maps
608 if [ -n "$WE_HATE_OUR_USERS" ]; then
610 export PATH="$d0/misc/buildfiles/win64:$d0/misc/buildfiles/win32:$d0/d0_blind_id/.libs:$PATH"
611 elif [ x"`uname`" = x"Darwin" ]; then
612 export DYLD_LIBRARY_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS:$d0/d0_blind_id/.libs"
613 export DYLD_FRAMEWORK_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks"
616 export LD_LIBRARY_PATH="$d0/d0_blind_id/.libs"
620 sdl|glx|agl|dedicated)
629 if ! [ -x "darkplaces/darkplaces$client" ]; then
630 if [ -x "darkplaces/darkplaces$client.exe" ]; then
633 echo "Client darkplaces/darkplaces$client not found, aborting"
637 set -- "darkplaces/darkplaces$client" -nexuiz -customgamename Xonotic -customgamedirname1 data -customgamedirname2 "" -customgamescreenshotname xonotic -customgameuserdirname xonotic -mygames "$@"
639 # if pulseaudio is running: USE IT
640 if [ -z "$SDL_AUDIODRIVER" ] && ! [ -n "$WE_HATE_OUR_USERS" ] && ! [ x"`uname`" = x"Darwin" ]; then
641 if ps -C pulseaudio >/dev/null; then
642 if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then
643 export SDL_AUDIODRIVER=pulse
648 if [ -n "$USE_GDB" ]; then
649 set -- gdb --args "$@"
655 if [ x"$1" = x"-k" ]; then
660 if verbose cd "$d0/$d"; then
672 patchdir=`mktemp -d -t save-patches.XXXXXX`
674 enter "$d0/$d" verbose
675 git branch -v -v | cut -c 3- | {
677 while read -r BRANCH REV UPSTREAM TEXT; do
680 UPSTREAM=${UPSTREAM#\[}
681 UPSTREAM=${UPSTREAM%\]}
682 UPSTREAM=${UPSTREAM%:*}
686 UPSTREAM=origin/"`repobranch "$d"`"
690 if [ x"$REV" = x"->" ]; then
693 if git format-patch -o "$patchdir/$i" "$UPSTREAM".."$BRANCH"; then
694 echo "$d" > "$patchdir/$i/info.txt"
695 echo "$BRANCH" >> "$patchdir/$i/info.txt"
696 echo "$UPSTREAM" >> "$patchdir/$i/info.txt"
697 echo "$TRACK" >> "$patchdir/$i/info.txt"
700 rm -rf "$patchdir/$i"
705 ( cd "$patchdir" && tar cvzf - . ) > "$outfile"
710 patchdir=`mktemp -d -t restore-patches.XXXXXX`
711 ( cd "$patchdir" && tar xvzf - ) < "$infile"
713 for P in "$patchdir"/*/info.txt; do
720 verbose git checkout HEAD^0
721 verbose git branch -D "$BRANCH"
722 if [ x"$TRACK" = x"true" ]; then
723 verbose git checkout --track -b "$BRANCH" "$UPSTREAM"
725 verbose git branch -b "$BRANCH" "$UPSTREAM"
737 report=$report"$*$LF"
742 report=$report" $*$LF"
747 o=`"$@" | sed 's/^/ /' || true`
751 enter "$d0/$d" verbose
752 base="`repobranch "$d"`"
754 for ref in `git for-each-ref --format='%(refname)' refs/remotes/origin/`; do
755 case "${ref#refs/remotes/origin/}" in
768 if [ -n "$branch" ]; then
769 if [ x"$branch" != x"${ref#refs/remotes/origin/}" ]; then
778 l0=`git rev-list "$base".."$ref" | wc -l`
779 l1=`git rev-list master.."$ref" | wc -l`
780 if [ $l0 -gt $l1 ]; then
787 reportecho " Branch $ref:"
788 note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
789 logdata=`git log --color "$realbase".."$ref"`
790 if [ -z "$logdata" ]; then
791 reportecho4 "--> not merging, no changes vs master"
792 if yesno "Branch \"$ref\" probably should get deleted. Do it?" ''; then
793 git push origin :"${ref#refs/remotes/origin/}"
794 reportecho4 "--> branch deleted"
797 diffdata=`git diff --color --find-copies-harder --ignore-space-change "$realbase"..."$ref"`
798 if [ -z "$diffdata" ]; then
799 reportecho4 "--> not merging, no changes vs master, branch contains redundant history"
800 if yesno "Branch \"$ref\" probably should get deleted. Do it?" '{ echo "$logdata"; } | less -r'; then
801 git push origin :"${ref#refs/remotes/origin/}"
802 reportecho4 "--> branch deleted"
804 elif [ -z "$branch" ] && [ -n "$note" ]; then
805 reportdo4 echo "$note"
806 reportecho4 "--> not merging, already had this one rejected before"
807 elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ echo "$logdata"; echo "$diffdata"; } | less -r'; then
808 git checkout "$realbase"
809 org=`git rev-parse HEAD`
810 if ! git merge --no-ff "$ref" 2>&1 | tee "$t" && ! { git ls-files -u | grep ' 1 ' >/dev/null; }; then
811 git reset --hard "$org"
812 GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Merge failed:$LF`cat "$t"`" "$ref"
814 reportecho4 "--> merge failed"
815 elif ! "$SELF" compile -n 2>&1 | tee "$t"; then
816 git reset --hard "$org"
817 GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Compile failed:$LF`cat "$t"`" "$ref"
819 reportecho4 "--> compile failed"
820 elif ! yesno "Still merge \"$ref\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then
821 git reset --hard "$org"
822 GIT_NOTES_REF=refs/notes/admin-merge git notes edit "$ref"
823 note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
824 if [ x"$note" = x"del" ]; then
825 git push origin :"${ref#refs/remotes/origin/}"
826 reportecho4 "--> test failed, branch deleted"
827 elif [ -n "$note" ]; then
828 reportdo4 echo "$note"
829 reportecho4 "--> test failed"
831 reportecho4 "--> test failed, postponed"
835 case ",`repoflags "$d"`," in
837 # we do quite a mess here... luckily we know $org
838 git fetch # svn needs to be current
839 git rebase -i --onto origin/master "$org"
840 git svn dcommit --add-author-from
841 git reset --hard "$org"
847 reportecho4 "--> MERGED"
848 if yesno "Delete original branch \"$ref\"?"; then
849 git push origin :"${ref#refs/remotes/origin/}"
850 reportecho4 "--> branch deleted"
854 GIT_NOTES_REF=refs/notes/admin-merge git notes edit "$ref"
855 note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
856 if [ x"$note" = x"del" ]; then
857 git push origin :"${ref#refs/remotes/origin/}"
858 reportecho4 "--> branch deleted"
859 elif [ -n "$note" ]; then
860 reportdo4 echo "$note"
861 reportecho4 "--> rejected"
863 reportecho4 "--> postponed"
872 echo "$report" | ssh nexuiz@rm.endoftheinternet.org cat '>>' public_html/xonotic-merge-notes.txt
875 # release building goes here
877 #"$SELF" each git clean -fxd
880 git archive --format=tar HEAD -- Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh misc/buildfiles | {
884 rm -rf misc/builddeps
885 mv misc/buildfiles/win32/* .
886 mv misc/buildfiles/win64/* .
887 mv misc/buildfiles/osx/* .
888 rm -rf misc/buildfiles
898 case " $HOSTS_THAT_ARE_MYSELF " in
900 rsync --delete -zvaSHPAX "$srcdir"/ "$buildpath/"
903 eval make clean $maketargets $makeflags
905 for f in $targetfiles; do
906 mv "$buildpath/${f%:*}" "${f##*:}"
910 rsync --delete -zvaSHPAX "$srcdir"/ "$host:$buildpath/"
911 ssh "$host" ". ~/.profile && cd $buildpath && make clean $maketargets $makeflags"
912 for f in $targetfiles; do
913 rsync -zvaSHPAX "$host:$buildpath/${f%:*}" "${f##*:}"
921 fteqcc_maketargets=$3
923 darkplaces_maketargets=$5
925 "$SELF" release-compile-run "xonotic-build-$suffix" /tmp/fteqcc.build."$suffix" "$fteqcc_maketargets" "$makeflags" "fteqcc" "$fteqcc_files"
926 "$SELF" release-compile-run "xonotic-build-$suffix" /tmp/Darkplaces.build."$suffix" "$darkplaces_maketargets" "$makeflags" "darkplaces" "$darkplaces_files"
928 release-engine-win32)
929 "$SELF" release-compile win32 \
930 '"DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -Wl,--dynamicbase -Wl,--nxcompat -g -DSUPPORTDIRECTX -DUSE_WSPIAPI_H -I$HOME/dp.win32/include -L$HOME/dp.win32/lib" WINDRES="i586-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win32/bin/sdl-config"' \
931 win 'fteqcc.exe:Xonotic/fteqcc/fteqcc.exe' \
932 debug 'darkplaces.exe:xonotic.exe darkplaces-sdl.exe:xonotic-sdl.exe darkplaces-dedicated.exe:xonotic-dedicated.exe'
934 release-engine-win64)
935 "$SELF" release-compile win64 \
936 '"DP_MAKE_TARGET=mingw CC="amd64-mingw32msvc-gcc -Wl,--dynamicbase -Wl,--nxcompat -g -DSUPPORTDIRECTX -DUSE_WSPIAPI_H -I$HOME/dp.win64/include -L$HOME/dp.win64/lib" WINDRES="amd64-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win64/bin/sdl-config" LDFLAGS_WINCOMMON=""' \
937 win 'fteqcc.exe:Xonotic/fteqcc/fteqcc-64.exe' \
938 debug 'darkplaces.exe:xonotic-64.exe darkplaces-sdl.exe:xonotic-sdl-64.exe darkplaces-dedicated.exe:xonotic-dedicated-64.exe'
941 "$SELF" release-compile osx \
942 'CC="gcc -g -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -I$HOME/dp.osx/include -L$HOME/dp.osx/lib"' \
943 all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.osx' \
944 sdl-debug 'darkplaces-sdl:Xonotic/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl-bin'
946 release-engine-linux32)
947 "$SELF" release-compile linux32 \
948 'CC="gcc -m32 -g -Wl,--hash-style=sysv -I$HOME/dp.linux32/include -L$HOME/dp.linux32/lib" DP_MODPLUG_STATIC_LIBDIR=$HOME/dp.linux32/lib DP_LINK_TO_LIBJPEG=1' \
949 all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux32' \
950 debug 'darkplaces-glx:Xonotic/xonotic-linux-linux32-glx darkplaces-sdl:Xonotic/xonotic-linux32-sdl darkplaces-dedicated:Xonotic/xonotic-linux32-dedicated'
952 release-engine-linux64)
953 "$SELF" release-compile linux64 \
954 'CC="gcc -m64 -g -Wl,--hash-style=sysv -I$HOME/dp.linux64/include -L$HOME/dp.linux64/lib" DP_MODPLUG_STATIC_LIBDIR=$HOME/dp.linux64/lib DP_LINK_TO_LIBJPEG=1' \
955 all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux64' \
956 debug 'darkplaces-glx:Xonotic/xonotic-linux-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
959 "$SELF" release-engine-win32 &
960 "$SELF" release-engine-win64 &
961 "$SELF" release-engine-osx &
962 "$SELF" release-engine-linux32 &
963 "$SELF" release-engine-linux64 &
968 for X in data/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
970 cd Xonotic/data/xonotic-maps.pk3dir
977 # version numnber and stuff like that
980 verbose make -C data/xonotic-data.pk3dir FTEQCC="$d0/Xonotic/fteqcc/fteqcc.linux32" FTEQCCFLAGS_WATERMARK=
982 release-buildpk3-transform-raw)
985 release-buildpk3-transform-normal)
988 # texture: convert to jpeg and dds
990 export jpeg_qual_rgb=95
991 export jpeg_qual_a=99
995 find textures -type f -print0 | xargs -0 "$d0"/misc/tools/cached-converter.sh
997 release-buildpk3-transform-low)
1000 # texture: convert to jpeg and dds
1001 # music: reduce bitrate
1003 export jpeg_qual_rgb=95
1004 export jpeg_qual_a=99
1008 find textures sound/cdtracks -type f -print0 | xargs -0 "$d0"/misc/tools/cached-converter.sh
1022 mkdir -p Xonotic/temp
1025 git archive --format=tar HEAD
1030 if [ x"$src" = x"data/xonotic-data.pk3dir" ]; then
1031 cp "$src"/progs.dat Xonotic/temp/
1032 cp "$src"/csprogs.dat Xonotic/temp/
1033 cp "$src"/menu.dat Xonotic/temp/
1035 "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
1037 zip -9r "../../$dst" . ########### 7za a -tzip -mx=9 "../../$dst" .
1044 while [ "$#" -gt 1 ]; do
1045 "$SELF" release-buildpk3 "$src" "Xonotic/${src%.pk3dir}$2.pk3" "$1"
1051 "$SELF" release-buildpk3s data/font-dejavu.pk3dir raw ''
1052 "$SELF" release-buildpk3s data/xonotic-data.pk3dir normal '' raw '-raw' low '-low'
1053 "$SELF" release-buildpk3s data/xonotic-maps.pk3dir normal '' raw '-raw' low '-low'
1054 "$SELF" release-buildpk3s data/xonotic-music.pk3dir normal '' raw '-raw' low '-low'
1055 "$SELF" release-buildpk3s data/xonotic-nexcompat.pk3dir low ''
1058 "$SELF" release-prepare
1059 "$SELF" release-engine
1060 "$SELF" release-maps
1061 "$SELF" release-finish
1063 "$SELF" release-pack
1070 echo " $SELF push [-s]"
1071 echo " $SELF branches"
1072 echo " $SELF branch [<remote>] <branchname>"
1073 echo " $SELF branch <remote> <branchname> <srcbranchname>"
1074 echo " $SELF checkout [<remote>] <branchname>"
1075 echo " $SELF compile [-c|-n] [<client>] <options>"
1076 echo " $SELF run [<client>] <options>"
1077 echo " $SELF each <command>"