Skip to content

Commit e8e429f

Browse files
fix(flatpak): working Flatpak build with KDE 6.9 runtime
- PyQt6 + PyQt6-sip added as Flatpak dependencies (not in KDE runtime) - Pillow/numpy switched to cp312 pre-built wheels (SDK 6.9 = Python 3.12) - QT_PLUGIN_PATH set to /usr/lib/plugins for runtime Qt integration - resources/ copied to site-packages for fonts, i18n, icons, sounds - pyproject.toml: compatible license format + .sql/.proto in package-data - Auto-register desktop entry on AppImage startup (silent, no dialog) - Runtime upgraded from 6.7 (EOL) to 6.9
1 parent 2a1472f commit e8e429f

4 files changed

Lines changed: 51 additions & 8 deletions

File tree

flatpak/io.github.switch_bros.SteamLibraryManager.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: io.github.switch_bros.SteamLibraryManager
22
runtime: org.kde.Platform
3-
runtime-version: '6.7'
3+
runtime-version: '6.9'
44
sdk: org.kde.Sdk
55
command: steam-library-manager
66
finish-args:
@@ -13,6 +13,7 @@ finish-args:
1313
- --filesystem=~/.steam:ro
1414
- --filesystem=xdg-config/steamlibrarymanager
1515
- --talk-name=org.freedesktop.Secrets
16+
- --env=QT_PLUGIN_PATH=/usr/lib/plugins
1617

1718
modules:
1819
- python3-dependencies.json
@@ -21,6 +22,7 @@ modules:
2122
buildsystem: simple
2223
build-commands:
2324
- pip3 install --prefix=/app . --no-build-isolation --no-deps
25+
- cp -r resources /app/lib/python3.12/site-packages/resources
2426
- install -Dm644 flatpak/io.github.switch_bros.SteamLibraryManager.desktop
2527
/app/share/applications/io.github.switch_bros.SteamLibraryManager.desktop
2628
- install -Dm644 flatpak/io.github.switch_bros.SteamLibraryManager.metainfo.xml
@@ -33,4 +35,4 @@ modules:
3335
- type: git
3436
url: https://github.com/Switch-Bros/SteamLibraryManager.git
3537
tag: v1.1.1
36-
commit: f8da58aed2c23ed832ed1ea828548430ff87207c
38+
commit: PLACEHOLDER

flatpak/python3-dependencies.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
"buildsystem": "simple",
44
"build-commands": [],
55
"modules": [
6+
{
7+
"name": "python3-PyQt6",
8+
"buildsystem": "simple",
9+
"build-commands": [
10+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"PyQt6-sip\" --no-build-isolation",
11+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"PyQt6\" --no-build-isolation --no-deps"
12+
],
13+
"sources": [
14+
{
15+
"type": "file",
16+
"url": "https://files.pythonhosted.org/packages/66/e6/25dc20a03c46000e8b93aaf79347227926b67959283e5aab797daa7f64d8/pyqt6_sip-13.11.0-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl",
17+
"sha256": "c30248d9bbe54c46a78e5d549da50295ecd6584b965597f751e272f000fb8527"
18+
},
19+
{
20+
"type": "file",
21+
"url": "https://files.pythonhosted.org/packages/ed/3a/bcc7687c5a11079bbd1606a015514562f2ac8cb01c5e3e4a3b30fcbdad36/PyQt6-6.9.0-cp39-abi3-manylinux_2_28_x86_64.whl",
22+
"sha256": "e344868228c71fc89a0edeb325497df4ff731a89cfa5fe57a9a4e9baecc9512b"
23+
}
24+
]
25+
},
626
{
727
"name": "python3-psutil",
828
"buildsystem": "simple",
@@ -26,8 +46,8 @@
2646
"sources": [
2747
{
2848
"type": "file",
29-
"url": "https://files.pythonhosted.org/packages/1f/42/5c74462b4fd957fcd7b13b04fb3205ff8349236ea74c7c375766d6c82288/pillow-12.1.1.tar.gz",
30-
"sha256": "9ad8fa5937ab05218e2b6a4cff30295ad35afd2f83ac592e68c0d871bb0fdbc4"
49+
"url": "https://files.pythonhosted.org/packages/ff/79/6df7b2ee763d619cda2fb4fea498e5f79d984dae304d45a8999b80d6cf5c/pillow-12.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
50+
"sha256": "7aac39bcf8d4770d089588a2e1dd111cbaa42df5a94be3114222057d68336bd0"
3151
}
3252
]
3353
},
@@ -40,8 +60,8 @@
4060
"sources": [
4161
{
4262
"type": "file",
43-
"url": "https://files.pythonhosted.org/packages/57/fd/0005efbd0af48e55eb3c7208af93f2862d4b1a56cd78e84309a2d959208d/numpy-2.4.2.tar.gz",
44-
"sha256": "659a6107e31a83c4e33f763942275fd278b21d095094044eb35569e86a21ddae"
63+
"url": "https://files.pythonhosted.org/packages/f5/c6/a18e59f3f0b8071cc85cbc8d80cd02d68aa9710170b2553a117203d46936/numpy-2.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl",
64+
"sha256": "9e35d3e0144137d9fdae62912e869136164534d64a169f86438bc9561b6ad49f"
4565
},
4666
{
4767
"type": "file",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name = "steam-library-manager"
55
version = "1.1.1"
66
description = "A powerful Steam library organizer for Linux - the modern Depressurizer alternative"
77
readme = "README.md"
8-
license = "MIT"
8+
license = {text = "MIT"}
99
requires-python = ">=3.10"
1010
authors = [{ name = "SwitchBros" }]
1111
keywords = ["steam", "games", "library", "manager", "linux", "pyqt6", "depressurizer"]
@@ -40,7 +40,7 @@ build-backend = "setuptools.build_meta"
4040
include = ["src*"]
4141

4242
[tool.setuptools.package-data]
43-
"*" = ["*.json", "*.png", "*.svg", "*.webp", "*.desktop", "*.ttf", "*.otf"]
43+
"*" = ["*.json", "*.png", "*.svg", "*.webp", "*.desktop", "*.ttf", "*.otf", "*.sql", "*.proto"]
4444

4545
[tool.black]
4646
line-length = 120

src/main.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,24 @@ def _handle_desktop_integration(*, install: bool) -> int:
117117
return 0 if ok else 1
118118

119119

120+
def _auto_register_desktop_entry() -> None:
121+
"""Silently register desktop entry when running as AppImage.
122+
123+
Called once on every AppImage startup. If the entry already exists,
124+
it gets updated (in case the AppImage was moved to a new path).
125+
Failures are logged but never interrupt the user.
126+
"""
127+
try:
128+
from src.utils.desktop_integration import install_desktop_entry, is_appimage
129+
130+
if not is_appimage():
131+
return
132+
133+
install_desktop_entry()
134+
except Exception as e:
135+
logger.debug("Desktop entry auto-register failed: %s", e)
136+
137+
120138
def main() -> None:
121139
"""Main application execution flow."""
122140
# 0. Handle desktop integration CLI commands (no GUI needed)
@@ -143,6 +161,9 @@ def main() -> None:
143161
if icon_path.exists():
144162
app.setWindowIcon(QIcon(str(icon_path)))
145163

164+
# 3b. Auto-register desktop entry for AppImage (silent, background)
165+
_auto_register_desktop_entry()
166+
146167
# 4. Load and set Inter font
147168
FontHelper.set_app_font(app, size=10) # ← NEU!
148169

0 commit comments

Comments
 (0)