@echo off\r
\r
+cd %~dp0\r
+\r
+del /s /y %TEMP%\xonotic-rsync-updater\r
+mkdir %TEMP%\xonotic-rsync-updater\r
+for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\\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
+if exist ..\..\..\.git goto xonoticdatagit\r
+if exist ..\..\..\data goto xonoticdata\r
goto xonotic\r
:xonoticlow\r
-set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
-set target=Xonotic-low/\r
-goto endxonotic\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
+ set url=rsync://beta.xonotic.org/autobuild-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
+: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
+ goto end\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
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
+ goto endxonoticdata\r
+:xonoticdatalowfuzzy\r
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic-low/\r
+ set options=%options% -y\r
+ goto endxonoticdata\r
+:xonoticdatahigh\r
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/\r
+ goto endxonoticdata\r
+:xonoticdatahighfuzzy\r
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic-high/\r
+ set options=%options% -y\r
+ goto endxonoticdata\r
+:xonoticdatanormal\r
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
+ goto endxonoticdata\r
+:xonoticdatanormalfuzzy\r
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
+ set options=%options% -y\r
+ goto endxonoticdata\r
+:endxonoticdata\r
+ set target=./\r
+ goto endxonotic\r
:xonotic\r
-set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
-set target=Xonotic/\r
-goto endxonotic\r
+ set url=rsync://beta.xonotic.org/autobuild-Xonotic/\r
+ set target=Xonotic/\r
+ goto endxonotic\r
:endxonotic\r
\r
set excludes=\r
+if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit\r
set excludes=%excludes% --exclude=/xonotic-linux*\r
set excludes=%excludes% --exclude=/xonotic-osx-*\r
set excludes=%excludes% --exclude=/Xonotic*.app\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
+ if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit\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
+ 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
+del /s /y %TEMP%\xonotic-rsync-updater\r
+mkdir %TEMP%\xonotic-rsync-updater\r
+for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\\r
+%TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target%\r
+%TEMP%\xonotic-rsync-updater\chmod -R a+x %target%\r
+\r
+:end\r
+del /s /y %TEMP%\xonotic-rsync-updater\r
pause\r