Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
893b290a1e | ||
|
|
49769b7083 | ||
|
|
5fadaf8537 | ||
|
|
e804f8192e | ||
|
|
1311c53c3e | ||
|
|
6f69344a16 | ||
|
|
63951d76ac | ||
|
|
c045ad1f53 | ||
|
|
8a1e00883c | ||
|
|
620a094ff0 | ||
|
|
7b7232d741 | ||
|
|
4c1af9245f | ||
|
|
d05a03dee7 |
1
.github/ISSUE_TEMPLATE/bug_report.md
vendored
1
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -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.
|
||||
|
||||
4
.github/workflows/flatpak-builder.yml
vendored
4
.github/workflows/flatpak-builder.yml
vendored
@@ -14,6 +14,6 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
bundle: hu.kramo.Cartridges.flatpak
|
||||
manifest-path: hu.kramo.Cartridges.json
|
||||
bundle: hu.kramo.Cartridges.Devel.flatpak
|
||||
manifest-path: flatpak/hu.kramo.Cartridges.Devel.json
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
|
||||
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
@@ -24,9 +24,9 @@ jobs:
|
||||
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-meson git
|
||||
find /ucrt64/share/locale/ -type f ! -name "*cartridges.mo" -delete
|
||||
- name: "Inno Setup"
|
||||
run: iscc ".\.windows\Cartridges.iss"
|
||||
run: iscc ".\windows\Cartridges.iss"
|
||||
- name: "Upload Artifact"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: "Installer"
|
||||
path: ".windows/Output/Cartridges Setup.exe"
|
||||
path: "windows/Output/Cartridges Setup.exe"
|
||||
@@ -53,15 +53,12 @@ For updates and questions, join our [Discord server][discord-url]!
|
||||
|
||||
## Linux
|
||||
|
||||
### Flathub (Recommended)
|
||||
### Flathub
|
||||
|
||||
The app is available on Flathub.
|
||||
|
||||
<a href=https://flathub.org/apps/hu.kramo.Cartridges><img width='240' alt='Download on Flathub' src='https://dl.flathub.org/assets/badges/flathub-badge-en.png'/></a>
|
||||
|
||||
### From Releases
|
||||
|
||||
1. Download the latest release from [Releases](https://github.com/kra-mo/cartridges/releases).
|
||||
2. Install the downloaded file via GNOME Software or `flatpak install hu.kramo.Cartridges.flatpak`.
|
||||
|
||||
## Windows
|
||||
|
||||
### From Releases
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/hu/kramo/Cartridges">
|
||||
<gresource prefix="@PREFIX@">
|
||||
<file preprocess="xml-stripblanks">gtk/window.ui</file>
|
||||
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
|
||||
<file preprocess="xml-stripblanks">gtk/game.ui</file>
|
||||
@@ -18,7 +18,6 @@ Adw.StatusPage hidden_notice_no_results {
|
||||
}
|
||||
|
||||
Adw.StatusPage notice_empty {
|
||||
icon-name: "hu.kramo.Cartridges-symbolic";
|
||||
title: _("No Games");
|
||||
description: _("Use the + button to add games.");
|
||||
vexpand: true;
|
||||
|
||||
@@ -3,7 +3,7 @@ Name=Cartridges
|
||||
GenericName=Game Launcher
|
||||
Comment=Launch all your games
|
||||
Exec=cartridges
|
||||
Icon=hu.kramo.Cartridges
|
||||
Icon=@APP_ID@
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;Game;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schemalist gettext-domain="cartridges">
|
||||
<schema id="hu.kramo.Cartridges" path="/hu/kramo/Cartridges/">
|
||||
<schema id="@APP_ID@" path="@PREFIX@/">
|
||||
<key name="exit-after-launch" type="b">
|
||||
<default>false</default>
|
||||
</key>
|
||||
@@ -68,7 +68,7 @@
|
||||
<default>false</default>
|
||||
</key>
|
||||
</schema>
|
||||
<schema id="hu.kramo.Cartridges.State" path="/hu/kramo/Cartridges/State/">
|
||||
<schema id="@APP_ID@.State" path="@PREFIX@/State/">
|
||||
<key name="width" type="i">
|
||||
<default>1110</default>
|
||||
</key>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>hu.kramo.Cartridges.desktop</id>
|
||||
<id>@APP_ID@.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0-or-later</project_license>
|
||||
<name>Cartridges</name>
|
||||
@@ -15,7 +15,7 @@
|
||||
<url type="vcs-browser">https://github.com/kra-mo/cartridges</url>
|
||||
<url type="contribute">https://github.com/kra-mo/cartridges/blob/main/CONTRIBUTING.md</url>
|
||||
<developer_name translatable="no">kramo</developer_name>
|
||||
<launchable type="desktop-id">hu.kramo.Cartridges.desktop</launchable>
|
||||
<launchable type="desktop-id">@APP_ID@.desktop</launchable>
|
||||
<supports>
|
||||
<control>pointing</control>
|
||||
<control>keyboard</control>
|
||||
@@ -44,12 +44,10 @@
|
||||
</screenshots>
|
||||
<content_rating type="oars-1.1" />
|
||||
<releases>
|
||||
<release version="1.5.2" date="2023-05-27">
|
||||
<release version="1.5.5" date="2023-06-10">
|
||||
<description translatable="no">
|
||||
<ul>
|
||||
<li>Fixes the app icon not displaying on the XFCE panel</li>
|
||||
<li>Fixes a bug with the Steam API</li>
|
||||
<li>Translations since 1.5</li>
|
||||
<li>Fixes an issue with Bottles' custom Bottles directory feature</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="9" x2="119" y1="115" y2="115">
|
||||
<stop offset="0" stop-color="#613583"/>
|
||||
<stop offset="0.05" stop-color="#9141ac"/>
|
||||
<stop offset="0.22" stop-color="#613583"/>
|
||||
<stop offset="0.78" stop-color="#613583"/>
|
||||
<stop offset="0.95" stop-color="#9141ac"/>
|
||||
<stop offset="1" stop-color="#613583"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="45" x2="45" y1="50" y2="82">
|
||||
<stop offset="0" stop-color="#bdd0d5"/>
|
||||
<stop offset="1" stop-color="#305749"/>
|
||||
</linearGradient>
|
||||
<clipPath id="c">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="d">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<filter id="e" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="f">
|
||||
<g clip-path="url(#d)" filter="url(#e)">
|
||||
<g clip-path="url(#c)">
|
||||
<path d="m 111 29 h -94 c -4.417969 0 -8 3.582031 -8 8 v 70 c 0 4.417969 3.582031 8 8 8 h 94 c 4.417969 0 8 -3.582031 8 -8 v -70 c 0 -4.417969 -3.582031 -8 -8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 111 29 h -94 c -4.417969 0 -8 3.679688 -8 8.222656 v 57.554688 c 0 4.539062 3.582031 8.222656 8 8.222656 h 94 c 4.417969 0 8 -3.679688 8 -8.222656 v -57.554688 c 0 -4.539062 -3.582031 -8.222656 -8 -8.222656 z m 0 0" fill="#c061cb"/>
|
||||
<path d="m 84 42 h -40 c -2.210938 0 -4 1.789062 -4 4 v 40 c 0 2.210938 1.789062 4 4 4 h 40 c 2.210938 0 4 -1.789062 4 -4 v -40 c 0 -2.210938 -1.789062 -4 -4 -4 z m 0 0"/>
|
||||
<path d="m 81 50 h -34 c -1.105469 0 -2 0.894531 -2 2 v 28 c 0 1.105469 0.894531 2 2 2 h 34 c 1.105469 0 2 -0.894531 2 -2 v -28 c 0 -1.105469 -0.894531 -2 -2 -2 z m 0 0" fill="url(#b)"/>
|
||||
<path d="m 102 61 v -1 c 0 -2.761719 -2.238281 -5 -5 -5 s -5 2.238281 -5 5 v 1 c 0 2.761719 2.238281 5 5 5 s 5 -2.238281 5 -5 z m 12 -6 v -1 c 0 -2.761719 -2.238281 -5 -5 -5 s -5 2.238281 -5 5 v 1 c 0 2.761719 2.238281 5 5 5 s 5 -2.238281 5 -5 z m 0 0"/>
|
||||
<path d="m 97 64 c 2.761719 0 5 -2.015625 5 -4.5 s -2.238281 -4.5 -5 -4.5 s -5 2.015625 -5 4.5 s 2.238281 4.5 5 4.5 z m 12 -6 c 2.761719 0 5 -2.015625 5 -4.5 s -2.238281 -4.5 -5 -4.5 s -5 2.015625 -5 4.5 s 2.238281 4.5 5 4.5 z m 0 0" fill="#3d3846"/>
|
||||
<path d="m 29 56.5 c 0 -1.933594 -1.566406 -3.5 -3.5 -3.5 s -3.5 1.566406 -3.5 3.5 v 13 c 0 1.933594 1.566406 3.5 3.5 3.5 s 3.5 -1.566406 3.5 -3.5 z m 0 0"/>
|
||||
<path d="m 33 58 h -15 c -1.65625 0 -3 1.34375 -3 3 v 2 c 0 1.65625 1.34375 3 3 3 h 15 c 1.65625 0 3 -1.34375 3 -3 v -2 c 0 -1.65625 -1.34375 -3 -3 -3 z m 0 0"/>
|
||||
<path d="m 29 54.5 c 0 -1.933594 -1.566406 -3.5 -3.5 -3.5 s -3.5 1.566406 -3.5 3.5 v 13 c 0 1.933594 1.566406 3.5 3.5 3.5 s 3.5 -1.566406 3.5 -3.5 z m 0 0" fill="#3d3846"/>
|
||||
<path d="m 33 58 h -15 c -1.65625 0 -3 1.34375 -3 3 s 1.34375 3 3 3 h 15 c 1.65625 0 3 -1.34375 3 -3 s -1.34375 -3 -3 -3 z m 0 0" fill="#3d3846"/>
|
||||
<path d="m 71 109 c 0 -1.105469 0.894531 -2 2 -2 s 2 0.894531 2 2 s -0.894531 2 -2 2 s -2 -0.894531 -2 -2 z m 0 0"/>
|
||||
<path d="m 71.0625 108.5 c 0.226562 0.882812 1.023438 1.503906 1.9375 1.503906 s 1.710938 -0.621094 1.9375 -1.503906 c 0.195312 0.757812 -0.066406 1.558594 -0.671875 2.050781 c -0.605469 0.492188 -1.445313 0.585938 -2.144531 0.242188 c -0.855469 -0.414063 -1.296875 -1.375 -1.058594 -2.292969 z m 0 0" fill="#9141ac"/>
|
||||
<path d="m 66 107 h -10 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 10 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 0 0"/>
|
||||
<path d="m 54.0625 108.5 c -0.152344 0.597656 -0.023438 1.234375 0.355469 1.726562 c 0.378906 0.488282 0.964843 0.773438 1.582031 0.773438 h 10 c 0.617188 0 1.203125 -0.285156 1.582031 -0.773438 c 0.378907 -0.492187 0.511719 -1.128906 0.355469 -1.726562 c -0.226562 0.882812 -1.023438 1.5 -1.9375 1.5 h -10 c -0.914062 0 -1.710938 -0.617188 -1.9375 -1.5 z m 0 0" fill="#9141ac"/>
|
||||
<path d="m 110 74 h -14 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 14 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m 0 5 h -14 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 14 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m 0 5 h -14 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 14 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m 0 0" fill="#613583"/>
|
||||
<path d="m 21.5 79 h -3 c -1.378906 0 -2.5 1.121094 -2.5 2.5 s 1.121094 2.5 2.5 2.5 h 3 c 1.378906 0 2.5 -1.121094 2.5 -2.5 s -1.121094 -2.5 -2.5 -2.5 z m 11 0 h -3 c -1.378906 0 -2.5 1.121094 -2.5 2.5 s 1.121094 2.5 2.5 2.5 h 3 c 1.378906 0 2.5 -1.121094 2.5 -2.5 s -1.121094 -2.5 -2.5 -2.5 z m 0 0"/>
|
||||
<path d="m 22 79 h -4 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 4 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 11 0 h -4 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 4 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 0 0" fill="#3d3846"/>
|
||||
</g>
|
||||
</g>
|
||||
</mask>
|
||||
<mask id="g">
|
||||
<g filter="url(#e)">
|
||||
<rect fill-opacity="0.8" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<linearGradient id="h" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)" gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
|
||||
<stop offset="0" stop-color="#f9f06b"/>
|
||||
<stop offset="1" stop-color="#f5c211"/>
|
||||
</linearGradient>
|
||||
<clipPath id="i">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="j">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<path d="m 111 29 h -94 c -4.417969 0 -8 3.582031 -8 8 v 70 c 0 4.417969 3.582031 8 8 8 h 94 c 4.417969 0 8 -3.582031 8 -8 v -70 c 0 -4.417969 -3.582031 -8 -8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 111 29 h -94 c -4.417969 0 -8 3.679688 -8 8.222656 v 57.554688 c 0 4.539062 3.582031 8.222656 8 8.222656 h 94 c 4.417969 0 8 -3.679688 8 -8.222656 v -57.554688 c 0 -4.539062 -3.582031 -8.222656 -8 -8.222656 z m 0 0" fill="#c061cb"/>
|
||||
<path d="m 84 42 h -40 c -2.210938 0 -4 1.789062 -4 4 v 40 c 0 2.210938 1.789062 4 4 4 h 40 c 2.210938 0 4 -1.789062 4 -4 v -40 c 0 -2.210938 -1.789062 -4 -4 -4 z m 0 0"/>
|
||||
<path d="m 81 50 h -34 c -1.105469 0 -2 0.894531 -2 2 v 28 c 0 1.105469 0.894531 2 2 2 h 34 c 1.105469 0 2 -0.894531 2 -2 v -28 c 0 -1.105469 -0.894531 -2 -2 -2 z m 0 0" fill="url(#b)"/>
|
||||
<path d="m 102 61 v -1 c 0 -2.761719 -2.238281 -5 -5 -5 s -5 2.238281 -5 5 v 1 c 0 2.761719 2.238281 5 5 5 s 5 -2.238281 5 -5 z m 12 -6 v -1 c 0 -2.761719 -2.238281 -5 -5 -5 s -5 2.238281 -5 5 v 1 c 0 2.761719 2.238281 5 5 5 s 5 -2.238281 5 -5 z m 0 0"/>
|
||||
<path d="m 97 64 c 2.761719 0 5 -2.015625 5 -4.5 s -2.238281 -4.5 -5 -4.5 s -5 2.015625 -5 4.5 s 2.238281 4.5 5 4.5 z m 12 -6 c 2.761719 0 5 -2.015625 5 -4.5 s -2.238281 -4.5 -5 -4.5 s -5 2.015625 -5 4.5 s 2.238281 4.5 5 4.5 z m 0 0" fill="#3d3846"/>
|
||||
<path d="m 29 56.5 c 0 -1.933594 -1.566406 -3.5 -3.5 -3.5 s -3.5 1.566406 -3.5 3.5 v 13 c 0 1.933594 1.566406 3.5 3.5 3.5 s 3.5 -1.566406 3.5 -3.5 z m 0 0"/>
|
||||
<path d="m 33 58 h -15 c -1.65625 0 -3 1.34375 -3 3 v 2 c 0 1.65625 1.34375 3 3 3 h 15 c 1.65625 0 3 -1.34375 3 -3 v -2 c 0 -1.65625 -1.34375 -3 -3 -3 z m 0 0"/>
|
||||
<path d="m 29 54.5 c 0 -1.933594 -1.566406 -3.5 -3.5 -3.5 s -3.5 1.566406 -3.5 3.5 v 13 c 0 1.933594 1.566406 3.5 3.5 3.5 s 3.5 -1.566406 3.5 -3.5 z m 0 0" fill="#3d3846"/>
|
||||
<path d="m 33 58 h -15 c -1.65625 0 -3 1.34375 -3 3 s 1.34375 3 3 3 h 15 c 1.65625 0 3 -1.34375 3 -3 s -1.34375 -3 -3 -3 z m 0 0" fill="#3d3846"/>
|
||||
<path d="m 71 109 c 0 -1.105469 0.894531 -2 2 -2 s 2 0.894531 2 2 s -0.894531 2 -2 2 s -2 -0.894531 -2 -2 z m 0 0"/>
|
||||
<path d="m 71.0625 108.5 c 0.226562 0.882812 1.023438 1.503906 1.9375 1.503906 s 1.710938 -0.621094 1.9375 -1.503906 c 0.195312 0.757812 -0.066406 1.558594 -0.671875 2.050781 c -0.605469 0.492188 -1.445313 0.585938 -2.144531 0.242188 c -0.855469 -0.414063 -1.296875 -1.375 -1.058594 -2.292969 z m 0 0" fill="#9141ac"/>
|
||||
<path d="m 66 107 h -10 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 10 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 0 0"/>
|
||||
<path d="m 54.0625 108.5 c -0.152344 0.597656 -0.023438 1.234375 0.355469 1.726562 c 0.378906 0.488282 0.964843 0.773438 1.582031 0.773438 h 10 c 0.617188 0 1.203125 -0.285156 1.582031 -0.773438 c 0.378907 -0.492187 0.511719 -1.128906 0.355469 -1.726562 c -0.226562 0.882812 -1.023438 1.5 -1.9375 1.5 h -10 c -0.914062 0 -1.710938 -0.617188 -1.9375 -1.5 z m 0 0" fill="#9141ac"/>
|
||||
<path d="m 110 74 h -14 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 14 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m 0 5 h -14 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 14 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m 0 5 h -14 c -0.550781 0 -1 0.449219 -1 1 s 0.449219 1 1 1 h 14 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 z m 0 0" fill="#613583"/>
|
||||
<path d="m 21.5 79 h -3 c -1.378906 0 -2.5 1.121094 -2.5 2.5 s 1.121094 2.5 2.5 2.5 h 3 c 1.378906 0 2.5 -1.121094 2.5 -2.5 s -1.121094 -2.5 -2.5 -2.5 z m 11 0 h -3 c -1.378906 0 -2.5 1.121094 -2.5 2.5 s 1.121094 2.5 2.5 2.5 h 3 c 1.378906 0 2.5 -1.121094 2.5 -2.5 s -1.121094 -2.5 -2.5 -2.5 z m 0 0"/>
|
||||
<path d="m 22 79 h -4 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 4 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 11 0 h -4 c -1.105469 0 -2 0.894531 -2 2 s 0.894531 2 2 2 h 4 c 1.105469 0 2 -0.894531 2 -2 s -0.894531 -2 -2 -2 z m 0 0" fill="#3d3846"/>
|
||||
<g clip-path="url(#j)" mask="url(#f)">
|
||||
<g clip-path="url(#i)" mask="url(#g)">
|
||||
<path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#h)"/>
|
||||
<path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m 42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v -21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 3C1.89543 3 1 3.89543 1 5V11C1 12.1046 1.89543 13 3 13H13C14.1046 13 15 12.1046 15 11V5C15 3.89543 14.1046 3 13 3H3ZM6 5C5.44772 5 5 5.44772 5 6V10C5 10.5523 5.44772 11 6 11H10C10.5523 11 11 10.5523 11 10V6C11 5.44772 10.5523 5 10 5H6ZM12 8C12 7.44772 12.4477 7 13 7C13.5523 7 14 7.44772 14 8C14 8.55228 13.5523 9 13 9C12.4477 9 12 8.55228 12 8ZM3 7C2.44772 7 2 7.44772 2 8C2 8.55228 2.44772 9 3 9C3.55228 9 4 8.55228 4 8C4 7.44772 3.55228 7 3 7Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 618 B |
@@ -1,13 +1,11 @@
|
||||
application_id = 'hu.kramo.Cartridges'
|
||||
|
||||
scalable_dir = join_paths('hicolor', 'scalable', 'apps')
|
||||
install_data(
|
||||
join_paths(scalable_dir, ('@0@.svg').format(application_id)),
|
||||
join_paths(scalable_dir, ('@0@.svg').format(app_id)),
|
||||
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
|
||||
)
|
||||
|
||||
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
|
||||
install_data(
|
||||
join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
|
||||
join_paths(symbolic_dir, ('@0@-symbolic.svg').format(app_id)),
|
||||
install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
|
||||
)
|
||||
|
||||
@@ -11,7 +11,11 @@ blueprints = custom_target('blueprints',
|
||||
)
|
||||
|
||||
gnome.compile_resources('cartridges',
|
||||
'cartridges.gresource.xml',
|
||||
configure_file(
|
||||
input: 'cartridges.gresource.xml.in',
|
||||
output: 'cartridges.gresource.xml',
|
||||
configuration: conf
|
||||
),
|
||||
gresource_bundle: true,
|
||||
install: true,
|
||||
install_dir: pkgdatadir,
|
||||
@@ -19,8 +23,12 @@ gnome.compile_resources('cartridges',
|
||||
)
|
||||
|
||||
desktop_file = i18n.merge_file(
|
||||
input: 'hu.kramo.Cartridges.desktop.in',
|
||||
output: 'hu.kramo.Cartridges.desktop',
|
||||
input: configure_file(
|
||||
input: 'hu.kramo.Cartridges.desktop.in',
|
||||
output: app_id + '.desktop.in',
|
||||
configuration: conf
|
||||
),
|
||||
output: app_id + '.desktop',
|
||||
type: 'desktop',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
@@ -33,8 +41,12 @@ if desktop_utils.found()
|
||||
endif
|
||||
|
||||
appstream_file = i18n.merge_file(
|
||||
input: 'hu.kramo.Cartridges.metainfo.xml.in',
|
||||
output: 'hu.kramo.Cartridges.metainfo.xml',
|
||||
input: configure_file(
|
||||
input: 'hu.kramo.Cartridges.metainfo.xml.in',
|
||||
output: app_id + '.metainfo.xml.in',
|
||||
configuration: conf
|
||||
),
|
||||
output: app_id + '.metainfo.xml',
|
||||
po_dir: '../po',
|
||||
install: true,
|
||||
install_dir: join_paths(get_option('datadir'), 'metainfo')
|
||||
@@ -45,7 +57,12 @@ if appstream_util.found()
|
||||
test('Validate appstream file', appstream_util, args: ['validate', appstream_file])
|
||||
endif
|
||||
|
||||
install_data('hu.kramo.Cartridges.gschema.xml',
|
||||
install_data(
|
||||
configure_file(
|
||||
input: 'hu.kramo.Cartridges.gschema.xml.in',
|
||||
output: app_id + '.gschema.xml',
|
||||
configuration: conf
|
||||
),
|
||||
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id" : "hu.kramo.Cartridges",
|
||||
"id" : "hu.kramo.Cartridges.Devel",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "44",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
@@ -117,10 +117,13 @@
|
||||
"name" : "cartridges",
|
||||
"builddir" : true,
|
||||
"buildsystem" : "meson",
|
||||
"config-opts": [
|
||||
"-Dprofile=development"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "dir",
|
||||
"path" : "."
|
||||
"path" : ".."
|
||||
}
|
||||
]
|
||||
}
|
||||
20
meson.build
20
meson.build
@@ -1,14 +1,32 @@
|
||||
project('cartridges',
|
||||
version: '1.5.2',
|
||||
version: '1.5.5',
|
||||
meson_version: '>= 0.59.0',
|
||||
default_options: [ 'warning_level=2', 'werror=false', ],
|
||||
)
|
||||
|
||||
i18n = import('i18n')
|
||||
gnome = import('gnome')
|
||||
python = import('python')
|
||||
|
||||
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
||||
|
||||
profile = get_option('profile')
|
||||
if profile == 'development'
|
||||
app_id = 'hu.kramo.Cartridges.Devel'
|
||||
prefix = '/hu/kramo/Cartridges/Devel'
|
||||
elif profile == 'release'
|
||||
app_id = 'hu.kramo.Cartridges'
|
||||
prefix = '/hu/kramo/Cartridges'
|
||||
endif
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('PYTHON', python.find_installation('python3').full_path())
|
||||
conf.set('APP_ID', app_id)
|
||||
conf.set('PREFIX', prefix)
|
||||
conf.set('VERSION', meson.project_version())
|
||||
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
|
||||
conf.set('pkgdatadir', pkgdatadir)
|
||||
|
||||
subdir('data')
|
||||
subdir('src')
|
||||
subdir('po')
|
||||
|
||||
9
meson_options.txt
Normal file
9
meson_options.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
option(
|
||||
'profile',
|
||||
type: 'combo',
|
||||
choices: [
|
||||
'release',
|
||||
'development',
|
||||
],
|
||||
value: 'release'
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
data/hu.kramo.Cartridges.desktop.in
|
||||
data/hu.kramo.Cartridges.gschema.xml
|
||||
data/hu.kramo.Cartridges.gschema.xml.in
|
||||
data/hu.kramo.Cartridges.metainfo.xml.in
|
||||
|
||||
data/gtk/details_window.blp
|
||||
|
||||
1
src/__builtins__.pyi
Normal file
1
src/__builtins__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
def _(_msg: str, /) -> str: ...
|
||||
@@ -32,7 +32,7 @@ from .save_cover import resize_cover, save_cover
|
||||
from .steamgriddb import SGDBSave
|
||||
|
||||
|
||||
@Gtk.Template(resource_path="/hu/kramo/Cartridges/gtk/details_window.ui")
|
||||
@Gtk.Template(resource_path=shared.PREFIX + "/gtk/details_window.ui")
|
||||
class DetailsWindow(Adw.Window):
|
||||
__gtype_name__ = "DetailsWindow"
|
||||
|
||||
|
||||
10
src/game.py
10
src/game.py
@@ -24,13 +24,13 @@ import subprocess
|
||||
from pathlib import Path
|
||||
from time import time
|
||||
|
||||
from gi.repository import Adw, Gio, Gtk
|
||||
from gi.repository import Adw, Gtk
|
||||
|
||||
from . import shared
|
||||
from .game_cover import GameCover
|
||||
|
||||
|
||||
@Gtk.Template(resource_path="/hu/kramo/Cartridges/gtk/game.ui")
|
||||
@Gtk.Template(resource_path=shared.PREFIX + "/gtk/game.ui")
|
||||
class Game(Gtk.Box):
|
||||
__gtype_name__ = "Game"
|
||||
|
||||
@@ -65,7 +65,7 @@ class Game(Gtk.Box):
|
||||
|
||||
self.win = shared.win
|
||||
self.app = self.win.get_application()
|
||||
self.version = shared.spec_version
|
||||
self.version = shared.SPEC_VERSION
|
||||
|
||||
self.update_values(data)
|
||||
|
||||
@@ -189,7 +189,7 @@ class Game(Gtk.Box):
|
||||
|
||||
args = (
|
||||
"flatpak-spawn --host /bin/sh -c " + shlex.quote(string) # Flatpak
|
||||
if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges"
|
||||
if os.getenv("FLATPAK_ID") == shared.APP_ID
|
||||
else string # Others
|
||||
)
|
||||
|
||||
@@ -201,7 +201,7 @@ class Game(Gtk.Box):
|
||||
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0,
|
||||
)
|
||||
|
||||
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
|
||||
if shared.schema.get_boolean("exit-after-launch"):
|
||||
self.app.quit()
|
||||
|
||||
# The variable is the title of the game
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
from gi.repository import GdkPixbuf, Gio, GLib
|
||||
from PIL import Image, ImageFilter, ImageStat
|
||||
|
||||
from . import shared
|
||||
|
||||
|
||||
class GameCover:
|
||||
pixbuf = None
|
||||
@@ -30,7 +32,7 @@ class GameCover:
|
||||
anim_iter = None
|
||||
|
||||
placeholder_pixbuf = GdkPixbuf.Pixbuf.new_from_resource_at_scale(
|
||||
"/hu/kramo/Cartridges/library_placeholder.svg", 400, 600, False
|
||||
shared.PREFIX + "/library_placeholder.svg", 400, 600, False
|
||||
)
|
||||
|
||||
def __init__(self, pictures, path=None):
|
||||
@@ -91,7 +93,7 @@ class GameCover:
|
||||
)
|
||||
else:
|
||||
self.blurred = GdkPixbuf.Pixbuf.new_from_resource_at_scale(
|
||||
"/hu/kramo/Cartridges/library_placeholder.svg", 2, 2, False
|
||||
shared.PREFIX + "/library_placeholder.svg", 2, 2, False
|
||||
)
|
||||
|
||||
self.luminance = (0.1, 0.8)
|
||||
|
||||
@@ -28,22 +28,19 @@ from .check_install import check_install
|
||||
|
||||
def bottles_installed(path=None):
|
||||
location_key = "bottles-location"
|
||||
bottles_dir = (
|
||||
path if path else Path(shared.schema.get_string(location_key)).expanduser()
|
||||
)
|
||||
check = "library.yml"
|
||||
|
||||
if not (bottles_dir / check).is_file():
|
||||
locations = (
|
||||
(Path(),)
|
||||
if path
|
||||
else (
|
||||
Path.home() / ".var/app/com.usebottles.bottles/data/bottles",
|
||||
shared.data_dir / "bottles",
|
||||
)
|
||||
locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
Path(shared.schema.get_string(location_key)).expanduser(),
|
||||
Path.home() / ".var/app/com.usebottles.bottles/data/bottles",
|
||||
shared.data_dir / "bottles",
|
||||
)
|
||||
)
|
||||
|
||||
bottles_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
bottles_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
|
||||
return bottles_dir
|
||||
|
||||
@@ -86,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,
|
||||
)
|
||||
|
||||
@@ -29,25 +29,22 @@ from .check_install import check_install
|
||||
|
||||
def heroic_installed(path=None):
|
||||
location_key = "heroic-location"
|
||||
heroic_dir = (
|
||||
path if path else Path(shared.schema.get_string(location_key)).expanduser()
|
||||
)
|
||||
check = "config.json"
|
||||
|
||||
if not (heroic_dir / check).is_file():
|
||||
locations = (
|
||||
(Path(),)
|
||||
if path
|
||||
else (
|
||||
Path.home() / ".var/app/com.heroicgameslauncher.hgl/config/heroic",
|
||||
shared.config_dir / "heroic",
|
||||
)
|
||||
locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
Path(shared.schema.get_string(location_key)).expanduser(),
|
||||
Path.home() / ".var/app/com.heroicgameslauncher.hgl/config/heroic",
|
||||
shared.config_dir / "heroic",
|
||||
)
|
||||
)
|
||||
|
||||
if os.name == "nt" and not path:
|
||||
locations += (Path(os.getenv("appdata")) / "heroic",)
|
||||
if os.name == "nt" and not path:
|
||||
locations += (Path(os.getenv("appdata")) / "heroic",)
|
||||
|
||||
heroic_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
heroic_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
|
||||
return heroic_dir
|
||||
|
||||
@@ -63,7 +60,7 @@ def heroic_importer():
|
||||
# Import Epic games
|
||||
if not shared.schema.get_boolean("heroic-import-epic"):
|
||||
pass
|
||||
elif (heroic_dir / "store_cache" / "legendary_library.json").exists():
|
||||
elif (heroic_dir / "store_cache" / "legendary_library.json").is_file():
|
||||
library = json.load(
|
||||
(heroic_dir / "store_cache" / "legendary_library.json").open()
|
||||
)
|
||||
@@ -108,7 +105,7 @@ def heroic_importer():
|
||||
).hexdigest()
|
||||
)
|
||||
|
||||
importer.save_game(values, image_path if image_path.exists() else None)
|
||||
importer.save_game(values, image_path if image_path.is_file() else None)
|
||||
|
||||
except KeyError:
|
||||
pass
|
||||
@@ -116,9 +113,9 @@ def heroic_importer():
|
||||
# Import GOG games
|
||||
if not shared.schema.get_boolean("heroic-import-gog"):
|
||||
pass
|
||||
elif (heroic_dir / "gog_store" / "installed.json").exists() and (
|
||||
elif (heroic_dir / "gog_store" / "installed.json").is_file() and (
|
||||
heroic_dir / "store_cache" / "gog_library.json"
|
||||
).exists():
|
||||
).is_file():
|
||||
installed = json.load((heroic_dir / "gog_store" / "installed.json").open())
|
||||
|
||||
importer.total_queue += len(installed["installed"])
|
||||
@@ -161,12 +158,12 @@ def heroic_importer():
|
||||
values["added"] = current_time
|
||||
values["last_played"] = 0
|
||||
|
||||
importer.save_game(values, image_path if image_path.exists() else None)
|
||||
importer.save_game(values, image_path if image_path.is_file() else None)
|
||||
|
||||
# Import sideloaded games
|
||||
if not shared.schema.get_boolean("heroic-import-sideload"):
|
||||
pass
|
||||
elif (heroic_dir / "sideload_apps" / "library.json").exists():
|
||||
elif (heroic_dir / "sideload_apps" / "library.json").is_file():
|
||||
library = json.load((heroic_dir / "sideload_apps" / "library.json").open())
|
||||
|
||||
importer.total_queue += len(library["games"])
|
||||
@@ -201,4 +198,4 @@ def heroic_importer():
|
||||
/ sha256(item["art_square"].encode()).hexdigest()
|
||||
)
|
||||
|
||||
importer.save_game(values, image_path if image_path.exists() else None)
|
||||
importer.save_game(values, image_path if image_path.is_file() else None)
|
||||
|
||||
@@ -123,25 +123,22 @@ def get_games_async(rows, importer):
|
||||
|
||||
def itch_installed(path=None):
|
||||
location_key = "itch-location"
|
||||
itch_dir = (
|
||||
path if path else Path(shared.schema.get_string(location_key)).expanduser()
|
||||
)
|
||||
check = Path("db") / "butler.db"
|
||||
|
||||
if not (itch_dir / check).is_file():
|
||||
locations = (
|
||||
(Path(),)
|
||||
if path
|
||||
else (
|
||||
Path.home() / ".var/app/io.itch.itch/config/itch",
|
||||
shared.config_dir / "itch",
|
||||
)
|
||||
locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
Path(shared.schema.get_string(location_key)).expanduser(),
|
||||
Path.home() / ".var/app/io.itch.itch/config/itch",
|
||||
shared.config_dir / "itch",
|
||||
)
|
||||
)
|
||||
|
||||
if os.name == "nt" and not path:
|
||||
locations += (Path(os.getenv("appdata")) / "itch",)
|
||||
if os.name == "nt" and not path:
|
||||
locations += (Path(os.getenv("appdata")) / "itch",)
|
||||
|
||||
itch_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
itch_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
|
||||
return itch_dir
|
||||
|
||||
|
||||
@@ -28,44 +28,38 @@ from .check_install import check_install
|
||||
|
||||
def lutris_installed(path=None):
|
||||
location_key = "lutris-location"
|
||||
lutris_dir = (
|
||||
path if path else Path(shared.schema.get_string(location_key)).expanduser()
|
||||
)
|
||||
check = "pga.db"
|
||||
|
||||
if not (lutris_dir / check).is_file():
|
||||
locations = (
|
||||
(Path(),)
|
||||
if path
|
||||
else (
|
||||
Path.home() / ".var/app/net.lutris.Lutris/data/lutris",
|
||||
shared.data_dir / "lutris",
|
||||
)
|
||||
locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
Path(shared.schema.get_string(location_key)).expanduser(),
|
||||
Path.home() / ".var/app/net.lutris.Lutris/data/lutris",
|
||||
shared.data_dir / "lutris",
|
||||
)
|
||||
)
|
||||
|
||||
lutris_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
lutris_dir = check_install(check, locations, (shared.schema, location_key))
|
||||
|
||||
return lutris_dir
|
||||
|
||||
|
||||
def lutris_cache_exists(path=None):
|
||||
cache_key = "lutris-cache-location"
|
||||
cache_dir = path if path else Path(shared.schema.get_string(cache_key)).expanduser()
|
||||
cache_check = "coverart"
|
||||
|
||||
if not (cache_dir / cache_check).exists():
|
||||
cache_locations = (
|
||||
(Path(),)
|
||||
if path
|
||||
else (
|
||||
Path.home() / ".var" / "app" / "net.lutris.Lutris" / "cache" / "lutris",
|
||||
shared.cache_dir / "lutris",
|
||||
)
|
||||
cache_locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
Path(shared.schema.get_string(cache_key)).expanduser(),
|
||||
Path.home() / ".var" / "app" / "net.lutris.Lutris" / "cache" / "lutris",
|
||||
shared.cache_dir / "lutris",
|
||||
)
|
||||
)
|
||||
|
||||
cache_dir = check_install(
|
||||
cache_check, cache_locations, (shared.schema, cache_key)
|
||||
)
|
||||
cache_dir = check_install(cache_check, cache_locations, (shared.schema, cache_key))
|
||||
|
||||
return cache_dir
|
||||
|
||||
@@ -137,4 +131,4 @@ def lutris_importer():
|
||||
values["source"] = f"lutris_{row[3]}"
|
||||
|
||||
image_path = cache_dir / "coverart" / f"{row[2]}.jpg"
|
||||
importer.save_game(values, image_path if image_path.exists() else None)
|
||||
importer.save_game(values, image_path if image_path.is_file() else None)
|
||||
|
||||
@@ -38,7 +38,7 @@ def update_values_from_data(content, values):
|
||||
if data.get("developers"):
|
||||
values["developer"] = ", ".join(data["developers"])
|
||||
|
||||
if data.get("type") != "game":
|
||||
if data.get("type") not in {"game", "demo"}:
|
||||
values["blacklisted"] = True
|
||||
|
||||
return values
|
||||
@@ -90,11 +90,11 @@ def get_game(task, datatypes, current_time, appmanifest, steam_dir):
|
||||
open_file.raise_for_status()
|
||||
content = open_file.json()
|
||||
except requests.exceptions.RequestException:
|
||||
task.return_value((values, image_path if image_path.exists() else None))
|
||||
task.return_value((values, image_path if image_path.is_file() else None))
|
||||
return
|
||||
|
||||
values = update_values_from_data(content, values)
|
||||
task.return_value((values, image_path if image_path.exists() else None))
|
||||
task.return_value((values, image_path if image_path.is_file() else None))
|
||||
|
||||
|
||||
def get_games_async(appmanifests, steam_dir, importer):
|
||||
@@ -126,28 +126,24 @@ def get_games_async(appmanifests, steam_dir, importer):
|
||||
|
||||
def steam_installed(path=None):
|
||||
location_key = "steam-location"
|
||||
steam_dir = Path(shared.schema.get_string(location_key)).expanduser()
|
||||
check = "steamapps"
|
||||
|
||||
if not (steam_dir / check).is_file():
|
||||
subdirs = ("steam", "Steam")
|
||||
locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
steam_dir,
|
||||
Path.home() / ".steam",
|
||||
shared.data_dir / "Steam",
|
||||
Path.home() / ".var/app/com.valvesoftware.Steam/data/Steam",
|
||||
)
|
||||
subdirs = ("steam", "Steam")
|
||||
locations = (
|
||||
(path,)
|
||||
if path
|
||||
else (
|
||||
Path(shared.schema.get_string(location_key)).expanduser(),
|
||||
Path.home() / ".steam",
|
||||
shared.data_dir / "Steam",
|
||||
Path.home() / ".var/app/com.valvesoftware.Steam/data/Steam",
|
||||
)
|
||||
)
|
||||
|
||||
if os.name == "nt":
|
||||
locations += (Path(os.getenv("programfiles(x86)")) / "Steam",)
|
||||
if os.name == "nt":
|
||||
locations += (Path(os.getenv("programfiles(x86)")) / "Steam",)
|
||||
|
||||
steam_dir = check_install(
|
||||
check, locations, (shared.schema, location_key), subdirs
|
||||
)
|
||||
steam_dir = check_install(check, locations, (shared.schema, location_key), subdirs)
|
||||
|
||||
return steam_dir
|
||||
|
||||
@@ -168,13 +164,12 @@ def steam_importer():
|
||||
steam_dirs = [steam_dir]
|
||||
|
||||
for directory in steam_dirs:
|
||||
if not (directory / "steamapps").exists():
|
||||
steam_dirs.remove(directory)
|
||||
|
||||
for directory in steam_dirs:
|
||||
for open_file in (directory / "steamapps").iterdir():
|
||||
if open_file.is_file() and "appmanifest" in open_file.name:
|
||||
appmanifests.append(open_file)
|
||||
try:
|
||||
for open_file in (directory / "steamapps").iterdir():
|
||||
if open_file.is_file() and "appmanifest" in open_file.name:
|
||||
appmanifests.append(open_file)
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
|
||||
importer = shared.importer
|
||||
importer.total_queue += len(appmanifests)
|
||||
|
||||
@@ -44,12 +44,12 @@ class CartridgesApplication(Adw.Application):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
application_id="hu.kramo.Cartridges", flags=Gio.ApplicationFlags.FLAGS_NONE
|
||||
application_id=shared.APP_ID, flags=Gio.ApplicationFlags.FLAGS_NONE
|
||||
)
|
||||
|
||||
def do_activate(self): # pylint: disable=arguments-differ
|
||||
# Set fallback icon-name
|
||||
Gtk.Window.set_default_icon_name("hu.kramo.Cartridges")
|
||||
Gtk.Window.set_default_icon_name(shared.APP_ID)
|
||||
|
||||
# Create the main window
|
||||
self.win = self.props.active_window # pylint: disable=no-member
|
||||
@@ -110,9 +110,9 @@ class CartridgesApplication(Adw.Application):
|
||||
about = Adw.AboutWindow(
|
||||
transient_for=self.win,
|
||||
application_name=_("Cartridges"),
|
||||
application_icon="hu.kramo.Cartridges",
|
||||
application_icon=shared.APP_ID,
|
||||
developer_name="kramo",
|
||||
version="1.5.2",
|
||||
version=shared.VERSION,
|
||||
developers=[
|
||||
"kramo https://kramo.hu",
|
||||
"Arcitec https://github.com/Arcitec",
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
moduledir = join_paths(pkgdatadir, 'cartridges')
|
||||
|
||||
python = import('python')
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('PYTHON', python.find_installation('python3').path())
|
||||
conf.set('VERSION', meson.project_version())
|
||||
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
|
||||
conf.set('pkgdatadir', pkgdatadir)
|
||||
|
||||
configure_file(
|
||||
input: 'cartridges.in',
|
||||
output: 'cartridges',
|
||||
@@ -17,6 +9,11 @@ configure_file(
|
||||
)
|
||||
|
||||
cartridges_sources = [
|
||||
configure_file(
|
||||
input: 'shared.py.in',
|
||||
output: 'shared.py',
|
||||
configuration: conf
|
||||
),
|
||||
'__init__.py',
|
||||
'main.py',
|
||||
'window.py',
|
||||
@@ -24,7 +21,6 @@ cartridges_sources = [
|
||||
'details_window.py',
|
||||
'game.py',
|
||||
'game_cover.py',
|
||||
'shared.py',
|
||||
'importers/steam_importer.py',
|
||||
'importers/lutris_importer.py',
|
||||
'importers/heroic_importer.py',
|
||||
|
||||
@@ -33,7 +33,7 @@ from .lutris_importer import lutris_cache_exists, lutris_installed
|
||||
from .steam_importer import steam_installed
|
||||
|
||||
|
||||
@Gtk.Template(resource_path="/hu/kramo/Cartridges/gtk/preferences.ui")
|
||||
@Gtk.Template(resource_path=shared.PREFIX + "/gtk/preferences.ui")
|
||||
class PreferencesWindow(Adw.PreferencesWindow):
|
||||
__gtype_name__ = "PreferencesWindow"
|
||||
|
||||
@@ -126,7 +126,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
||||
if response == "choose_folder":
|
||||
self.choose_folder(widget, set_cache_dir)
|
||||
|
||||
if lutris_cache_exists(self.win, path):
|
||||
if lutris_cache_exists(path):
|
||||
self.import_changed = True
|
||||
self.set_subtitle(self, "lutris-cache")
|
||||
|
||||
@@ -257,7 +257,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
||||
getattr(win, f'{source_id.replace("-", "_")}_action_row').set_subtitle(
|
||||
# Remove the path if the dir is picked via the Flatpak portal
|
||||
re.sub(
|
||||
"/run/user/\\d*/doc/......../",
|
||||
"/run/user/\\d*/doc/.*/",
|
||||
"",
|
||||
str(
|
||||
Path(shared.schema.get_string(f"{source_id}-location")).expanduser()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# shared.py
|
||||
# shared.py.in
|
||||
#
|
||||
# Copyright 2022-2023 kramo
|
||||
#
|
||||
@@ -22,8 +22,13 @@ from pathlib import Path
|
||||
|
||||
from gi.repository import Gdk, Gio
|
||||
|
||||
schema = Gio.Settings.new("hu.kramo.Cartridges")
|
||||
state_schema = Gio.Settings.new("hu.kramo.Cartridges.State")
|
||||
APP_ID = "@APP_ID@"
|
||||
VERSION = "@VERSION@"
|
||||
PREFIX = "@PREFIX@"
|
||||
SPEC_VERSION = 1.5 # The version of the game_id.json spec
|
||||
|
||||
schema = Gio.Settings.new(APP_ID)
|
||||
state_schema = Gio.Settings.new(APP_ID + ".State")
|
||||
|
||||
data_dir = (
|
||||
Path(os.getenv("XDG_DATA_HOME"))
|
||||
@@ -52,4 +57,3 @@ image_size = (200 * scale_factor, 300 * scale_factor)
|
||||
# pylint: disable=invalid-name
|
||||
win = None
|
||||
importer = None
|
||||
spec_version = 1.5 # The version of the game_id.json spec
|
||||
@@ -23,10 +23,9 @@ from pathlib import Path
|
||||
def check_install(check, locations, setting=None, subdirs=(Path(),)):
|
||||
for location in locations:
|
||||
for subdir in (Path(),) + subdirs:
|
||||
if (location / subdir / check).is_file() or (
|
||||
location / subdir / check
|
||||
).exists():
|
||||
if (location / subdir / check).exists():
|
||||
if setting:
|
||||
setting[0].set_string(setting[1], str(location / subdir))
|
||||
|
||||
return location / subdir
|
||||
|
||||
return False
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
from gi.repository import Adw, Gio, GLib, Gtk
|
||||
from gi.repository import Adw, GLib, Gtk
|
||||
|
||||
from . import shared
|
||||
from .game import Game
|
||||
|
||||
|
||||
@Gtk.Template(resource_path="/hu/kramo/Cartridges/gtk/window.ui")
|
||||
@Gtk.Template(resource_path=shared.PREFIX + "/gtk/window.ui")
|
||||
class CartridgesWindow(Adw.ApplicationWindow):
|
||||
__gtype_name__ = "CartridgesWindow"
|
||||
|
||||
@@ -92,15 +92,20 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
||||
|
||||
self.set_library_child()
|
||||
|
||||
self.notice_empty.set_icon_name(shared.APP_ID + "-symbolic")
|
||||
|
||||
if "Devel" in shared.APP_ID:
|
||||
self.add_css_class("devel")
|
||||
|
||||
games = {}
|
||||
|
||||
if shared.games_dir.exists():
|
||||
if shared.games_dir.is_dir():
|
||||
for open_file in shared.games_dir.iterdir():
|
||||
data = json.load(open_file.open())
|
||||
games[data["game_id"]] = data
|
||||
|
||||
for game_id, game in games.items():
|
||||
if (version := game.get("version")) and version > shared.spec_version:
|
||||
if (version := game.get("version")) and version > shared.SPEC_VERSION:
|
||||
continue
|
||||
|
||||
if game.get("removed"):
|
||||
@@ -318,9 +323,7 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
||||
self.sort_state = str(state).strip("'")
|
||||
self.library.invalidate_sort()
|
||||
|
||||
Gio.Settings(schema_id="hu.kramo.Cartridges.State").set_string(
|
||||
"sort-mode", self.sort_state
|
||||
)
|
||||
shared.state_schema.set_string("sort-mode", self.sort_state)
|
||||
|
||||
def on_toggle_search_action(self, *_args):
|
||||
if self.stack.get_visible_child() == self.library_view:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define MyAppName "Cartridges"
|
||||
#define MyAppVersion "1.5.2"
|
||||
#define MyAppVersion "1.5.5"
|
||||
#define MyAppPublisher "kramo"
|
||||
#define MyAppURL "https://github.com/kra-mo/cartridges"
|
||||
#define MyAppExeName "pythonw.exe"
|
||||
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
Reference in New Issue
Block a user