Add getAppImagePath in SystemRuntime.py

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2025-06-02 15:14:24 +08:00
parent 344247c1e0
commit a73fb49047
+11
View File
@@ -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':