From 6a06f7329d570c3b1dfcc0759e874b58d59e1412 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sat, 8 Jul 2023 16:00:57 +0200 Subject: [PATCH] Disallow Legendary on Windows to fix Heroic --- src/importer/sources/legendary_source.py | 2 +- src/main.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/importer/sources/legendary_source.py b/src/importer/sources/legendary_source.py index 2c215ca..5b8a2a3 100644 --- a/src/importer/sources/legendary_source.py +++ b/src/importer/sources/legendary_source.py @@ -92,7 +92,7 @@ class LegendarySourceIterator(SourceIterator): class LegendarySource(Source): name = "Legendary" executable_format = "legendary launch {app_name}" - available_on = {"linux", "win32"} + available_on = {"linux"} iterator_class = LegendarySourceIterator config_location: Location = Location( diff --git a/src/main.py b/src/main.py index bc8f0e6..949029d 100644 --- a/src/main.py +++ b/src/main.py @@ -19,6 +19,7 @@ import json import lzma +import os import sys import gi @@ -65,6 +66,12 @@ class CartridgesApplication(Adw.Application): def do_activate(self): # pylint: disable=arguments-differ """Called on app creation""" + setup_logging() + log_system_info() + + if os.name == "nt": + migrate_files_v1_to_v2() + # Set fallback icon-name Gtk.Window.set_default_icon_name(shared.APP_ID) @@ -280,8 +287,5 @@ class CartridgesApplication(Adw.Application): def main(_version): """App entry point""" - setup_logging() - log_system_info() - migrate_files_v1_to_v2() app = CartridgesApplication() return app.run(sys.argv)