summaryrefslogtreecommitdiff
path: root/py_modules/lsfg_vk
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-07 20:57:26 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2026-09-07 20:57:26 -0400
commit54acc36f16e1336772354f979a618cce65061f82 (patch)
tree9aae51351de2468277b3392b984e5caa99c271b4 /py_modules/lsfg_vk
parente21eee83fc58fee3481aa0e17feb7cd9a8d8750e (diff)
downloaddecky-lsfg-vk-54acc36f16e1336772354f979a618cce65061f82.tar.gz
decky-lsfg-vk-54acc36f16e1336772354f979a618cce65061f82.zip
refactor: make runtime installation explicit
Diffstat (limited to 'py_modules/lsfg_vk')
-rw-r--r--py_modules/lsfg_vk/flatpak_service.py29
-rw-r--r--py_modules/lsfg_vk/installation.py24
-rw-r--r--py_modules/lsfg_vk/plugin.py10
3 files changed, 0 insertions, 63 deletions
diff --git a/py_modules/lsfg_vk/flatpak_service.py b/py_modules/lsfg_vk/flatpak_service.py
index 6f8a596..6aebf11 100644
--- a/py_modules/lsfg_vk/flatpak_service.py
+++ b/py_modules/lsfg_vk/flatpak_service.py
@@ -323,32 +323,3 @@ class FlatpakService(BaseService):
app_id=app_id,
operation="remove",
)
-
- def migrate_v2(self) -> None:
- if not self.check_flatpak_available():
- return
-
- apps_result = self._run_flatpak_command(
- ["list", "--user", "--app", "--columns=application"],
- capture_output=True,
- text=True,
- )
- if apps_result.returncode != 0:
- return
-
- for app_id in apps_result.stdout.splitlines():
- app_id = app_id.strip()
- if not app_id:
- continue
- output = self._override_output(app_id)
- paths = self._override_paths()
- legacy_markers = (
- "LSFG_CONFIG=",
- paths["legacy_home"],
- paths["legacy_dll"],
- paths["legacy_script"],
- )
- if any(marker in output for marker in legacy_markers):
- result = self.set_app_override(app_id)
- if not result.get("success"):
- self.log.warning(result.get("error"))
diff --git a/py_modules/lsfg_vk/installation.py b/py_modules/lsfg_vk/installation.py
index 09bd3a3..b583cc7 100644
--- a/py_modules/lsfg_vk/installation.py
+++ b/py_modules/lsfg_vk/installation.py
@@ -171,30 +171,6 @@ class InstallationService(BaseService):
for path in (self.legacy_lib_file, self.legacy_json_file):
self._remove_if_exists(path)
- def needs_v2_migration(self) -> bool:
- legacy_layer = self.legacy_lib_file.exists() or self.legacy_json_file.exists()
- legacy_config = False
- if self.config_file_path.exists():
- try:
- legacy_config = ConfigurationManager.is_legacy_v1(
- self.config_file_path.read_text(encoding="utf-8")
- )
- except OSError:
- legacy_config = False
- if legacy_layer or legacy_config:
- return True
- try:
- if self.config_file_path.exists():
- data = ConfigurationManager.parse_toml_content_multi_profile(
- self.config_file_path.read_text(encoding="utf-8")
- )
- configured = str(data["global_config"].get("dll") or "")
- if (not configured or not Path(configured).is_file()) and self.steam_service.find_lsfg_vk_dll():
- return True
- return not self.runtime_service.is_healthy()
- except Exception:
- return True
-
def check_installation(self) -> InstallationCheckResponse:
try:
installation_error = None
diff --git a/py_modules/lsfg_vk/plugin.py b/py_modules/lsfg_vk/plugin.py
index 6977b9c..0472e42 100644
--- a/py_modules/lsfg_vk/plugin.py
+++ b/py_modules/lsfg_vk/plugin.py
@@ -236,14 +236,4 @@ class Plugin:
os.path.join(decky.DECKY_HOME, "lossless-scaling-vk"),
os.path.join(decky.DECKY_USER_HOME, ".local", "share", "decky-lossless-scaling-vk"))
- if self.installation_service.needs_v2_migration():
- result = self.installation_service.install()
- if not result.get("success"):
- decky.logger.warning(f"Native v2 migration failed: {result.get('error')}")
-
- try:
- self.flatpak_service.migrate_v2()
- except Exception as error:
- decky.logger.warning(f"Flatpak v2 migration skipped: {error}")
-
decky.logger.info("decky-lsfg-vk plugin migrations completed")