Skip to content

Commit

Permalink
backend: Remove SteamManager
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEvilSkeleton committed Jan 22, 2025
1 parent 982fb6f commit 8b7d34e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 666 deletions.
24 changes: 0 additions & 24 deletions bottles/backend/managers/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from bottles.backend.managers.importer import ImportManager
from bottles.backend.managers.installer import InstallerManager
from bottles.backend.managers.library import LibraryManager
from bottles.backend.managers.steam import SteamManager
from bottles.backend.managers.template import TemplateManager
from bottles.backend.managers.ubisoftconnect import UbisoftConnectManager
from bottles.backend.models.config import BottleConfig
Expand Down Expand Up @@ -130,8 +129,6 @@ def __init__(
self.dependency_manager = DependencyManager(self)
self.import_manager = ImportManager(self)
times["ImportManager"] = time.time()
self.steam_manager = SteamManager()
times["SteamManager"] = time.time()

times.update(self.checks(install_latest=False, first_run=True).data)

Expand Down Expand Up @@ -644,17 +641,6 @@ def get_programs(self, config: BottleConfig) -> list[dict]:
)
found.append(executable_name)

win_steam_manager = SteamManager(config, is_windows=True)

if (
self.settings.get_boolean("steam-programs")
and win_steam_manager.is_steam_supported
):
programs_names = [p.get("name", "") for p in installed_programs]
for app in win_steam_manager.get_installed_apps_as_programs():
if app["name"] not in programs_names:
installed_programs.append(app)

if self.settings.get_boolean(
"epic-games"
) and EpicGamesStoreManager.is_epic_supported(config):
Expand Down Expand Up @@ -819,13 +805,6 @@ def process_bottle(bottle):
"Bottles found:\n - {}".format("\n - ".join(self.local_bottles))
)

if (
self.settings.get_boolean("steam-proton-support")
and self.steam_manager.is_steam_supported
):
self.steam_manager.update_bottles()
self.local_bottles.update(self.steam_manager.list_prefixes())

# Update parameters in bottle config
def update_config(
self,
Expand Down Expand Up @@ -879,9 +858,6 @@ def update_config(

config.Update_Date = str(datetime.now())

if config.Environment == "Steam":
self.steam_manager.update_bottle(config)

return Result(status=True, data={"config": config})

def create_bottle_from_config(self, config: BottleConfig) -> bool:
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ bottles_sources = [
'journal.py',
'template.py',
'sandbox.py',
'steam.py',
'epicgamesstore.py',
'ubisoftconnect.py',
'origin.py',
Expand Down
41 changes: 0 additions & 41 deletions bottles/backend/managers/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class RuntimeManager:
def get_runtimes(_filter: str = "bottles"):
runtimes = {
"bottles": RuntimeManager.__get_bottles_runtime(),
"steam": RuntimeManager.__get_steam_runtime(),
}

if _filter == "steam":
Expand Down Expand Up @@ -119,43 +118,3 @@ def __get_bottles_runtime():

return RuntimeManager.__get_runtime(paths, structure)

@staticmethod
def __get_steam_runtime():
from bottles.backend.managers.steam import SteamManager

available_runtimes = {}
steam_manager = SteamManager(check_only=True)

if not steam_manager.is_steam_supported:
return available_runtimes

lookup = {
"sniper": {
"name": "sniper",
"entry_point": os.path.join(
steam_manager.steam_path,
"steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point",
),
},
"soldier": {
"name": "soldier",
"entry_point": os.path.join(
steam_manager.steam_path,
"steamapps/common/SteamLinuxRuntime_soldier/_v2-entry-point",
),
},
"scout": {
"name": "scout",
"entry_point": os.path.join(
steam_manager.steam_path, "ubuntu12_32/steam-runtime/run.sh"
),
},
}

for name, data in lookup.items():
if not os.path.exists(data["entry_point"]):
continue

available_runtimes[name] = data

return available_runtimes
Loading

0 comments on commit 8b7d34e

Please sign in to comment.