diff options
| author | AAGaming <aagaming@riseup.net> | 2026-10-17 20:31:24 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2026-10-17 20:31:24 -0400 |
| commit | a349af9d76d0457067fb546872304df8cdb6ab27 (patch) | |
| tree | a2376f6b6288a4c79dea62d90510b09051ce73fb /backend | |
| parent | dae497ef949d4b36b2bdc3537f4f52b1cfdafa2e (diff) | |
| parent | 82df584b461fe9a283b687ad9d883ea1cb8767a8 (diff) | |
| download | decky-loader-a349af9d76d0457067fb546872304df8cdb6ab27.tar.gz decky-loader-a349af9d76d0457067fb546872304df8cdb6ab27.zip | |
Merge branch 'main' of github.com:SteamDeckHomebrew/decky-loader
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/decky_loader/helpers.py | 5 | ||||
| -rw-r--r-- | backend/decky_loader/loader.py | 5 | ||||
| -rw-r--r-- | backend/decky_loader/locales/en-US.json | 9 | ||||
| -rw-r--r-- | backend/decky_loader/localplatform/localplatformmac.py | 10 |
4 files changed, 23 insertions, 6 deletions
diff --git a/backend/decky_loader/helpers.py b/backend/decky_loader/helpers.py index 1621652f..bc330298 100644 --- a/backend/decky_loader/helpers.py +++ b/backend/decky_loader/helpers.py @@ -93,10 +93,11 @@ user_agent = f"Decky/{get_loader_version()} (https://decky.xyz)" # returns the appropriate system python paths def get_system_pythonpaths() -> list[str]: try: + is_linux_or_mac = localplatform.ON_LINUX or localplatform.ON_MAC # run as normal normal user if on linux to also include user python paths - proc = subprocess.run(["python3" if localplatform.ON_LINUX else "python", "-c", "import sys; print('\\n'.join(x for x in sys.path if x))"], + proc = subprocess.run(["python3" if is_linux_or_mac else "python", "-c", "import sys; print('\\n'.join(x for x in sys.path if x))"], # TODO make this less insane - capture_output=True, user=localplatform.localplatform._get_user_id() if localplatform.ON_LINUX else None, env={} if localplatform.ON_LINUX else None) # pyright: ignore [reportPrivateUsage] + capture_output=True, user=localplatform.localplatform._get_user_id() if is_linux_or_mac else None, env={} if is_linux_or_mac else None) # pyright: ignore [reportPrivateUsage] proc.check_returncode() diff --git a/backend/decky_loader/loader.py b/backend/decky_loader/loader.py index 297fc202..e7c2fec7 100644 --- a/backend/decky_loader/loader.py +++ b/backend/decky_loader/loader.py @@ -9,6 +9,7 @@ from typing import Any, Tuple, Dict, cast from aiohttp import web from os.path import exists from decky_loader.helpers import get_homebrew_path +from decky_loader.localplatform.localplatform import ON_MAC from watchdog.events import RegexMatchingEventHandler, FileSystemEvent from watchdog.observers import Observer @@ -106,6 +107,10 @@ class Loader: async def enable_reload_wait(self): if self.live_reload: + if ON_MAC: + self.logger.info("Hot reload is not supported on macOS") + return + await sleep(10) if self.watcher and self.live_reload: self.logger.info("Hot reload enabled") diff --git a/backend/decky_loader/locales/en-US.json b/backend/decky_loader/locales/en-US.json index 6b6553ad..76531ec4 100644 --- a/backend/decky_loader/locales/en-US.json +++ b/backend/decky_loader/locales/en-US.json @@ -296,6 +296,15 @@ "testing": "Testing" } }, + "WarnThirdParty":{ + "title_zip": "Third-Party Plugin Installation", + "title_repo": "Third-Party Store Selection", + "button_processing_one": "Please wait {{timer}} second", + "button_processing_many": "Please wait {{timer}} seconds", + "button_idle": "Continue", + "desc_zip": "The Decky Loader team has not reviewed this plugin. It may contain malware, such as software to steal your Steam account or harm your device. By installing this plugin, you agree you have assumed all risks to your device.", + "desc_repo": "The Decky Loader team does not maintain this plugin store. It and its plugins may contain malware, such as software to steal your Steam account or harm your device. By adding this store, you agree you have assumed all risks to your device." + }, "Testing": { "download": "Download", "error": "Error Installing PR", diff --git a/backend/decky_loader/localplatform/localplatformmac.py b/backend/decky_loader/localplatform/localplatformmac.py index fd31870b..fd491785 100644 --- a/backend/decky_loader/localplatform/localplatformmac.py +++ b/backend/decky_loader/localplatform/localplatformmac.py @@ -1,10 +1,12 @@ from ..enums import UserType -import os from . import localplatformlinux -# this should be public +# NOTE: localplatformlinux has these private functions that get used in helpers.py +def _get_user_id() -> int: # pyright: ignore[reportUnusedFunction] + return localplatformlinux._get_user_id() # pyright: ignore[reportPrivateUsage] + def _get_effective_user_id() -> int: # pyright: ignore[reportUnusedFunction] - return os.geteuid() + return localplatformlinux._get_effective_user_id() # pyright: ignore[reportPrivateUsage] def chown(path : str, user : UserType = UserType.HOST_USER, recursive : bool = True) -> bool: return localplatformlinux.chown(path, user, recursive) @@ -43,7 +45,7 @@ def get_username() -> str: return localplatformlinux.get_username() def get_privileged_path() -> str: - '''On Mac, privileged_path is equal to unprivileged_path''' + # On Mac, privileged_path is equal to unprivileged_path return get_unprivileged_path() def get_unprivileged_path() -> str: |
