Update build configuration
This commit is contained in:
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="/hu/kramo/Cartridges/Devel/">
|
||||
<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>
|
||||
|
||||
@@ -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,6 +117,9 @@
|
||||
"name" : "cartridges",
|
||||
"builddir" : true,
|
||||
"buildsystem" : "meson",
|
||||
"config-opts": [
|
||||
"-Dprofile=development"
|
||||
],
|
||||
"sources" : [
|
||||
{
|
||||
"type" : "dir",
|
||||
18
meson.build
18
meson.build
@@ -6,9 +6,27 @@ project('cartridges',
|
||||
|
||||
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
|
||||
|
||||
@@ -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.state_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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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,6 +92,11 @@ 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.is_dir():
|
||||
@@ -100,7 +105,7 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
||||
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:
|
||||
|
||||
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
Reference in New Issue
Block a user