RLBot / RLBotGUI

33 stars 25 forks source link

Fix ping command in installer #219

Closed ddthj closed 11 months ago

ddthj commented 1 year ago

We use the ping command in a batch script to check if the user has an internet connection before installing/upgrading RLBot. Some users do not have ping installed on their machines, so RLBot fails to run for them.

Replace the ping command in the batch script with a Python script or tiny executable to check for an internet connection and install/upgrade RLBot.

https://github.com/RLBot/RLBotGUI/blob/ccd4506a58b89b99d5ea500ae7ff319f2bc9a8da/alternative-install/RLBotGUI.bat#L38

VirxEC commented 1 year ago

Possible solutions when using Python: https://stackoverflow.com/questions/3764291/how-can-i-see-if-theres-an-available-and-active-network-connection-in-python

NicEastvillage commented 1 year ago

My roommate suggests the error may happen because the user has tweaked their system variables. Lamp has previously resolved the issue by adding system32 to PATH, indicating that this is the cause. ping should be on all Windows computers, so we can just use the absolute path instead or %WINDIR%\system32\ping.

TangilJ commented 11 months ago

Closing as this has been fixed: https://github.com/RLBot/gui-installer/blob/ab3e3f1b9e9a7102acb93657a5671446f2b685d2/RLBotGUIX%20main%20exe/RLBotGUIX.bat#L24