]> git.xonotic.org Git - xonotic/xonotic.git/commitdiff
xonotic autobuild downloader: add the base scripts
authorRudolf Polzer <divverent@xonotic.org>
Fri, 11 Nov 2011 08:23:50 +0000 (09:23 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 11 Nov 2011 08:23:50 +0000 (09:23 +0100)
misc/tools/rsync-updater/README.txt [new file with mode: 0644]
misc/tools/rsync-updater/chmod.exe [new file with mode: 0644]
misc/tools/rsync-updater/cyggcc_s-1.dll [new file with mode: 0644]
misc/tools/rsync-updater/cygiconv-2.dll [new file with mode: 0644]
misc/tools/rsync-updater/cygintl-8.dll [new file with mode: 0644]
misc/tools/rsync-updater/cygwin1.dll [new file with mode: 0644]
misc/tools/rsync-updater/rsync.exe [new file with mode: 0644]
misc/tools/rsync-updater/update-xonotic.bat [new file with mode: 0644]
misc/tools/rsync-updater/update-xonotic.sh [new file with mode: 0755]

diff --git a/misc/tools/rsync-updater/README.txt b/misc/tools/rsync-updater/README.txt
new file mode 100644 (file)
index 0000000..39d6881
--- /dev/null
@@ -0,0 +1,19 @@
+Windows users:
+Double click update-xonotic.bat and wait for the download to complete.
+
+Linux/OSX users:
+Change to this directory in a terminal, then run ./update-xonotic.sh and wait
+for the download to complete.
+
+Redoing this step at a later time will only download the changes since last
+time. Note that any changes inside the Xonotic directory will be overwritten.
+Do your changes in the directory that has the config.cfg file!
+
+Secret trick: if you create a directory Xonotic-low in this directory before
+running the updater (or later, if you rename the Xonotic directory the updater
+created to Xonotic-low), this script will download the low version of Xonotic.
+If you create a directory Xonotic-high in this directory before running the
+updater (or later, if you rename the Xonotic directory the updater created to
+Xonotic-high), it will download the HQ version! If none of the two exists, it
+will download regular Xonotic. Only one version of the game can be managed by
+this script.
diff --git a/misc/tools/rsync-updater/chmod.exe b/misc/tools/rsync-updater/chmod.exe
new file mode 100644 (file)
index 0000000..052da99
Binary files /dev/null and b/misc/tools/rsync-updater/chmod.exe differ
diff --git a/misc/tools/rsync-updater/cyggcc_s-1.dll b/misc/tools/rsync-updater/cyggcc_s-1.dll
new file mode 100644 (file)
index 0000000..fd5df87
Binary files /dev/null and b/misc/tools/rsync-updater/cyggcc_s-1.dll differ
diff --git a/misc/tools/rsync-updater/cygiconv-2.dll b/misc/tools/rsync-updater/cygiconv-2.dll
new file mode 100644 (file)
index 0000000..e4d7b95
Binary files /dev/null and b/misc/tools/rsync-updater/cygiconv-2.dll differ
diff --git a/misc/tools/rsync-updater/cygintl-8.dll b/misc/tools/rsync-updater/cygintl-8.dll
new file mode 100644 (file)
index 0000000..18c5082
Binary files /dev/null and b/misc/tools/rsync-updater/cygintl-8.dll differ
diff --git a/misc/tools/rsync-updater/cygwin1.dll b/misc/tools/rsync-updater/cygwin1.dll
new file mode 100644 (file)
index 0000000..3db37e7
Binary files /dev/null and b/misc/tools/rsync-updater/cygwin1.dll differ
diff --git a/misc/tools/rsync-updater/rsync.exe b/misc/tools/rsync-updater/rsync.exe
new file mode 100644 (file)
index 0000000..f147bf1
Binary files /dev/null and b/misc/tools/rsync-updater/rsync.exe differ
diff --git a/misc/tools/rsync-updater/update-xonotic.bat b/misc/tools/rsync-updater/update-xonotic.bat
new file mode 100644 (file)
index 0000000..1b02da0
--- /dev/null
@@ -0,0 +1,49 @@
+@echo off\r
+\r
+set options=-Prtzil --executability --delete-after --delete-excluded --stats\r
+\r
+if exist Xonotic-low goto xonoticlow\r
+if exist Xonotic-high goto xonotichigh\r
+goto xonotic\r
+:xonoticlow\r
+set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
+set target=Xonotic-low/\r
+goto endxonotic\r
+:xonotichigh\r
+set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/\r
+set target=Xonotic-high/\r
+goto endxonotic\r
+:xonotic\r
+set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
+set target=Xonotic/\r
+goto endxonotic\r
+:endxonotic\r
+\r
+set excludes=\r
+set excludes=%excludes% --exclude=/xonotic-linux*\r
+set excludes=%excludes% --exclude=/xonotic-osx-*\r
+set excludes=%excludes% --exclude=/Xonotic*.app\r
+set excludes=%excludes% --exclude=/fteqcc/fteqcc.linux*\r
+set excludes=%excludes% --exclude=/fteqcc/fteqcc.osx\r
+\r
+if "%ProgramFiles(x86)%" == "" goto bit32\r
+:bit64\r
+set excludes=%excludes% --exclude=/xonotic.exe\r
+set excludes=%excludes% --exclude=/xonotic-sdl.exe\r
+set excludes=%excludes% --exclude=/xonotic-dedicated.exe\r
+set excludes=%excludes% --exclude=/fteqcc/fteqcc.exe\r
+set excludes=%excludes% --exclude=/bin32\r
+set excludes=%excludes% --exclude=/*.dll\r
+goto endbit\r
+:bit32\r
+set excludes=%excludes% --exclude=/xonotic-x64.exe\r
+set excludes=%excludes% --exclude=/xonotic-x64-sdl.exe\r
+set excludes=%excludes% --exclude=/xonotic-x64-dedicated.exe\r
+set excludes=%excludes% --exclude=/fteqcc/fteqcc-x64.exe\r
+set excludes=%excludes% --exclude=/bin64\r
+goto endbit\r
+:endbit\r
+\r
+rsync %options% %excludes% %url% %target%\r
+chmod -R a+x %target%\r
+pause\r
diff --git a/misc/tools/rsync-updater/update-xonotic.sh b/misc/tools/rsync-updater/update-xonotic.sh
new file mode 100755 (executable)
index 0000000..4cd2af2
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+if ! which rsync >/dev/null; then
+       echo >&2 "FATAL: rsync not found, please install the rsync package"
+       exit 1
+fi
+
+options="-Prtzil --executability --delete-after --delete-excluded --stats"
+
+if [ -d "Xonotic-low" ]; then
+       url="rsync://beta.xonotic.org/autobuild-Xonotic-low/"
+       target="Xonotic-low/"
+elif [ -d "Xonotic-high" ]; then
+       url="rsync://beta.xonotic.org/autobuild-Xonotic-high/"
+       target="Xonotic-high/"
+else
+       url="rsync://beta.xonotic.org/autobuild-Xonotic/"
+       target="Xonotic/"
+fi
+
+excludes=
+excludes="$excludes --exclude=/*.exe"
+excludes="$excludes --exclude=/fteqcc/*.exe"
+excludes="$excludes --exclude=/bin32"
+excludes="$excludes --exclude=/*.dll"
+excludes="$excludes --exclude=/bin64"
+
+case `uname`:`uname -m` in
+       Darwin:*)
+               excludes="$excludes --exclude=/xonotic-linux*"
+               excludes="$excludes --exclude=/fteqcc/fteqcc.linux*"
+               ;;
+       Linux:x86_64)
+               excludes="$excludes --exclude=/Xonotic*.app"
+               excludes="$excludes --exclude=/xonotic-osx-*"
+               excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
+               excludes="$excludes --exclude=/xonotic-linux32-*"
+               excludes="$excludes --exclude=/fteqcc/fteqcc.linux32"
+               ;;
+       Linux:i?86)
+               excludes="$excludes --exclude=/Xonotic*.app"
+               excludes="$excludes --exclude=/xonotic-osx-*"
+               excludes="$excludes --exclude=/fteqcc/fteqcc.osx"
+               excludes="$excludes --exclude=/xonotic-linux64-*"
+               excludes="$excludes --exclude=/fteqcc/fteqcc.linux64"
+               ;;
+       *)
+               echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
+               ;;
+esac
+
+rsync $options $excludes "$url" "$target"