From e804f8192ee6010c667e9a85ef1b06857c5b09b4 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Fri, 2 Jun 2023 17:40:28 +0200 Subject: [PATCH 1/4] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8964a3c..a69d48d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,6 +26,7 @@ If applicable, add screenshots to help explain your problem. **System (please complete the following information):** - OS: [e.g. Fedora Linux] - Installation method [e.g. Flatpak] + - Cartridges version [e.g. 1.5.4] **Additional context** Add any other context about the problem here. From 5fadaf8537b2b065ae8cc688a0a10f08f6a790f7 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sat, 10 Jun 2023 18:24:59 +0200 Subject: [PATCH 2/4] Add _ to Python builtins --- src/__builtins__.pyi | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/__builtins__.pyi diff --git a/src/__builtins__.pyi b/src/__builtins__.pyi new file mode 100644 index 0000000..f90e7b7 --- /dev/null +++ b/src/__builtins__.pyi @@ -0,0 +1 @@ +def _(_msg: str, /) -> str: ... From 49769b708330b9d284186b9f41ae5b5ad3b96eb9 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sat, 10 Jun 2023 18:45:56 +0200 Subject: [PATCH 3/4] Fix import hanging if custom Bottles location --- src/importers/bottles_importer.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/importers/bottles_importer.py b/src/importers/bottles_importer.py index 8da7dcf..a8e9699 100644 --- a/src/importers/bottles_importer.py +++ b/src/importers/bottles_importer.py @@ -83,15 +83,25 @@ def bottles_importer(): values["added"] = current_time values["last_played"] = 0 + # This will not work if both Cartridges and Bottles are installed via Flatpak + # as Cartridges can't access directories picked via Bottles' file picker portal + try: + bottles_location = Path( + yaml.safe_load((bottles_dir / "data.yml").read_text("utf-8"))[ + "custom_bottles_path" + ] + ) + except (FileNotFoundError, KeyError): + bottles_location = bottles_dir / "bottles" + + grid_path = ( + bottles_location + / game["bottle"]["path"] + / "grids" + / game["thumbnail"].split(":")[1] + ) + importer.save_game( values, - ( - bottles_dir - / "bottles" - / game["bottle"]["path"] - / "grids" - / game["thumbnail"].split(":")[1] - ) - if game["thumbnail"] - else None, + grid_path if game["thumbnail"] and grid_path.is_file() else None, ) From 893b290a1e461f8864261b11b7e36ed041e27016 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sat, 10 Jun 2023 18:48:39 +0200 Subject: [PATCH 4/4] v1.5.5 --- data/hu.kramo.Cartridges.metainfo.xml.in | 6 ++---- meson.build | 2 +- windows/Cartridges.iss | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/data/hu.kramo.Cartridges.metainfo.xml.in b/data/hu.kramo.Cartridges.metainfo.xml.in index a318483..8acc6b6 100644 --- a/data/hu.kramo.Cartridges.metainfo.xml.in +++ b/data/hu.kramo.Cartridges.metainfo.xml.in @@ -44,12 +44,10 @@ - +
    -
  • Fixes a bug with custom install locations
  • -
  • Fixes a potential bug with deleted Steam libraries
  • -
  • Translations since 1.5
  • +
  • Fixes an issue with Bottles' custom Bottles directory feature
diff --git a/meson.build b/meson.build index 2a65b03..19d4133 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cartridges', - version: '1.5.4', + version: '1.5.5', meson_version: '>= 0.59.0', default_options: [ 'warning_level=2', 'werror=false', ], ) diff --git a/windows/Cartridges.iss b/windows/Cartridges.iss index 89ee8fd..9fb35f5 100644 --- a/windows/Cartridges.iss +++ b/windows/Cartridges.iss @@ -1,5 +1,5 @@ #define MyAppName "Cartridges" -#define MyAppVersion "1.5.4" +#define MyAppVersion "1.5.5" #define MyAppPublisher "kramo" #define MyAppURL "https://github.com/kra-mo/cartridges" #define MyAppExeName "pythonw.exe"