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 | git://git.icculus.org/divverent/div0-gittools.git | master |
121 netradiant | | master |
123 # todo: in darkplaces, change repobranch to div0-stable
125 repos=`echo "$repos_urls" | grep . | cut -d '|' -f 1 | tr -d ' '`
127 base=`git config remote.origin.url`
130 base=${base%xonotic.git}
133 echo "The main repo is not xonotic.git, what have you done?"
140 repo_t=`echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 2 | tr -d ' '`
141 if [ -n "$repo_t" ]; then
151 if [ x"$1" = x"." ]; then
152 echo "$base""xonotic.git"
154 echo "$base${1##*/}.git"
161 repo_t=`echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 3 | tr -d ' '`
162 if [ -n "$repo_t" ]; then
171 echo "$repos_urls" | grep "^$1 " | cut -d '|' -f 4 | tr -d ' '
174 repos=`for d in $repos; do
176 if [ x"$p" = x"$d" ] || [ -d "$d" ] || ! { [ -f "$d.no" ] || [ -f "$p" ]; }; then
181 if [ "$#" = 0 ]; then
187 fix_upstream_rebase()
189 if [ -z "$r_me" ] || [ -z "$r_other" ]; then
192 r_base=`git merge-base "$r_me" "$r_other"`
194 # no merge-base? upstream did filter-branch
195 if [ -n "$r_base" ]; then
196 # otherwise, check if the two histories are "similar"
197 r_l_me=`git log --pretty="format:%s" "$r_other".."$r_me" | grep -v "^Merged" | sort -u`
198 r_l_other=`git log --pretty="format:%s" "$r_me".."$r_other" | grep -v "^Merged" | sort -u`
200 # heuristics: upstream rebase/filter-branch if more than 50% of the commits of one of the sides are in the other too
201 r_lc_me=`echo "$r_l_me" | wc -l`
202 r_lc_other=`echo "$r_l_other" | wc -l`
203 r_lc_together=`{ echo "$r_l_me"; echo "$r_l_other"; } | sort -u | wc -l`
204 r_lc_same=$(($r_lc_me + $r_lc_other - $r_lc_together))
206 if [ $(( $r_lc_same * 2 )) -le $(( $r_lc_me )) ] && [ $(( $r_lc_same * 2 )) -le $(( $r_lc_other )) ]; then
207 if yesno "Probable upstream rebase detected, automatically fix?" 'git log --oneline --graph --left-right "$r_l_other".."$r_l_me"'; then
208 git reset --hard "$r_me"
218 fix_upstream_rebase_mergeok()
220 r_me=`git rev-parse --revs-only HEAD^1 2>/dev/null || true`
221 r_other=`git rev-parse --revs-only HEAD^2 2>/dev/null || true`
225 fix_upstream_rebase_mergefail()
227 r_me=`git rev-parse --revs-only HEAD 2>/dev/null || true`
228 r_other=`git rev-parse --revs-only MERGE_HEAD 2>/dev/null || true`
235 fix_upstream_rebase_mergefail && fix_upstream_rebase_mergeok
240 if [ x"$1" = x"-N" ]; then
245 branch=`repobranch "$d"`
246 if [ -d "$d0/$d" ]; then
248 enter "$d0/$d" verbose
249 verbose git config remote.origin.url "$url"
250 verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
252 verbose git config remote.origin.autocrlf input
254 r=`git symbolic-ref HEAD`
256 if git config branch.$r.remote >/dev/null 2>&1; then
257 if ! verbose git pull; then
258 fix_upstream_rebase_mergefailed || true
259 check_mergeconflict "$d"
260 echo "Pulling failed. Press ENTER to continue, or Ctrl-C to abort."
263 fix_upstream_rebase_mergeok || true
268 checkself "$cmd" "$@"
270 verbose git remote prune origin
274 verbose git clone "$url" "$d0/$d"
275 enter "$d0/$d" verbose
276 if [ "$branch" != "master" ]; then
277 verbose git checkout --track -b "$branch" origin/"$branch"
284 misc/tools/xonotic-map-compiler-autobuild download
289 if [ -z "$branch" ]; then
292 branch=${remote#origin/}
303 enter "$d0/$d" verbose
305 if [ -n "$b" ] && git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
307 verbose git checkout "$b"
308 elif [ -n "$b" ] && git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
310 verbose git checkout --track -b "$b" "$remote/$b"
313 if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then
315 verbose git checkout "$b"
316 elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then
318 verbose git checkout --track -b "$b" "$remote/$b"
320 echo "WTF? Not even branch $b doesn't exist in $d"
325 checkself "$cmd" "$@"
329 echo "The requested branch was not found in any repository."
337 if [ -z "$branch" ]; then
341 if [ -z "$branch" ]; then
344 r=`git symbolic-ref HEAD`
351 dv=`visible_repo_name "$d"`
352 enter "$d0/$d" verbose
353 if git rev-parse "refs/heads/$branch" >/dev/null 2>&1; then
354 echo "Already having this branch in $dv."
356 if yesno "Branch in $dv?"; then
357 if [ -n "$srcbranch" ]; then
360 b=origin/"`repobranch "$d"`"
361 verbose git fetch origin || true
363 # TODO do this without pushing
364 verbose git checkout -b "$branch" "$b"
365 verbose git config "branch.$branch.remote" "$remote"
366 verbose git config "branch.$branch.merge" "refs/heads/$branch"
376 cd "$d0/$d" # am in a pipe, shouldn't use enter
377 git branch -a -v -v | cut -c 3- | sed "s/^(no branch)/(no_branch)/" | sed "s,^,$d ,"
382 while read -r d BRANCH REV UPSTREAM TEXT; do
383 if [ x"$BRANCH" = x"`repobranch "$d"`" ]; then
388 UPSTREAM=${UPSTREAM#\[}
389 UPSTREAM=${UPSTREAM%\]}
390 UPSTREAM=${UPSTREAM%:*}
393 TEXT="$UPSTREAM $TEXT"
397 if [ x"$REV" = x"->" ]; then
400 BRANCH=${BRANCH#remotes/}
401 ID=`echo "$BRANCH" | tr -c "A-Za-z0-9." "_"`
402 branches_list="$branches_list $BRANCH" # TEH SORT MAKEZ IT UNIEQ
403 eval "r=\$branches_repos_$ID"
412 eval "branches_repos_$ID=\$r"
414 echo -n "$branches_list" | xargs -n 1 echo | sort -u | while IFS= read -r BRANCH; do
415 ID=`echo "$BRANCH" | tr -c "A-Za-z0-9." "_"`
416 eval "r=\$branches_repos_$ID"
417 printf "%-60s %s\n" "$BRANCH" "$r"
424 dv=`visible_repo_name "$d"`
425 enter "$d0/$d" verbose
426 r=`git symbolic-ref HEAD`
428 if git log HEAD..origin/"`repobranch "$d"`" | grep .; then
429 # we have uncommitted changes
430 if yesno "Could merge from \"`repobranch "$d"`\" into \"$r\" in $dv. Do it?"; then
431 if ! verbose git merge origin/"`repobranch "$d"`"; then
432 check_mergeconflict "$d"
433 exit 1 # this should ALWAYS be fatal
443 dv=`visible_repo_name "$d"`
444 enter "$d0/$d" verbose
445 r=`git symbolic-ref HEAD`
447 diffdata=`git diff --color HEAD`
448 if [ -n "$diffdata" ]; then
449 # we have uncommitted changes
450 if yesno "Uncommitted changes in \"$r\" in $dv. Commit?" 'echo "$diffdata" | less -r'; then
451 verbose git commit -a
454 rem=`git config "branch.$r.remote" || echo origin`
455 bra=`git config "branch.$r.merge" || echo "$r"`
456 upstream="$rem/${bra#refs/heads/}"
457 if ! git rev-parse "$upstream" >/dev/null 2>&1; then
458 upstream="origin/`repobranch "$d"`"
460 logdata=`git log --color "$upstream".."$r"`
461 if [ -n "$logdata" ]; then
462 if yesno "Push \"$r\" in $dv?" 'echo "$logdata" | less -r'; then
463 verbose git push "$rem" HEAD
466 if [ x"$submit" = x"-s" ]; then
469 verbose git push "$rem" HEAD:"${bra%%/*}/finished/${bra#*/}"
477 if [ -n "$WE_HATE_OUR_USERS" ]; then
478 TARGETS="sv-debug cl-debug"
479 if [ -z "$CC" ]; then
482 elif [ x"`uname`" = x"Darwin" ]; then
485 TARGETS="sv-debug cl-debug sdl-debug"
488 # AGL cannot be compiled on systems with a kernel > 10.x (Snow Leopard)
489 TARGETS="sv-debug sdl-debug"
492 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"
494 TARGETS="sv-debug cl-debug sdl-debug"
512 cleanqc=true # version info
515 if [ $# -gt 0 ] && [ x"$1" = x"" ]; then
516 # if we give the command make the arg "", it will surely fail (invalid filename),
517 # so better handle it as an empty client option
520 elif [ -n "$1" ]; then
522 TARGETS_SAVE=$TARGETS
527 TARGETS="$TARGETS sdl-debug"
530 TARGETS="$TARGETS cl-debug"
533 TARGETS="$TARGETS sv-debug"
536 BAD_TARGETS="$BAD_TARGETS $X"
540 if [ -n "$TARGETS" ]; then # at least a valid client
542 else # no valid client, let's assume this option is not meant to be a client then
543 TARGETS=$TARGETS_SAVE
547 if [ -z "$MAKEFLAGS" ]; then
548 if [ -f /proc/cpuinfo ]; then
549 ncpus=$((`grep -c '^processor :' /proc/cpuinfo`+0))
550 if [ $ncpus -gt 1 ]; then
556 MAKEFLAGS="$MAKEFLAGS DP_LINK_TO_LIBJPEG=1"
559 if [ -n "$WE_HATE_OUR_USERS" ]; then
560 MAKEFLAGS="$MAKEFLAGS DP_MAKE_TARGET=mingw"
564 enter "$d0/fteqcc" verbose
566 verbose make $MAKEFLAGS clean
568 verbose make $MAKEFLAGS
570 enter "$d0/data/xonotic-data.pk3dir" verbose
572 verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" "$@" $MAKEFLAGS clean
574 verbose make FTEQCC="$d0/fteqcc/fteqcc.bin" "$@" $MAKEFLAGS
576 enter "$d0/darkplaces" verbose
577 if [ x"$BAD_TARGETS" = x" " ]; then
578 echo "Warning: invalid empty client, default clients will be used."
581 verbose make $MAKEFLAGS clean
583 for T in $TARGETS; do
584 verbose make $MAKEFLAGS "$@" "$T"
586 for T in $BAD_TARGETS; do
587 echo "Warning: discarded invalid client $T."
590 verbose "$SELF" update-maps
593 if [ -n "$WE_HATE_OUR_USERS" ]; then
595 export PATH="$d0/misc/buildfiles/win64:$d0/misc/buildfiles/win32:$PATH"
596 elif [ x"`uname`" = x"Darwin" ]; then
597 export DYLD_LIBRARY_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS"
598 export DYLD_FRAMEWORK_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks"
604 sdl|glx|agl|dedicated)
613 if ! [ -x "darkplaces/darkplaces$client" ]; then
614 if [ -x "darkplaces/darkplaces$client.exe" ]; then
617 echo "Client darkplaces/darkplaces$client not found, aborting"
621 set -- "darkplaces/darkplaces$client" -nexuiz -customgamename Xonotic -customgamedirname1 data -customgamedirname2 "" -customgamescreenshotname xonotic -customgameuserdirname xonotic -mygames "$@"
623 # if pulseaudio is running: USE IT
624 if [ -z "$SDL_AUDIODRIVER" ] && ! [ -n "$WE_HATE_OUR_USERS" ] && ! [ x"`uname`" = x"Darwin" ]; then
625 if ps -C pulseaudio >/dev/null; then
626 if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then
627 export SDL_AUDIODRIVER=pulse
632 if [ -n "$USE_GDB" ]; then
633 set -- gdb --args "$@"
639 if [ x"$1" = x"-k" ]; then
644 if verbose cd "$d0/$d"; then
656 patchdir=`mktemp -d -t save-patches.XXXXXX`
658 enter "$d0/$d" verbose
659 git branch -v -v | cut -c 3- | {
661 while read -r BRANCH REV UPSTREAM TEXT; do
664 UPSTREAM=${UPSTREAM#\[}
665 UPSTREAM=${UPSTREAM%\]}
666 UPSTREAM=${UPSTREAM%:*}
670 UPSTREAM=origin/"`repobranch "$d"`"
674 if [ x"$REV" = x"->" ]; then
677 if git format-patch -o "$patchdir/$i" "$UPSTREAM".."$BRANCH"; then
678 echo "$d" > "$patchdir/$i/info.txt"
679 echo "$BRANCH" >> "$patchdir/$i/info.txt"
680 echo "$UPSTREAM" >> "$patchdir/$i/info.txt"
681 echo "$TRACK" >> "$patchdir/$i/info.txt"
684 rm -rf "$patchdir/$i"
689 ( cd "$patchdir" && tar cvzf - . ) > "$outfile"
694 patchdir=`mktemp -d -t restore-patches.XXXXXX`
695 ( cd "$patchdir" && tar xvzf - ) < "$infile"
697 for P in "$patchdir"/*/info.txt; do
704 verbose git checkout HEAD^0
705 verbose git branch -D "$BRANCH"
706 if [ x"$TRACK" = x"true" ]; then
707 verbose git checkout --track -b "$BRANCH" "$UPSTREAM"
709 verbose git branch -b "$BRANCH" "$UPSTREAM"
721 report=$report"$*$LF"
726 report=$report" $*$LF"
731 o=`"$@" | sed 's/^/ /' || true`
735 enter "$d0/$d" verbose
736 base="`repobranch "$d"`"
738 for ref in `git for-each-ref --format='%(refname)' refs/remotes/origin/`; do
739 case "${ref#refs/remotes/origin/}" in
752 if [ -n "$branch" ]; then
753 if [ x"$branch" != x"${ref#refs/remotes/origin/}" ]; then
762 l0=`git rev-list "$base".."$ref" | wc -l`
763 l1=`git rev-list master.."$ref" | wc -l`
764 if [ $l0 -gt $l1 ]; then
771 reportecho " Branch $ref:"
772 note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
773 logdata=`git log --color "$realbase".."$ref"`
774 if [ -z "$logdata" ]; then
775 reportecho4 "--> not merging, no changes vs master"
776 if yesno "Branch \"$ref\" probably should get deleted. Do it?" ''; then
777 git push origin :"${ref#refs/remotes/origin/}"
778 reportecho4 "--> branch deleted"
781 diffdata=`git diff --color --find-copies-harder --ignore-space-change "$realbase"..."$ref"`
782 if [ -z "$diffdata" ]; then
783 reportecho4 "--> not merging, no changes vs master, branch contains redundant history"
784 if yesno "Branch \"$ref\" probably should get deleted. Do it?" '{ echo "$logdata"; } | less -r'; then
785 git push origin :"${ref#refs/remotes/origin/}"
786 reportecho4 "--> branch deleted"
788 elif [ -z "$branch" ] && [ -n "$note" ]; then
789 reportdo4 echo "$note"
790 reportecho4 "--> not merging, already had this one rejected before"
791 elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ echo "$logdata"; echo "$diffdata"; } | less -r'; then
792 git checkout "$realbase"
793 org=`git rev-parse HEAD`
794 if ! git merge --no-ff "$ref" 2>&1 | tee "$t" && ! { git ls-files -u | grep ' 1 ' >/dev/null; }; then
795 git reset --hard "$org"
796 GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Merge failed:$LF`cat "$t"`" "$ref"
798 reportecho4 "--> merge failed"
799 elif ! "$SELF" compile -n 2>&1 | tee "$t"; then
800 git reset --hard "$org"
801 GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Compile failed:$LF`cat "$t"`" "$ref"
803 reportecho4 "--> compile failed"
804 elif ! yesno "Still merge \"$ref\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then
805 git reset --hard "$org"
806 GIT_NOTES_REF=refs/notes/admin-merge git notes edit "$ref"
807 note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
808 if [ x"$note" = x"del" ]; then
809 git push origin :"${ref#refs/remotes/origin/}"
810 reportecho4 "--> test failed, branch deleted"
811 elif [ -n "$note" ]; then
812 reportdo4 echo "$note"
813 reportecho4 "--> test failed"
815 reportecho4 "--> test failed, postponed"
819 case ",`repoflags "$d"`," in
821 # we do quite a mess here... luckily we know $org
822 git fetch # svn needs to be current
823 git rebase -i --onto origin/master "$org"
824 git svn dcommit --add-author-from
825 git reset --hard "$org"
831 reportecho4 "--> MERGED"
832 if yesno "Delete original branch \"$ref\"?"; then
833 git push origin :"${ref#refs/remotes/origin/}"
834 reportecho4 "--> branch deleted"
838 GIT_NOTES_REF=refs/notes/admin-merge git notes edit "$ref"
839 note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
840 if [ x"$note" = x"del" ]; then
841 git push origin :"${ref#refs/remotes/origin/}"
842 reportecho4 "--> branch deleted"
843 elif [ -n "$note" ]; then
844 reportdo4 echo "$note"
845 reportecho4 "--> rejected"
847 reportecho4 "--> postponed"
856 echo "$report" | ssh nexuiz@rm.endoftheinternet.org cat '>>' public_html/xonotic-merge-notes.txt
859 # release building goes here
861 #"$SELF" each git clean -fxd
864 git archive --format=tar HEAD -- Docs misc server xonotic-linux-glx.sh xonotic-linux-sdl.sh misc/buildfiles | {
868 rm -rf misc/builddeps
869 mv misc/buildfiles/win32/* .
870 mv misc/buildfiles/win64/* .
871 mv misc/buildfiles/osx/* .
872 rm -rf misc/buildfiles
882 case " $HOSTS_THAT_ARE_MYSELF " in
884 rsync --delete -zvaSHPAX "$srcdir"/ "$buildpath/"
887 eval make clean $maketargets $makeflags
889 for f in $targetfiles; do
890 mv "$buildpath/${f%:*}" "${f##*:}"
894 rsync --delete -zvaSHPAX "$srcdir"/ "$host:$buildpath/"
895 ssh "$host" ". ~/.profile && cd $buildpath && make clean $maketargets $makeflags"
896 for f in $targetfiles; do
897 rsync -zvaSHPAX "$host:$buildpath/${f%:*}" "${f##*:}"
905 fteqcc_maketargets=$3
907 darkplaces_maketargets=$5
909 "$SELF" release-compile-run "xonotic-build-$suffix" /tmp/fteqcc.build."$suffix" "$fteqcc_maketargets" "$makeflags" "fteqcc" "$fteqcc_files"
910 "$SELF" release-compile-run "xonotic-build-$suffix" /tmp/Darkplaces.build."$suffix" "$darkplaces_maketargets" "$makeflags" "darkplaces" "$darkplaces_files"
912 release-engine-win32)
913 "$SELF" release-compile win32 \
914 '"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"' \
915 win 'fteqcc.exe:Xonotic/fteqcc/fteqcc.exe' \
916 debug 'darkplaces.exe:xonotic.exe darkplaces-sdl.exe:xonotic-sdl.exe darkplaces-dedicated.exe:xonotic-dedicated.exe'
918 release-engine-win64)
919 "$SELF" release-compile win64 \
920 '"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=""' \
921 win 'fteqcc.exe:Xonotic/fteqcc/fteqcc-64.exe' \
922 debug 'darkplaces.exe:xonotic-64.exe darkplaces-sdl.exe:xonotic-sdl-64.exe darkplaces-dedicated.exe:xonotic-dedicated-64.exe'
925 "$SELF" release-compile osx \
926 '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"' \
927 all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.osx' \
928 sdl-debug 'darkplaces-sdl:Xonotic/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl-bin'
930 release-engine-linux32)
931 "$SELF" release-compile linux32 \
932 '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' \
933 all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux32' \
934 debug 'darkplaces-glx:Xonotic/xonotic-linux-linux32-glx darkplaces-sdl:Xonotic/xonotic-linux32-sdl darkplaces-dedicated:Xonotic/xonotic-linux32-dedicated'
936 release-engine-linux64)
937 "$SELF" release-compile linux64 \
938 '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' \
939 all 'fteqcc.bin:Xonotic/fteqcc/fteqcc.linux64' \
940 debug 'darkplaces-glx:Xonotic/xonotic-linux-linux64-glx darkplaces-sdl:Xonotic/xonotic-linux64-sdl darkplaces-dedicated:Xonotic/xonotic-linux64-dedicated'
943 "$SELF" release-engine-win32 &
944 "$SELF" release-engine-win64 &
945 "$SELF" release-engine-osx &
946 "$SELF" release-engine-linux32 &
947 "$SELF" release-engine-linux64 &
952 for X in data/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
954 cd Xonotic/data/xonotic-maps.pk3dir
961 # version numnber and stuff like that
964 verbose make -C data/xonotic-data.pk3dir FTEQCC="$d0/Xonotic/fteqcc/fteqcc.linux32" FTEQCCFLAGS_WATERMARK=
966 release-buildpk3-transform-raw)
969 release-buildpk3-transform-normal)
972 # texture: convert to jpeg and dds
974 export jpeg_qual_rgb=95
975 export jpeg_qual_a=99
979 find textures -type f -print0 | xargs -0 "$d0"/misc/tools/cached-converter.sh
981 release-buildpk3-transform-low)
984 # texture: convert to jpeg and dds
985 # music: reduce bitrate
987 export jpeg_qual_rgb=95
988 export jpeg_qual_a=99
992 find textures sound/cdtracks -type f -print0 | xargs -0 "$d0"/misc/tools/cached-converter.sh
1006 mkdir -p Xonotic/temp
1009 git archive --format=tar HEAD
1014 if [ x"$src" = x"data/xonotic-data.pk3dir" ]; then
1015 cp "$src"/progs.dat Xonotic/temp/
1016 cp "$src"/csprogs.dat Xonotic/temp/
1017 cp "$src"/menu.dat Xonotic/temp/
1019 "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
1021 zip -9r "../../$dst" . ########### 7za a -tzip -mx=9 "../../$dst" .
1028 while [ "$#" -gt 1 ]; do
1029 "$SELF" release-buildpk3 "$src" "Xonotic/${src%.pk3dir}$2.pk3" "$1"
1035 "$SELF" release-buildpk3s data/font-dejavu.pk3dir raw ''
1036 "$SELF" release-buildpk3s data/xonotic-data.pk3dir normal '' raw '-raw' low '-low'
1037 "$SELF" release-buildpk3s data/xonotic-maps.pk3dir normal '' raw '-raw' low '-low'
1038 "$SELF" release-buildpk3s data/xonotic-music.pk3dir normal '' raw '-raw' low '-low'
1039 "$SELF" release-buildpk3s data/xonotic-nexcompat.pk3dir low ''
1042 "$SELF" release-prepare
1043 "$SELF" release-engine
1044 "$SELF" release-maps
1045 "$SELF" release-finish
1047 "$SELF" release-pack
1054 echo " $SELF push [-s]"
1055 echo " $SELF branches"
1056 echo " $SELF branch [<remote>] <branchname>"
1057 echo " $SELF branch <remote> <branchname> <srcbranchname>"
1058 echo " $SELF checkout [<remote>] <branchname>"
1059 echo " $SELF compile [-c|-n] [<client>] <options>"
1060 echo " $SELF run [<client>] <options>"
1061 echo " $SELF each <command>"