From: Rudolf Polzer Date: Fri, 20 Aug 2010 12:23:54 +0000 (+0200) Subject: Merge branch 'master' into divVerent/crypto2 X-Git-Tag: xonotic-v0.1.0preview~125^2~63 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=5050382ea259ff33953768a43e9c341960e34c1d;hp=bf4f35d6d29c8c3e3d726554b12332a8a86856fb Merge branch 'master' into divVerent/crypto2 Conflicts: all --- diff --git a/all b/all index 2bc1bf9b..64a28e58 100755 --- a/all +++ b/all @@ -251,7 +251,7 @@ case "$cmd" in verbose git config remote.origin.url "$url" verbose git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - verbose git config remote.origin.autocrlf input + verbose git config core.autocrlf input r=`git symbolic-ref HEAD` r=${r#refs/heads/} @@ -286,6 +286,11 @@ case "$cmd" in misc/tools/xonotic-map-compiler-autobuild download ;; checkout|switch) + checkoutflags= + if [ x"$1" = x"-f" ]; then + checkoutflags=-f + shift + fi remote=$1 branch=$2 if [ -z "$branch" ]; then @@ -306,18 +311,18 @@ case "$cmd" in b=$branch if [ -n "$b" ] && git rev-parse "refs/heads/$b" >/dev/null 2>&1; then exists=true - verbose git checkout "$b" + verbose git checkout $checkoutflags "$b" elif [ -n "$b" ] && git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then exists=true - verbose git checkout --track -b "$b" "$remote/$b" + verbose git checkout $checkoutflags --track -b "$b" "$remote/$b" else b=`repobranch "$d"` if git rev-parse "refs/heads/$b" >/dev/null 2>&1; then exists=true - verbose git checkout "$b" + verbose git checkout $checkoutflags "$b" elif git rev-parse "refs/remotes/$remote/$b" >/dev/null 2>&1; then exists=true - verbose git checkout --track -b "$b" "$remote/$b" + verbose git checkout $checkoutflags --track -b "$b" "$remote/$b" else echo "WTF? Not even branch $b doesn't exist in $d" exit 1 @@ -556,13 +561,8 @@ case "$cmd" in MAKEFLAGS=-j$ncpus fi fi - case "`uname`" in - Linux|*BSD) - MAKEFLAGS="$MAKEFLAGS DP_LINK_TO_LIBJPEG=1" - ;; - esac if [ -n "$WE_HATE_OUR_USERS" ]; then - MAKEFLAGS="$MAKEFLAGS DP_MAKE_TARGET=mingw" + MAKEFLAGS="$MAKEFLAGS DP_MAKE_TARGET=mingw LIB_JPEG= CFLAGS_LIBJPEG=" fi fi @@ -607,7 +607,7 @@ case "$cmd" in run) if [ -n "$WE_HATE_OUR_USERS" ]; then client= - export PATH="$d0/misc/buildfiles/win64:$d0/misc/buildfiles/win32:$d0/d0_blind_id/.libs:$PATH" + export PATH="$d0/misc/buildfiles/win32:$d0/d0_blind_id/.libs:$PATH" elif [ x"`uname`" = x"Darwin" ]; then export DYLD_LIBRARY_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS:$d0/d0_blind_id/.libs" export DYLD_FRAMEWORK_PATH="$d0/misc/buildfiles/osx/Xonotic-SDL.app/Contents/Frameworks" @@ -807,7 +807,7 @@ case "$cmd" in elif yesno "Branch \"$ref\" may want to get merged. Do it?" '{ echo "$logdata"; echo "$diffdata"; } | less -r'; then git checkout "$realbase" org=`git rev-parse HEAD` - if ! git merge --no-ff "$ref" 2>&1 | tee "$t" && ! { git ls-files -u | grep ' 1 ' >/dev/null; }; then + if ! git merge --no-ff "$ref" 2>&1 | tee "$t" && ! { git ls-files -u | grep ' 1 ' >/dev/null; }; then git reset --hard "$org" GIT_NOTES_REF=refs/notes/admin-merge git notes edit -m "Merge failed:$LF`cat "$t"`" "$ref" reportdo4 cat "$t" @@ -984,39 +984,40 @@ case "$cmd" in ;; release-engine-win32) verbose "$SELF" release-compile win32 \ - 'STRIP=: DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -g -Wl,--dynamicbase -Wl,--nxcompat -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"' \ + 'STRIP=: DP_MAKE_TARGET=mingw CC="i586-mingw32msvc-gcc -g -Wl,--dynamicbase -Wl,--nxcompat -I$HOME/dp.win32/include -L$HOME/dp.win32/lib" WINDRES="i586-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win32/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) verbose "$SELF" release-compile win64 \ - 'STRIP=: DP_MAKE_TARGET=mingw CC="amd64-mingw32msvc-gcc -g -Wl,--dynamicbase -Wl,--nxcompat -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=""' \ + 'STRIP=: DP_MAKE_TARGET=mingw CC="amd64-mingw32msvc-gcc -g -Wl,--dynamicbase -Wl,--nxcompat -I$HOME/dp.win64/include -L$HOME/dp.win64/lib" WINDRES="amd64-mingw32msvc-windres" SDL_CONFIG="$HOME/dp.win64/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-sdl-x64.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated-x64.exe' + 'sv-release cl-release' 'darkplaces.exe:Xonotic/xonotic-x64.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated-x64.exe' + # release 'darkplaces.exe:Xonotic/xonotic-x64.exe darkplaces-sdl.exe:Xonotic/xonotic-sdl-x64.exe darkplaces-dedicated.exe:Xonotic/xonotic-dedicated-x64.exe' ;; release-engine-osx) # 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$HOME/dp.osx/include -L$HOME/dp.osx/lib -fno-reorder-blocks"' \ + 'STRIP=: CC="gcc -g -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -I$HOME/dp.osx/include -L$HOME/dp.osx/lib -fno-reorder-blocks" LIB_JPEG= CFLAGS_LIBJPEG=' \ 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-osx-dedicated' ;; release-engine-linux32) verbose "$SELF" release-compile linux32 \ - 'STRIP=: 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' \ + 'STRIP=: 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 LIB_JPEG=$HOME/dp.linux32/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 -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' \ + 'STRIP=: 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 LIB_JPEG=$HOME/dp.linux64/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-win64 verbose "$SELF" release-engine-osx verbose "$SELF" release-engine-win32 - # verbose "$SELF" release-engine-win64 verbose "$SELF" release-engine-linux32 verbose "$SELF" release-engine-linux64 ;; @@ -1187,14 +1188,12 @@ case "$cmd" in verbose zip -0yr Xonotic-$stamp-low.zip \ Xonotic/data/xonotic-$stamp-data-low.pk3 \ Xonotic/data/xonotic-$stamp-maps-low.pk3 \ - Xonotic/data/xonotic-$stamp-music-low.pk3 \ - Xonotic/data/xonotic-$stamp-nexcompat.pk3 + Xonotic/data/xonotic-$stamp-music-low.pk3 verbose cp Xonotic-$stamp-common.zip Xonotic-$stamp-lowdds.zip verbose zip -0yr Xonotic-$stamp-lowdds.zip \ Xonotic/data/xonotic-$stamp-data-lowdds.pk3 \ Xonotic/data/xonotic-$stamp-maps-lowdds.pk3 \ - Xonotic/data/xonotic-$stamp-music-low.pk3 \ - Xonotic/data/xonotic-$stamp-nexcompat.pk3 + Xonotic/data/xonotic-$stamp-music-low.pk3 verbose mv Xonotic-$stamp-common.zip Xonotic-$stamp-high.zip verbose zip -0yr Xonotic-$stamp-high.zip \ Xonotic/data/xonotic-$stamp-data-raw.pk3 \ diff --git a/misc/buildfiles/win64/SDL.dll b/misc/buildfiles/win64/SDL.dll new file mode 100644 index 00000000..5d25cd9b Binary files /dev/null and b/misc/buildfiles/win64/SDL.dll differ diff --git a/misc/buildfiles/win64/libcurl-4.dll b/misc/buildfiles/win64/libcurl-4.dll new file mode 100644 index 00000000..44740201 Binary files /dev/null and b/misc/buildfiles/win64/libcurl-4.dll differ diff --git a/misc/buildfiles/win64/libfreetype-6.dll b/misc/buildfiles/win64/libfreetype-6.dll new file mode 100644 index 00000000..050ff170 Binary files /dev/null and b/misc/buildfiles/win64/libfreetype-6.dll differ diff --git a/misc/buildfiles/win64/libjpeg.dll b/misc/buildfiles/win64/libjpeg.dll new file mode 100644 index 00000000..a7440c40 Binary files /dev/null and b/misc/buildfiles/win64/libjpeg.dll differ diff --git a/misc/buildfiles/win64/libmodplug-1.dll b/misc/buildfiles/win64/libmodplug-1.dll new file mode 100644 index 00000000..e19b19da Binary files /dev/null and b/misc/buildfiles/win64/libmodplug-1.dll differ diff --git a/misc/buildfiles/win64/libogg.dll b/misc/buildfiles/win64/libogg.dll new file mode 100644 index 00000000..fcf71527 Binary files /dev/null and b/misc/buildfiles/win64/libogg.dll differ diff --git a/misc/buildfiles/win64/libpng14.dll b/misc/buildfiles/win64/libpng14.dll new file mode 100644 index 00000000..a0787e2f Binary files /dev/null and b/misc/buildfiles/win64/libpng14.dll differ diff --git a/misc/buildfiles/win64/libtheora.dll b/misc/buildfiles/win64/libtheora.dll new file mode 100644 index 00000000..fe78cd5b Binary files /dev/null and b/misc/buildfiles/win64/libtheora.dll differ diff --git a/misc/buildfiles/win64/libvorbis.dll b/misc/buildfiles/win64/libvorbis.dll new file mode 100644 index 00000000..e0a34d3d Binary files /dev/null and b/misc/buildfiles/win64/libvorbis.dll differ diff --git a/misc/buildfiles/win64/libvorbisfile.dll b/misc/buildfiles/win64/libvorbisfile.dll new file mode 100644 index 00000000..cb8aca52 Binary files /dev/null and b/misc/buildfiles/win64/libvorbisfile.dll differ diff --git a/misc/buildfiles/win64/vorbisenc.dll b/misc/buildfiles/win64/vorbisenc.dll new file mode 100644 index 00000000..513a5f5e Binary files /dev/null and b/misc/buildfiles/win64/vorbisenc.dll differ diff --git a/misc/buildfiles/win64/zlib1.dll b/misc/buildfiles/win64/zlib1.dll new file mode 100644 index 00000000..dd9a376d Binary files /dev/null and b/misc/buildfiles/win64/zlib1.dll differ diff --git a/misc/tools/cached-converter.sh b/misc/tools/cached-converter.sh index ccbe0bb8..72f427c7 100755 --- a/misc/tools/cached-converter.sh +++ b/misc/tools/cached-converter.sh @@ -105,8 +105,10 @@ reduce_ogg_ogg() { i=$1; shift; shift o=$1; shift; shift + tags=`vorbiscomment -R -l "$i"` oggdec -o "$tmpdir/x.wav" "$i" && \ oggenc -q"$1" -o "$o" "$tmpdir/x.wav" + echo "$tags" | vorbiscomment -R -w "$o" } reduce_wav_ogg() @@ -175,6 +177,7 @@ for F in "$@"; do will_jpeg=$do_jpeg will_dds=$do_dds case "$f" in + *_bump) will_dds=false ;; ./models/player/*) will_dds=false ;; ./textures/*) ;; ./models/*) ;; diff --git a/misc/tools/git-pk3-import b/misc/tools/git-pk3-import new file mode 100755 index 00000000..ee081d48 --- /dev/null +++ b/misc/tools/git-pk3-import @@ -0,0 +1,133 @@ +#!/bin/sh + +# git-pk3-import: Import a PK3 into a branch of a bare Git repo. + +set -x + +# Helpers + +die() +{ + echo "$(basename "$0"): error: $*" >&2 + exit 1 +} + +usage() +{ + cat < /dev/null +} + +# Clean up on exit + +cleanup_index= +cleanup_worktree= + +cleanup() +{ + [ "$cleanup_index" ] && rm -f "$GIT_INDEX_FILE" + [ "$cleanup_worktree" ] && find "$GIT_WORK_TREE" -mindepth 1 -delete +} + +trap cleanup EXIT + +# Set up index file, makes testing easier +[ -z "$GIT_INDEX_FILE" ] && { + export GIT_INDEX_FILE="$GIT_DIR/pk3-import-index" + cleanup_index=t +} + +# Extract the PK3 (the -n suppresses prompting in an edge case) +unzip -n -qq "$pk3path" -d "$GIT_WORK_TREE" || +die "couldn't extract PK3 contents" +cleanup_worktree=t + +# Note the refs and the common ancestor +master=refs/heads/master +ref=refs/heads/$branch +base=$(git merge-base $master $ref 2> /dev/null) || +base=$master + +# Figure out the parent commit +parent=\ +$(git rev-parse --verify -q $ref || git rev-parse --verify -q $base) || +die "couldn't determine parent commit" + +# Read the tree at base into index +git read-tree $base || +die "couldn't initialize index" + +# Reject any modified files, the mapper should create a branch instead +[ -z "$(git diff-files --diff-filter=M)" ] || +die "found changes to files in master" + +# Force reading of .gitignore files from cache, not the work tree +git ls-files --cached -z | +grep -z '\.gitignore$' | +git update-index --skip-worktree -z --stdin || +die "couldn't set up exclude patterns from index" + +# Add untracked files; to filter out generated files such as BSP, add +# them to .gitignore and push, --exclude-standard (and the above hack) +# takes care of the rest +git ls-files --exclude-standard -o -z | +git update-index --add -z --stdin || +die "couldn't add files to index" + +# Check if the index contains changes against parent +git diff-index --cached --quiet $parent && +die "found no changes to commit" + +# Commit the index and point the ref to the new commit +tree=$(git write-tree) && +commit=$(message | git commit-tree $tree -p $parent) && +git update-ref -m "pk3-import: $pk3name" $ref $commit || +die "couldn't commit changes" diff --git a/misc/tools/git-pk3-merge b/misc/tools/git-pk3-merge new file mode 100755 index 00000000..69e8298c --- /dev/null +++ b/misc/tools/git-pk3-merge @@ -0,0 +1,97 @@ +#!/bin/sh + +# git-pk3-merge: Attempt a trivial merge of master in a bare repo. + +set -x + +# Helpers + +die() +{ + echo "$(basename "$0"): error: $*" >&2 + exit 1 +} + +usage() +{ + cat < /dev/null) || +die "couldn't determine the common ancestor" + +# Figure out the parent commits +parent1=$(git rev-parse --verify -q $ref) && +parent2=$(git rev-parse --verify -q $master) || +die "couldn't determine parent commits" + +# Attempt a trivial merge +git read-tree -i -m --aggressive --trivial $base $ref $master || +die "couldn't do a trivial merge" + +# Check if the index contains changes against parent +git diff-index --cached --quiet $parent1 && +die "found no changes to commit" + +# Commit the index and point the ref to the new commit +tree=$(git write-tree) && +commit=$(message | git commit-tree $tree -p $parent1 -p $parent2) && +git update-ref -m "pk3-merge" $ref $commit || +die "couldn't commit merge" diff --git a/misc/tools/normalmap.sh b/misc/tools/normalmap.sh new file mode 100755 index 00000000..08ca0fae --- /dev/null +++ b/misc/tools/normalmap.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# usage: ./bump2norm.sh foo_bump.tga foo_norm.tga +# NOTE: unfortunately requires X-server (otherwise file-tga-save won't work... no joke) + +in=$1 +out=$2 + +# env variables you can set: +# filter: +# Filter type (0 = 4 sample, 1 = sobel 3x3, 2 = sobel 5x5, 3 = prewitt 3x3, 4 = prewitt 5x5, 5-8 = 3x3,5x5,7x7,9x9) +# minz: +# Minimun Z (0 to 1) +# scale: +# Scale (>0) +# heightsource: +# Height source (0 = average RGB, 1 = alpha channel) +# conv: +# Conversion (0 = none, 1 = Biased RGB, 2 = Red, 3 = Green, 4 = Blue, 5 = Max RGB, 6 = Min RGB, 7 = Colorspace) +: ${filter:=0} +: ${minz:=0} +: ${scale:=1} +: ${heightsource:=0} +: ${conv:=0} + +gimp -i -b - < .gitattributes +git add .gitattributes +find "$NEXLOC" -type f | while IFS= read -r L; do + L0=${L#$NEXLOC/} + echo "$UP$L0$KILL" >&2 + LR=`rewrite "$L0"` + if wantfile "$L0"; then + newhash=`cd "$NEXLOC"; git rev-parse ":data/$L0"` + if oldhash=`git rev-parse ":$LR" 2>/dev/null`; then + if [ x"$oldhash" != x"$newhash" ]; then + echo "$UP""U $LR$LF" + cp "$L" "$LR" + git add "$LR" + fi + else + echo "$UP""A $LR$LF" + mkdir -p "$LR" + rmdir "$LR" + cp "$L" "$LR" + git add "$LR" + fi + fi +done + +git status +#git commit diff --git a/misc/tools/xonotic-map-compiler-autobuild b/misc/tools/xonotic-map-compiler-autobuild index 8f3f4aa0..c2d7fe6b 100755 --- a/misc/tools/xonotic-map-compiler-autobuild +++ b/misc/tools/xonotic-map-compiler-autobuild @@ -173,10 +173,10 @@ case "$1" in git for-each-ref 'refs/remotes' | while read -r HASH TYPE REFNAME; do git reset --hard git clean -xfd - git checkout "$HASH" + git checkout -f "$HASH" allmaps buildthemap "$REFNAME" "$HASH" "$url" "$bspoutdir" done - git checkout master + git checkout -f master ;; download) mkdir -p "$bspdir" "$bspdir.old"