From a73fb49047e7a2b24c42cf82b1c223bda24b9523 Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Mon, 2 Jun 2025 15:14:24 +0800 Subject: [PATCH] Add getAppImagePath in SystemRuntime.py Signed-off-by: Loren Eteval --- Furious/Utility/SystemRuntime.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Furious/Utility/SystemRuntime.py b/Furious/Utility/SystemRuntime.py index 45a98a0..1f4a170 100644 --- a/Furious/Utility/SystemRuntime.py +++ b/Furious/Utility/SystemRuntime.py @@ -30,6 +30,7 @@ import subprocess __all__ = [ 'getPythonVersion', 'getUbuntuRelease', + 'getAppImagePath', 'isAdministrator', 'isTUNMode', 'isScriptMode', @@ -71,6 +72,16 @@ def getUbuntuRelease() -> str: return '' +def getAppImagePath() -> str: + if PLATFORM != 'Linux': + return '' + + if 'APPIMAGE' in os.environ: + return os.environ['APPIMAGE'] + else: + return '' + + @functools.lru_cache(None) def isAdministrator() -> bool: if PLATFORM == 'Windows':