@echo off :main cls echo +-----------------------------------------------------------------------------+ echo ^| ^| echo ^| SDL 2 Installer for Teeworlds 0.7 Trunk ^| echo ^| ^| echo +-----------------------------------------------------------------------------+ echo +-----------------------------------------------------------------------------+ echo ^| ^| echo ^| ^| echo ^| Options Available: ^| echo ^| ^| echo ^| d - Downloads the SDL. This is also the default option if Enter is Pressed. ^| echo ^| i - Installs the SDL, if you already downloaded one. ^| echo ^| c - Complete installation of SDL. (Download AND install) ^| echo ^| r - Removes all temporary file and folder. ^| echo ^| a - Shows you all informations about this script. ^| echo ^| ^| echo ^| ^| echo ^| ^| echo +-----------------------------------------------------------------------------+ echo +-----------------------------------------------------------------------------+ echo ^| ^| echo ^| Please enter your choice. ^| echo ^| ^| set /p choice=+-----------------------------------------------------------------------------+ if /I "%choice%"=="d" (goto :download) if /I "%choice%"=="i" (goto :install) if /I "%choice%"=="c" (goto :complete) if /I "%choice%"=="r" (goto :remove) if /I "%choice%"=="a" (goto :info) :download if exist "%cd%\tempdl" ( if exist "%cd%\tempdl\SDL2.zip" ( cls echo File already Downloaded! timeout 3 >nul cls goto :main ) else ( cls bitsadmin.exe /transfer "Downloading SDL2, please wait..." https://www.libsdl.org/release/SDL2-2.0.4.zip "%cd%\tempdl\SDL2.zip" cls echo Download complete! echo Press any key to continue. timeout 3 >nul cls goto :main ) ) else ( if not exist "%cd%\tempdl" mkdir "%cd%\tempdl" goto :download ) :install cls if exist "%cd%\tempdl\SDL2.zip" ( echo Extracting zip files, please wait... "%ProgramFiles%\7-Zip\7z.exe" e -y "%cd%/tempdl/SDL2.zip" -o"%cd%/other/sdl" rmdir /S /Q "%cd%/tempdl" echo Done. echo Press any key to continue. timeout 3 >nul cls goto :main ) else ( cls echo No file found! timeout 3 >nul cls goto :main ) :complete if exist "%cd%\tempdl" ( if exist "%cd%\tempdl\SDL2.zip" ( cls goto :install ) else ( cls bitsadmin.exe /transfer "Downloading SDL2, please wait..." https://www.libsdl.org/release/SDL2-2.0.4.zip "%cd%\tempdl\SDL2.zip" cls echo Download complete! echo Press any key to continue. timeout 3 >nul cls goto :main ) ) else ( if not exist "%cd%\tempdl" mkdir "%cd%\tempdl" bitsadmin.exe /transfer "Downloading SDL2, please wait..." https://www.libsdl.org/release/SDL2-2.0.4.zip "%cd%\tempdl\SDL2.zip" cls echo Download complete! timeout 3 >nul cls echo Extracting zip files, please wait... "%ProgramFiles%\7-Zip\7z.exe" e -y "%cd%/tempdl/SDL2.zip" -o"%cd%/other/sdl" rmdir /S /Q "%cd%/tempdl" echo Done. echo Press any key to continue. timeout 3 >nul cls goto :main ) :remove cls if exist "%cd%\tempdl" ( echo Removing files... rmdir /S /Q "%cd%/tempdl" echo All files successfully removed. Press any key to continue. timeout 3 >nul cls goto :main ) if not exist "%cd%\tempdl" ( echo No files to remove found! timeout 3 >nul cls goto :main ) :info cls echo +-----------------------------------------------------------------------------+ echo ^| ^| echo ^| SDL 2 Installer for Teeworlds 0.7 Trunk ^| echo ^| ^| echo +-----------------------------------------------------------------------------+ echo +-----------------------------------------------------------------------------+ echo ^| ^| echo ^| SDL 2 Installer for Teeworlds 0.7 Trunk was made by Blade, for all ^| echo ^| modders out there, who are sick of doing it manualy thereself each and ^| echo ^| every time. ^| echo ^| ^| echo ^| This script uses basic Batch commands, as well as the 7-Zip File Manager ^| echo ^| and LibSDL. ^| echo ^| ^| echo ^| Links : www.7-zip.org www.libsdl.org ^| echo ^| ^| echo ^| This tool is free to use as well as to share, but please give credit. ^| echo ^| ^| echo +-----------------------------------------------------------------------------+ echo +-----------------------------------------------------------------------------+ echo ^| ^| echo ^| Press any key to continue. ^| echo ^| ^| echo +-----------------------------------------------------------------------------+ timeout 30 >nul goto :main