diff --git a/alternative-install/README.md b/alternative-install/README.md new file mode 100644 index 00000000..bc86bb5d --- /dev/null +++ b/alternative-install/README.md @@ -0,0 +1,2 @@ +To create an installer from this, bat2exe from https://www.bat2exe.net/ and run it on this directory. +You'll end up with an exe file which people can use to install / run. diff --git a/alternative-install/RLBotGUI.bat b/alternative-install/RLBotGUI.bat new file mode 100644 index 00000000..ea686577 --- /dev/null +++ b/alternative-install/RLBotGUI.bat @@ -0,0 +1,43 @@ +@echo off + +echo Installing RLBotGUI if necessary, then launching! + +py -3.7 --version + +rem If python 3.7 is not installed, then the above py command will cause a non-zero error level. + +if %ERRORLEVEL% GTR 0 ( + + rem Download a python installer from python.org. + + if not exist python-install.exe ( + mkdir %LocalAppData%\RLBotGUIX\ + powershell -Command "Invoke-WebRequest https://www.python.org/ftp/python/3.7.7/python-3.7.7-amd64.exe -OutFile %LocalAppData%\RLBotGUIX\python-installer.exe" + ) + + rem Go ahead and install the specific version of python we want. + rem We have selected options which will not modify the user's PATH + rem If the user already has 3.7 installed but the py command was not available or could not find it, + rem the installation will be modified, which will probably not cause trouble for anyone. + + %LocalAppData%\RLBotGUIX\python-installer.exe /passive InstallAllUsers=0 Shortcuts=0 Include_doc=0 Include_dev=0 Include_launcher=1 InstallLauncherAllUsers=0 PrependPath=0 +) + +rem Create a virtual environment which will isolate our package installations from any +rem existing python installation that the user may have. + +if not exist %LocalAppData%\RLBotGUIX\venv\Scripts\python.exe ( + py -3.7 -m venv %LocalAppData%\RLBotGUIX\venv +) + +set rlbotpy=%LocalAppData%\RLBotGUIX\venv\Scripts\python.exe + +rem Install and / or upgrade RLBot components + +%rlbotpy% -m pip install --upgrade pip +%rlbotpy% -m pip install eel +%rlbotpy% -m pip install --upgrade rlbot_gui rlbot + +rem Launch the GUI + +%rlbotpy% -c "from rlbot_gui import gui; gui.start()" diff --git a/alternative-install/rlbot.ico b/alternative-install/rlbot.ico new file mode 100644 index 00000000..9cb5f152 Binary files /dev/null and b/alternative-install/rlbot.ico differ