Do not update 'ge-proton' when the wine runner is not installed; users who don't wine don't proton, and it's just a waste of bandwidth to download proton for them.

This commit is contained in:
Daniel Johnson
2024-11-14 16:50:20 -05:00
parent a9ac657400
commit c82fc2f560

View File

@@ -448,6 +448,11 @@ class ProtonComponentUpdater(RuntimeExtractedComponentUpdater):
super().__init__(remote_runtime_info)
self.proton_dir = os.path.join(settings.RUNNER_DIR, "proton")
@property
def should_update(self) -> bool:
wine_dir = os.path.join(settings.RUNNER_DIR, "wine")
return os.path.isdir(wine_dir) and super().should_update
@property
def local_runtime_path(self) -> str:
"""Return the local path for the runtime folder"""