summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json7
-rw-r--r--py_modules/lsfg_vk/constants.py1
-rw-r--r--py_modules/lsfg_vk/flatpak_service.py42
-rw-r--r--src/api/lsfgApi.ts1
-rw-r--r--src/components/FlatpaksModal.tsx40
5 files changed, 78 insertions, 13 deletions
diff --git a/package.json b/package.json
index 57043e8..4cc6b40 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "decky-lsfg-vk",
- "version": "0.11.1",
+ "version": "0.11.2",
"description": "Use Lossless Scaling on the Steam Deck using the lsfg-vk vulkan layer",
"type": "module",
"scripts": {
@@ -58,6 +58,11 @@
"name": "org.freedesktop.Platform.VulkanLayer.lsfg_vk_24.08.flatpak",
"url": "https://github.com/PancakeTAS/lsfg-vk/releases/download/v0.9.0/org.freedesktop.Platform.VulkanLayer.lsfg_vk_24.08.flatpak",
"sha256hash": "70ea6d9d2a8adad63b8e5c2c3d94a636764ad4d0266ce9f37cb9dc7943d8fc3a"
+ },
+ {
+ "name": "org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak",
+ "url": "https://github.com/PancakeTAS/lsfg-vk/releases/download/v1.0.0/org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak",
+ "sha256hash": "0651bda96751ef0f1314a5179585926a0cd354476790ca2616662c39fe6fae54"
}
],
"pnpm": {
diff --git a/py_modules/lsfg_vk/constants.py b/py_modules/lsfg_vk/constants.py
index 614e2fc..79d8585 100644
--- a/py_modules/lsfg_vk/constants.py
+++ b/py_modules/lsfg_vk/constants.py
@@ -20,6 +20,7 @@ ZIP_FILENAME = "lsfg-vk_noui.zip"
# Flatpak files
FLATPAK_23_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_23.08.flatpak"
FLATPAK_24_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_24.08.flatpak"
+FLATPAK_25_08_FILENAME = "org.freedesktop.Platform.VulkanLayer.lsfg_vk_25.08.flatpak"
# File extensions
SO_EXT = ".so"
diff --git a/py_modules/lsfg_vk/flatpak_service.py b/py_modules/lsfg_vk/flatpak_service.py
index 7c1ccdc..0e3977f 100644
--- a/py_modules/lsfg_vk/flatpak_service.py
+++ b/py_modules/lsfg_vk/flatpak_service.py
@@ -9,7 +9,7 @@ from typing import Dict, Any, List, Optional
from .base_service import BaseService
from .constants import (
- FLATPAK_23_08_FILENAME, FLATPAK_24_08_FILENAME, BIN_DIR, CONFIG_DIR
+ FLATPAK_23_08_FILENAME, FLATPAK_24_08_FILENAME, FLATPAK_25_08_FILENAME, BIN_DIR, CONFIG_DIR
)
from .types import BaseResponse
@@ -17,10 +17,11 @@ from .types import BaseResponse
class FlatpakExtensionStatus(BaseResponse):
"""Response for Flatpak extension status"""
def __init__(self, success: bool = False, message: str = "", error: str = "",
- installed_23_08: bool = False, installed_24_08: bool = False):
+ installed_23_08: bool = False, installed_24_08: bool = False, installed_25_08: bool = False):
super().__init__(success, message, error)
self.installed_23_08 = installed_23_08
self.installed_24_08 = installed_24_08
+ self.installed_25_08 = installed_25_08
class FlatpakAppInfo(BaseResponse):
@@ -48,6 +49,7 @@ class FlatpakService(BaseService):
super().__init__(logger)
self.extension_id_23_08 = "org.freedesktop.Platform.VulkanLayer.lsfgvk/x86_64/23.08"
self.extension_id_24_08 = "org.freedesktop.Platform.VulkanLayer.lsfgvk/x86_64/24.08"
+ self.extension_id_25_08 = "org.freedesktop.Platform.VulkanLayer.lsfgvk/x86_64/25.08"
self.flatpak_command = None # Will be set when flatpak is detected
def _get_clean_env(self):
@@ -128,7 +130,7 @@ class FlatpakService(BaseService):
self.log.error(error_msg)
return self._error_response(FlatpakExtensionStatus,
error_msg,
- installed_23_08=False, installed_24_08=False)
+ installed_23_08=False, installed_24_08=False, installed_25_08=False)
# Get list of installed runtimes
result = self._run_flatpak_command(
@@ -138,10 +140,11 @@ class FlatpakService(BaseService):
installed_runtimes = result.stdout
- # Check for both versions by looking for the base extension name and version
+ # Check for all versions by looking for the base extension name and version
base_extension_name = "org.freedesktop.Platform.VulkanLayer.lsfgvk"
installed_23_08 = False
installed_24_08 = False
+ installed_25_08 = False
for line in installed_runtimes.split('\n'):
if base_extension_name in line:
@@ -149,12 +152,16 @@ class FlatpakService(BaseService):
installed_23_08 = True
elif "24.08" in line:
installed_24_08 = True
+ elif "25.08" in line:
+ installed_25_08 = True
status_msg = []
if installed_23_08:
status_msg.append("23.08 runtime extension installed")
if installed_24_08:
status_msg.append("24.08 runtime extension installed")
+ if installed_25_08:
+ status_msg.append("25.08 runtime extension installed")
if not status_msg:
status_msg.append("No lsfg-vk runtime extensions installed")
@@ -162,26 +169,32 @@ class FlatpakService(BaseService):
return self._success_response(FlatpakExtensionStatus,
"; ".join(status_msg),
installed_23_08=installed_23_08,
- installed_24_08=installed_24_08)
+ installed_24_08=installed_24_08,
+ installed_25_08=installed_25_08)
except subprocess.CalledProcessError as e:
error_msg = f"Error checking Flatpak extensions: {e.stderr if e.stderr else str(e)}"
self.log.error(error_msg)
return self._error_response(FlatpakExtensionStatus, error_msg,
- installed_23_08=False, installed_24_08=False)
+ installed_23_08=False, installed_24_08=False, installed_25_08=False)
def install_extension(self, version: str) -> BaseResponse:
"""Install a specific version of the lsfg-vk Flatpak extension"""
try:
- if version not in ["23.08", "24.08"]:
- return self._error_response(BaseResponse, "Invalid version. Must be '23.08' or '24.08'")
+ if version not in ["23.08", "24.08", "25.08"]:
+ return self._error_response(BaseResponse, "Invalid version. Must be '23.08', '24.08', or '25.08'")
if not self.check_flatpak_available():
return self._error_response(BaseResponse, "Flatpak is not available on this system")
# Get the path to the flatpak file
plugin_dir = Path(__file__).parent.parent.parent
- filename = FLATPAK_23_08_FILENAME if version == "23.08" else FLATPAK_24_08_FILENAME
+ if version == "23.08":
+ filename = FLATPAK_23_08_FILENAME
+ elif version == "24.08":
+ filename = FLATPAK_24_08_FILENAME
+ else: # 25.08
+ filename = FLATPAK_25_08_FILENAME
flatpak_path = plugin_dir / BIN_DIR / filename
if not flatpak_path.exists():
@@ -209,13 +222,18 @@ class FlatpakService(BaseService):
def uninstall_extension(self, version: str) -> BaseResponse:
"""Uninstall a specific version of the lsfg-vk Flatpak extension"""
try:
- if version not in ["23.08", "24.08"]:
- return self._error_response(BaseResponse, "Invalid version. Must be '23.08' or '24.08'")
+ if version not in ["23.08", "24.08", "25.08"]:
+ return self._error_response(BaseResponse, "Invalid version. Must be '23.08', '24.08', or '25.08'")
if not self.check_flatpak_available():
return self._error_response(BaseResponse, "Flatpak is not available on this system")
- extension_id = self.extension_id_23_08 if version == "23.08" else self.extension_id_24_08
+ if version == "23.08":
+ extension_id = self.extension_id_23_08
+ elif version == "24.08":
+ extension_id = self.extension_id_24_08
+ else: # 25.08
+ extension_id = self.extension_id_25_08
# Uninstall the extension
result = self._run_flatpak_command(
diff --git a/src/api/lsfgApi.ts b/src/api/lsfgApi.ts
index d08cd42..dda6c23 100644
--- a/src/api/lsfgApi.ts
+++ b/src/api/lsfgApi.ts
@@ -103,6 +103,7 @@ export interface FlatpakExtensionStatus {
error?: string;
installed_23_08: boolean;
installed_24_08: boolean;
+ installed_25_08: boolean;
}
export interface FlatpakApp {
diff --git a/src/components/FlatpaksModal.tsx b/src/components/FlatpaksModal.tsx
index bd81013..ae0c333 100644
--- a/src/components/FlatpaksModal.tsx
+++ b/src/components/FlatpaksModal.tsx
@@ -216,6 +216,46 @@ const FlatpaksModal: FC<FlatpaksModalProps> = ({ closeModal }) => {
</ButtonItem>
</Field>
</PanelSectionRow>
+
+ {/* 25.08 Runtime */}
+ <PanelSectionRow>
+ <Field
+ label="Runtime 25.08"
+ description={extensionStatus.installed_25_08 ? "Installed" : "Not installed"}
+ icon={extensionStatus.installed_25_08 ? <FaCheck style={{color: 'green'}} /> : <FaTimes style={{color: 'red'}} />}
+ >
+ <ButtonItem
+ layout="below"
+ onClick={() => {
+ const operation = extensionStatus.installed_25_08 ? 'uninstall' : 'install';
+ const action = () => handleExtensionOperation(operation, '25.08');
+
+ if (operation === 'uninstall') {
+ confirmOperation(
+ action,
+ 'Uninstall Runtime Extension',
+ 'Are you sure you want to uninstall the 25.08 runtime extension?'
+ );
+ } else {
+ action();
+ }
+ }}
+ disabled={operationInProgress === 'install-25.08' || operationInProgress === 'uninstall-25.08'}
+ >
+ {operationInProgress === 'install-25.08' || operationInProgress === 'uninstall-25.08' ? (
+ <Spinner />
+ ) : extensionStatus.installed_25_08 ? (
+ <>
+ <FaTrash /> Uninstall
+ </>
+ ) : (
+ <>
+ <FaDownload /> Install
+ </>
+ )}
+ </ButtonItem>
+ </Field>
+ </PanelSectionRow>
</>
) : (
<PanelSectionRow>