File tree Expand file tree Collapse file tree 2 files changed +44
-4
lines changed Expand file tree Collapse file tree 2 files changed +44
-4
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
1
3
@ rem Change the working directory to the location of this file so that relative paths will work
2
4
cd /D " %~dp0 "
3
5
4
- @ rem You will automatically get updates for all versions starting with "0.0.".
5
- python -m pip install rlbot== 0.0.* --upgrade
6
+ setlocal EnableDelayedExpansion
7
+
8
+ @ rem Run the is_safe_to_upgrade function and save the output to a temp file.
9
+ python -c " from rlbot.utils import public_utils; print(public_utils.is_safe_to_upgrade());" > %temp% \is_safe_to_upgrade.txt
10
+
11
+ IF %ERRORLEVEL% NEQ 0 (
12
+ @ rem The python command failed, so rlbot is probably not installed at all. Safe to 'upgrade'.
13
+ set is_safe_to_upgrade = True
14
+ ) ELSE (
15
+ @ rem read the file containing the python output.
16
+ set /p is_safe_to_upgrade = < %temp% \is_safe_to_upgrade.txt
17
+ )
18
+ del %temp% \is_safe_to_upgrade.txt
19
+
20
+ IF " !is_safe_to_upgrade! " == " True" (
21
+ @ rem You will automatically get updates for all versions starting with "0.0.".
22
+ python -m pip install rlbot== 0.0.* --upgrade
23
+ ) ELSE (
24
+ echo Will not attempt to upgrade rlbot because files are in use.
25
+ )
6
26
7
27
python -c " from rlbot.gui.qt_root import RLBotQTGui; RLBotQTGui.main();"
Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
1
3
@ rem Change the working directory to the location of this file so that relative paths will work
2
4
cd /D " %~dp0 "
3
5
4
- @ rem You will automatically get updates for all versions starting with "0.0.".
5
- python -m pip install rlbot== 0.0.* --upgrade
6
+ setlocal EnableDelayedExpansion
7
+
8
+ @ rem Run the is_safe_to_upgrade function and save the output to a temp file.
9
+ python -c " from rlbot.utils import public_utils; print(public_utils.is_safe_to_upgrade());" > %temp% \is_safe_to_upgrade.txt
10
+
11
+ IF %ERRORLEVEL% NEQ 0 (
12
+ @ rem The python command failed, so rlbot is probably not installed at all. Safe to 'upgrade'.
13
+ set is_safe_to_upgrade = True
14
+ ) ELSE (
15
+ @ rem read the file containing the python output.
16
+ set /p is_safe_to_upgrade = < %temp% \is_safe_to_upgrade.txt
17
+ )
18
+ del %temp% \is_safe_to_upgrade.txt
19
+
20
+ IF " !is_safe_to_upgrade! " == " True" (
21
+ @ rem You will automatically get updates for all versions starting with "0.0.".
22
+ python -m pip install rlbot== 0.0.* --upgrade
23
+ ) ELSE (
24
+ echo Will not attempt to upgrade rlbot because files are in use.
25
+ )
6
26
7
27
python -c " from rlbot import runner; runner.main();"
You can’t perform that action at this time.
0 commit comments