]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/rsync-updater/update-to-release.bat
Remove support for the glx binary.
[xonotic/xonotic.git] / misc / tools / rsync-updater / update-to-release.bat
1 @echo off\r
2 \r
3 if "%1" == "did-copy" goto copied\r
4 cd %~dp0\r
5 rmdir /s /q %TEMP%\xonotic-rsync-updater\r
6 mkdir %TEMP%\xonotic-rsync-updater\r
7 for %%f in (*.exe *.dll *.bat) do copy /b %%f %TEMP%\xonotic-rsync-updater\\r
8 %TEMP%\xonotic-rsync-updater\%~n0 did-copy\r
9 exit\r
10 \r
11 :copied\r
12 \r
13 set buildtype=release\r
14 if "%~n0" == "update-to-autobuild" set buildtype=autobuild\r
15 \r
16 set options=-Prtzil --executability --delete-after --delete-excluded --stats\r
17 \r
18 if exist Xonotic-low goto xonoticlow\r
19 if exist Xonotic-high goto xonotichigh\r
20 if exist ..\..\..\.git goto xonoticdatagit\r
21 if exist ..\..\..\data goto xonoticdata\r
22 goto xonotic\r
23 :xonoticlow\r
24         set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/\r
25         set target=Xonotic-low/\r
26         goto endxonotic\r
27 :xonotichigh\r
28         set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
29         set target=Xonotic-high/\r
30         goto endxonotic\r
31 :xonoticdatagit\r
32         echo NOTE: this is a git repository download. Using the regular update method.\r
33         ..\..\..\all update\r
34         goto end\r
35 :xonoticdata\r
36         if exist ..\..\..\misc\tools\rsync-updater\rsync.exe goto xonoticdatarsync\r
37         echo FATAL: rsync not in misc\tools\rsync-updater. This update script cannot be used.\r
38         goto end\r
39 :xonoticdatarsync\r
40         set PATH=misc\tools\rsync-updater;%PATH%\r
41         cd ..\..\..\r
42         if exist data\xonotic-rsync-data-low.pk3 goto xonoticdatalow\r
43         if exist data\xonotic-*-data-low.pk3 goto xonoticdatalowfuzzy\r
44         if exist data\xonotic-rsync-data-high.pk3 goto xonoticdatahigh\r
45         if exist data\xonotic-*-data-high.pk3 goto xonoticdatahighfuzzy\r
46         if exist data\xonotic-rsync-data.pk3 goto xonoticdatanormal\r
47         if exist data\xonotic-*-data.pk3 goto xonoticdatanormalfuzzy\r
48         echo FATAL: unrecognized Xonotic build. This update script cannot be used.\r
49         goto end\r
50 :xonoticdatalow\r
51                 set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/\r
52                 goto endxonoticdata\r
53 :xonoticdatalowfuzzy\r
54                 set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-low/\r
55                 set options=%options% -y\r
56                 goto endxonoticdata\r
57 :xonoticdatahigh\r
58                 set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
59                 goto endxonoticdata\r
60 :xonoticdatahighfuzzy\r
61                 set url=rsync://beta.xonotic.org/%buildtype%-Xonotic-high/\r
62                 set options=%options% -y\r
63                 goto endxonoticdata\r
64 :xonoticdatanormal\r
65                 set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
66                 goto endxonoticdata\r
67 :xonoticdatanormalfuzzy\r
68                 set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
69                 set options=%options% -y\r
70                 goto endxonoticdata\r
71 :endxonoticdata\r
72         set target=./\r
73         goto endxonotic\r
74 :xonotic\r
75         set url=rsync://beta.xonotic.org/%buildtype%-Xonotic/\r
76         set target=Xonotic/\r
77         goto endxonotic\r
78 :endxonotic\r
79 \r
80 set excludes=\r
81 if not "%XONOTIC_INCLUDE_ALL%" == "" goto endbit\r
82 set excludes=%excludes% --exclude=/xonotic-linux*\r
83 set excludes=%excludes% --exclude=/xonotic-osx-*\r
84 set excludes=%excludes% --exclude=/Xonotic*.app\r
85 set excludes=%excludes% --exclude=/gmqcc/gmqcc.linux*\r
86 set excludes=%excludes% --exclude=/gmqcc/gmqcc.osx\r
87 \r
88 if "%ProgramFiles(x86)%" == "" goto bit32\r
89 :bit64\r
90         if not "%XONOTIC_INCLUDE_32BIT%" == "" goto endbit\r
91         set excludes=%excludes% --exclude=/xonotic-x86.exe\r
92         set excludes=%excludes% --exclude=/xonotic-x86-dedicated.exe\r
93         set excludes=%excludes% --exclude=/gmqcc/gmqcc.exe\r
94         set excludes=%excludes% --exclude=/bin32\r
95         set excludes=%excludes% --exclude=/*.dll\r
96         goto endbit\r
97 :bit32\r
98         set excludes=%excludes% --exclude=/xonotic.exe\r
99         set excludes=%excludes% --exclude=/xonotic-dedicated.exe\r
100         set excludes=%excludes% --exclude=/gmqcc/gmqcc-x64.exe\r
101         set excludes=%excludes% --exclude=/bin64\r
102         goto endbit\r
103 :endbit\r
104 \r
105 for %%f in (*.exe *.dll) do copy /b %%f %TEMP%\xonotic-rsync-updater\\r
106 %TEMP%\xonotic-rsync-updater\rsync %options% %excludes% %url% %target%\r
107 %TEMP%\xonotic-rsync-updater\chmod -R a+x %target%\r
108 \r
109 :end\r
110 pause\r
111 rmdir /s /q %TEMP%\xonotic-rsync-updater\r