Windows users:
-Double click update-xonotic.bat and wait for the download to complete.
+Double click update-to-{build}.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
+Change to this directory in a terminal, then run ./update-to-{build}.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.
+update-to-autobuild means updating to the latest nightly beta build of Xonotic.
+update-to-stable means updating to the latest stable release build of Xonotic.
+
+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!
+By default those are:
+On Windows the "C:\users\%userprofile%\Saved Games\xonotic\data\" folder
+On Linux or Mac the "~/.xonotic/data/" directory
+
-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.
+Secret trick: if you create any file/directory named "Xonotic-high"
+in this directory before running the updater, this script will
+download Xonotic with uncompressed textures. Otherwise it will
+download regular Xonotic. To change from Xonotic-high to regular
+create any file/directory named "Xonotic" and run the script again.
\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
if exist ..\..\..\.git goto xonoticdatagit\r
+if exist Xonotic goto xonoticswitchtonormal\r
+if exist Xonotic-high goto xonoticswitchtohigh\r
if exist ..\..\..\data goto xonoticdata\r
goto xonotic\r
-:xonoticlow\r
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
- set target=Xonotic-low/\r
- goto endxonotic\r
-:xonotichigh\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
- set target=Xonotic-high/\r
- goto endxonotic\r
:xonoticdatagit\r
echo NOTE: this is a git repository download. Using the regular update method.\r
..\..\..\all update\r
goto end\r
+:xonoticswitchtohigh\r
+ set PATH=misc\tools\rsync-updater;%PATH%\r
+ cd ..\..\..\r
+ if exist misc\tools\rsync-updater\rsync.exe goto xonoticdatahighfuzzy\r
+ echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
+ goto end\r
+:xonoticswitchtonormal\r
+ set PATH=misc\tools\rsync-updater;%PATH%\r
+ cd ..\..\..\r
+ if exist misc\tools\rsync-updater\rsync.exe goto xonoticdatanormalfuzzy\r
+ echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
+ goto end\r
:xonoticdata\r
if exist ..\..\..\misc\tools\rsync-updater\rsync.exe goto xonoticdatarsync\r
echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
:xonoticdatarsync\r
set PATH=misc\tools\rsync-updater;%PATH%\r
cd ..\..\..\r
- if exist data\xonotic-rsync-data-low.pk3 goto xonoticdatalow\r
- if exist data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy\r
if exist data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh\r
if exist data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy\r
if exist data\xonotic-rsync-data.pk3 goto xonoticdatanormal\r
if exist data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy\r
echo FATAL: unrecognized Xonotic build. This update script cannot be used.\r
goto end\r
-:xonoticdatalow\r
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
- goto endxonoticdata\r
-:xonoticdatalowfuzzy\r
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
- set options=%options% -y\r
- goto endxonoticdata\r
:xonoticdatahigh\r
set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
goto endxonoticdata\r
#!/bin/sh
-if [ -d "${0%/*}" ]; then
- cd "${0%/*}"
-fi
+cd "${0%/*}" || exit 1
-if ! which rsync >/dev/null; then
+if ! which rsync > /dev/null; then
echo >&2 "FATAL: rsync not found, please install the rsync package"
exit 1
fi
-[ "$1" = "-y" ] && choice=y
+if [ "$1" = "-y" ] || [ "$1" = "--yes" ]; then
+ choice=y
+fi
until [ "$choice" = y ] || [ "$choice" = Y ]; do
- read -rp "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]? " choice
+ printf "This script will DELETE any custom files in the Xonotic folder. Do you want to continue [Y/N]? "
+ read -r choice
[ "$choice" = n ] || [ "$choice" = N ] && exit 1
done
options="-Prtzil --executability --delete-after --delete-excluded --stats"
-if [ -d "Xonotic-low" ]; then
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
- target="Xonotic-low/"
-elif [ -d "Xonotic-high" ]; then
- url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
- target="Xonotic-high/"
-elif [ -d "../../../.git" ]; then
+if [ -d "../../../.git" ]; then
echo >&2 "NOTE: this is a git repository download. Using the regular update method."
exec ../../../all update
+elif [ -e "Xonotic" ]; then
+ echo "found manually created 'Xonotic' file"
+ echo "targetting the normal $buildtype version"
+ url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
+ target="../../.."
+ options="$options -y" # use fuzzy matching because file names may differ
+elif [ -e "Xonotic-high" ]; then
+ echo "found manually created 'Xonotic-high' file"
+ echo "targetting the high $buildtype version"
+ url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
+ target="../../.."
+ options="$options -y" # use fuzzy matching because file names may differ
elif [ -d "../../../data" ]; then
- if [ -f ../../../data/xonotic-rsync-data-low.pk3 ]; then
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
- elif [ -f ../../../data/xonotic-*-data-low.pk3 ]; then
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.
- url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
- options="$options -y" # use fuzzy matching because file names differ
- elif [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
+ if [ -f ../../../data/xonotic-rsync-data-high.pk3 ]; then
+ echo "found rsync high data files"
+ echo "targetting the high $buildtype version"
url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
elif [ -f ../../../data/xonotic-*-data-high.pk3 ]; then
+ echo "found release high data files"
+ echo "targetting the high $buildtype version"
url="rsync://beta.xonotic.org/$buildtype-Xonotic-high/"
options="$options -y" # use fuzzy matching because file names differ
elif [ -f ../../../data/xonotic-rsync-data.pk3 ]; then
+ echo "found Xonotic rsync data files"
+ echo "targetting the normal $buildtype version"
url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
elif [ -f ../../../data/xonotic-*-data.pk3 ]; then
+ echo "found Xonotic release data files"
+ echo "targetting the normal $buildtype version"
url="rsync://beta.xonotic.org/$buildtype-Xonotic/"
options="$options -y" # use fuzzy matching because file names differ
else
excludes=
if [ -z "$XONOTIC_INCLUDE_ALL" ]; then
excludes="$excludes --exclude=/*.exe"
- excludes="$excludes --exclude=/gmqcc/*.exe"
excludes="$excludes --exclude=/bin32"
excludes="$excludes --exclude=/*.dll"
excludes="$excludes --exclude=/bin64"
- case `uname`:`uname -m` in
+ case $(uname):$(uname -m) in
Darwin:*)
excludes="$excludes --exclude=/xonotic-linux*"
- excludes="$excludes --exclude=/gmqcc/gmqcc.linux*"
;;
Linux:x86_64)
excludes="$excludes --exclude=/Xonotic*.app"
excludes="$excludes --exclude=/xonotic-osx-*"
- excludes="$excludes --exclude=/gmqcc/gmqcc.osx"
- excludes="$excludes --exclude=/xonotic-linux32-*"
- excludes="$excludes --exclude=/gmqcc/gmqcc.linux32"
;;
*)
- echo >&2 "WARNING: Could not detect architecture - downloading all architectures"
+ printf >&2 "\e[1;31m"
+ printf >&2 "WARNING: Could not detect architecture\n"
+ printf >&2 "WARNING: Xonotic does NOT provide pre-built %s executables\n" "$(uname):$(uname -m)"
+ printf >&2 "WARNING: Please run make. More info is available at\n"
+ printf >&2 "WARNING: \e[1;36mhttps://gitlab.com/xonotic/xonotic/-/wikis/Compiling\e[m\n"
+ excludes="$excludes --exclude=/Xonotic*.app"
+ excludes="$excludes --exclude=/xonotic-osx-*"
+ excludes="$excludes --exclude=/xonotic-linux64-*"
;;
esac
fi
\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
if exist ..\..\..\.git goto xonoticdatagit\r
if exist ..\..\..\data goto xonoticdata\r
+if exist Xonotic goto xonoticswitchtonormal\r
+if exist Xonotic-high goto xonoticswitchtohigh\r
goto xonotic\r
-:xonoticlow\r
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
- set target=Xonotic-low/\r
- goto endxonotic\r
-:xonotichigh\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
- set target=Xonotic-high/\r
- goto endxonotic\r
:xonoticdatagit\r
echo NOTE: this is a git repository download. Using the regular update method.\r
..\..\..\all update\r
goto end\r
+:xonoticswitchtohigh\r
+ set PATH=misc\tools\rsync-updater;%PATH%\r
+ cd ..\..\..\r
+ if exist misc\tools\rsync-updater\rsync.exe goto xonoticdatahighfuzzy\r
+ echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
+ goto end\r
+:xonoticswitchtonormal\r
+ set PATH=misc\tools\rsync-updater;%PATH%\r
+ cd ..\..\..\r
+ if exist misc\tools\rsync-updater\rsync.exe goto xonoticdatanormalfuzzy\r
+ echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
+ goto end\r
:xonoticdata\r
if exist ..\..\..\misc\tools\rsync-updater\rsync.exe goto xonoticdatarsync\r
echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
:xonoticdatarsync\r
set PATH=misc\tools\rsync-updater;%PATH%\r
cd ..\..\..\r
- if exist data\xonotic-rsync-data-low.pk3 goto xonoticdatalow\r
- if exist data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy\r
if exist data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh\r
if exist data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy\r
if exist data\xonotic-rsync-data.pk3 goto xonoticdatanormal\r
if exist data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy\r
echo FATAL: unrecognized Xonotic build. This update script cannot be used.\r
goto end\r
-:xonoticdatalow\r
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
- goto endxonoticdata\r
-:xonoticdatalowfuzzy\r
- echo NOTE: Xonotic-low is gone, downloading normal Xonotic.\r
- set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
- set options=%options% -y\r
- goto endxonoticdata\r
:xonoticdatahigh\r
set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
goto endxonoticdata\r