Skip to content

Commit

Permalink
Merge pull request #3314 from Sonicadvance1/more_installscript
Browse files Browse the repository at this point in the history
Scripts: More changes to InstallFEX script
  • Loading branch information
Sonicadvance1 authored Dec 7, 2023
2 parents 0fe5e3d + 8f52d8e commit b613576
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Scripts/InstallFEX.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,19 +306,19 @@ def GetRootFSPath():
return _RootFSPath

def CheckRootFSInstallStatus():
# Matches what is available on https://rootfs.fex-emu.gg/RootFS_links.json
UbuntuVersionToRootFS = {
"20.04": "Ubuntu_20_04.sqsh",
"20.04": "Ubuntu_20_04.ero",
"22.04": "Ubuntu_22_04.sqsh",
"22.04": "Ubuntu_22_04.ero",
"22.10": "Ubuntu_22_10.sqsh",
"22.10": "Ubuntu_22_10.ero",
"23.04": "Ubuntu_23_04.sqsh",
"23.04": "Ubuntu_23_04.ero",
}

return os.path.exists(GetRootFSPath() + UbuntuVersionToRootFS[GetDistro()[1]])
Distro = GetDistro()[1] # Extract Ubuntu version number, e.g. "23.10"

DistroUnderscore = Distro.replace(".", "_")
Filename = "Ubuntu_{}.ero".format(DistroUnderscore)
if os.path.exists(GetRootFSPath() + Filename):
return True

Filename = "Ubuntu_{}.sqsh".format(DistroUnderscore)
if os.path.exists(GetRootFSPath() + Filename):
return True

# Couldn't find. Either no rootfs installed or unsupported distro.
return False

def TryInstallRootFS():
DidInstall = False
Expand Down

0 comments on commit b613576

Please sign in to comment.