Merge branch 'master' of ssh://git.xonotic.org/xonotic

This commit is contained in:
Rudolf Polzer 2010-06-28 14:27:41 +02:00
commit 0c0cb62b5c
3 changed files with 61 additions and 28 deletions

29
all
View File

@ -617,29 +617,7 @@ case "$cmd" in
rm -rf "$patchdir"
;;
admin-merge)
if [ "$#" = 1 ]; then
set -- "${1%%/*}" "${1#*/}"
fi
for d in $repos; do
enter "$d0/$d" verbose
git rev-parse "$1/$2" || continue
# 1. review
{
git log HEAD.."$1/$2"
git diff HEAD..."$1/$2"
} | less
if yesno "Merge \"$1/$2\" into `git symbolic-ref HEAD` of $d?"; then
git merge "$1/$2"
if "$SELF" compile && yesno "Still merge \"$1/$2\" into `git symbolic-ref HEAD` of $d? Maybe you want to test first."; then
git push origin HEAD
git push "$1" :"$2"
else
git reset --hard HEAD@{1}
fi
fi
done
;;
admin-merge-2)
branch=$1
t=`mktemp`
report=""
reportecho()
@ -675,6 +653,11 @@ case "$cmd" in
continue
;;
esac
if [ -n "$branch" ]; then
if [ x"$branch" != x"${ref#refs/remotes/origin/}" ]; then
continue
fi
fi
reportecho " Branch $ref:"
note=`GIT_NOTES_REF=refs/notes/admin-merge git notes show "$ref" 2>/dev/null || true`
logdata=`git log --color "$base".."$ref"`

View File

@ -7,10 +7,20 @@ set -e
: ${jpeg_qual_rgb:=95}
: ${jpeg_qual_a:=99}
: ${do_dds:=true}
: ${dds_flags:=}
: ${dds_tool:=compressonator-dxtc}
: ${do_ogg:=false}
: ${ogg_qual:=1}
me=$0
case "$me" in
*/*)
meprefix=${me%/*}/
;;
*)
meprefix=
;;
esac
tmpdir=`mktemp -d -t cached-converter.XXXXXX`
trap 'exit 1' INT
trap 'rm -rf "$tmpdir"' EXIT
@ -47,7 +57,7 @@ cached()
else
rm -f "$tempfile1"
rm -f "$tempfile2"
exit 1
exit 1
fi
}
@ -57,7 +67,7 @@ reduce_jpeg2_dds()
ia=$1; shift
o=$1; shift; shift
convert "$i" "$ia" -compose CopyOpacity -composite "$tmpdir/x.png" && \
nvcompress -alpha -bc3 $1 "$tmpdir/x.png" "$o"
"$meprefix"compress-texture "$dds_tool" dxt5 "$tmpdir/x.png" "$o" $1
}
reduce_jpeg2_jpeg2()
@ -89,7 +99,7 @@ reduce_rgba_dds()
{
i=$1; shift; shift
o=$1; shift; shift
nvcompress -alpha -bc3 $1 "$i" "$o"
"$meprefix"compress-texture "$dds_tool" dxt5 "$i" "$o" $1
}
reduce_rgba_jpeg2()
@ -107,7 +117,7 @@ reduce_rgb_dds()
{
i=$1; shift; shift
o=$1; shift; shift
nvcompress -bc1 $1 "$i" "$o"
"$meprefix"compress-texture "$dds_tool" dxt1 "$i" "$o" $1
}
reduce_rgb_jpeg()

40
misc/tools/compress-texture Executable file
View File

@ -0,0 +1,40 @@
#!/bin/sh
# usage: compress-texture tool compression in.png out.dds
# example: compress-texture compressonator dxt1 foo.jpg foo.dds
tool=$1; shift
format=$1; shift
src=$1; shift
dst=$1; shift
c=
f=
case "$tool" in
compressonator-dxtc|compressonator-atic)
case "$tool" in
*-dxtc) c="-codec DXTC.dll" ;;
*-atic) c="-codec ATICompressor.dll" ;;
esac
case "$format" in
dxt1) f="+fourCC DXT1" ;;
dxt3) f="+fourCC DXT3" ;;
dxt5) f="+fourCC DXT5" ;;
esac
dir=`mktemp -d "$HOME/.wine/drive_c/compressonator.XXXXXX"`
dir_dos="C:/${dir##*/}"
ext=${src##*.}
cp "$src" "$dir/src.$ext"
DISPLAY= wine "$HOME/.wine/drive_c/Program Files/AMD/The Compressonator 1.50/TheCompressonator.exe" -convert -mipmaps "$dir_dos/src.$ext" "$dir_dos/dst.dds" $c $f "$@" -mipper BoxFilter.dll
mv "$dir/dst.dds" "$dst"
rm -rf "$dir"
;;
nvcompress)
case "$format" in
dxt1) f="-bc1" ;;
dxt3) f="-alpha -bc3" ;;
dxt5) f="-alpha -bc5" ;;
esac
nvcompress $f "$@" "$src" "$dst"
;;
esac