Standardize Pico8 installation

This commit is contained in:
Mathieu Comandon 2023-09-13 17:22:44 -07:00
parent 7cda2ff51a
commit faccec5721
2 changed files with 1 additions and 16 deletions

View file

@ -138,7 +138,7 @@ def get_default_runner_version(runner_name: str, version: str = "") -> dict:
except KeyError: except KeyError:
runner_versions = [] runner_versions = []
for runner_version in runner_versions: for runner_version in runner_versions:
if runner_version["architecture"] == LINUX_SYSTEM.arch: if runner_version["architecture"] in (LINUX_SYSTEM.arch, "all"):
return runner_version return runner_version
logger.info( logger.info(
"Getting runner information for %s%s", "Getting runner information for %s%s",

View file

@ -14,8 +14,6 @@ from lutris.util.downloader import Downloader
from lutris.util.log import logger from lutris.util.log import logger
from lutris.util.strings import split_arguments from lutris.util.strings import split_arguments
DOWNLOAD_URL = "https://github.com/daniel-j/lutris-pico-8-runner/archive/master.tar.gz"
class pico8(Runner): class pico8(Runner):
description = _("Runs PICO-8 fantasy console cartridges") description = _("Runs PICO-8 fantasy console cartridges")
@ -77,21 +75,8 @@ class pico8(Runner):
def __init__(self, config=None): def __init__(self, config=None):
super().__init__(config) super().__init__(config)
self.runnable_alone = self.is_native self.runnable_alone = self.is_native
def __repr__(self):
return _("PICO-8 runner (%s)") % self.config
def install(self, install_ui_delegate, version=None, callback=None):
opts = {}
opts["install_ui_delegate"] = install_ui_delegate
if callback:
opts["callback"] = callback
opts["dest"] = settings.RUNNER_DIR + "/pico8"
opts["merge_single"] = True
self.download_and_extract(DOWNLOAD_URL, **opts)
@property @property
def is_native(self): def is_native(self):
return self.runner_config.get("runner_executable", "") != "" return self.runner_config.get("runner_executable", "") != ""