Initial commit

This commit is contained in:
kramo
2025-11-28 19:14:39 +01:00
commit b6d7f70a93
32 changed files with 1171 additions and 0 deletions

5
data/cartridges.in Executable file
View File

@@ -0,0 +1,5 @@
#!@PYTHON@
import runpy
runpy.run_module("cartridges")

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<gresources>
<gresource prefix="@PREFIX@">
<file preprocess="xml-stripblanks">@APP_ID@.metainfo.xml</file>
</gresource>
</gresources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<gresources>
<gresource prefix="@PREFIX@/icons/scalable/actions">
</gresource>
</gresources>

17
data/icons/meson.build Normal file
View File

@@ -0,0 +1,17 @@
apps_dir = get_option('datadir') / 'icons' / 'hicolor' / '@0@' / 'apps'
install_data(f'@app_id@.svg', install_dir: apps_dir.format('scalable'))
install_data(f'@app_id@-symbolic.svg', install_dir: apps_dir.format('symbolic'))
resource = configure_file(
input: 'icons.gresource.xml.in',
output: '@BASENAME@',
configuration: conf,
)
gnome.compile_resources(
'icons',
resource,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#2e3436" color="#000"><path d="M7.188 2.281c-.094.056-.192.125-.29.19L5.566 3.803a1.684 1.684 0 1 1-2.17 2.17L2.332 7.037c.506-.069 1.017-.136 1.2.026.242.214.139 1.031.155 1.656.213.088.427.171.657.219.04.008.085-.007.125 0 .337-.525.683-1.288 1-1.344.322-.057.905.562 1.406.937a3.7 3.7 0 0 0 .656-.468c-.195-.595-.594-1.369-.437-1.657.158-.29 1.019-.37 1.625-.531.028-.183.062-.371.062-.562 0-.075-.027-.146-.031-.22-.587-.217-1.435-.385-1.562-.687-.128-.302.34-1.021.593-1.593a3.7 3.7 0 0 0-.593-.532m3.875 3.25c-.165.475-.305 1.086-.47 1.563-.43.047-.84.14-1.218.312-.38-.322-.787-.773-1.156-1.093a5.6 5.6 0 0 0-.688.468c.177.46.453 1.001.625 1.469-.298.309-.531.67-.719 1.063-.494 0-1.102-.084-1.593-.094a6 6 0 0 0-.219.812c.435.24 1.006.468 1.438.72-.006.093-.032.185-.032.28 0 .333.049.66.125.97-.382.304-.898.63-1.28.937.015.044.04.083.058.127l.613.613c.417-.1.868-.223 1.266-.303.248.343.532.626.875.875-.027.135-.068.283-.104.428.174-.063.34-.155.482-.297l1.432-1.432a1.994 1.994 0 0 1 .533-3.918c.919 0 1.684.623 1.918 1.467l1.338-1.338q.088-.09.156-.191c-.035-.062-.06-.13-.1-.188.096-.152.205-.31.315-.47.017-.348-.1-.7-.37-.971l-.177-.176c-.28.192-.561.387-.83.555-.345-.233-.746-.383-1.156-.5-.077-.507-.107-1.132-.187-1.625a5.4 5.4 0 0 0-.875-.063m-9.247.608q-.131.103-.254.205l.014.035z" overflow="visible" style="marker:none"/><path d="M8.707.293a1 1 0 0 0-1.415 0l-6.999 7a1 1 0 0 0 0 1.413l7 7.001a1 1 0 0 0 1.415 0l7-7a1 1 0 0 0 0-1.413zm-.708 2.121 5.587 5.587L8 13.586 2.414 7.999z" font-family="sans-serif" font-weight="400" overflow="visible" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g fill="#2e3436" color="#000"><path d="M7.188 2.281c-.094.056-.192.125-.29.19L5.566 3.803a1.684 1.684 0 1 1-2.17 2.17L2.332 7.037c.506-.069 1.017-.136 1.2.026.242.214.139 1.031.155 1.656.213.088.427.171.657.219.04.008.085-.007.125 0 .337-.525.683-1.288 1-1.344.322-.057.905.562 1.406.937a3.7 3.7 0 0 0 .656-.468c-.195-.595-.594-1.369-.437-1.657.158-.29 1.019-.37 1.625-.531.028-.183.062-.371.062-.562 0-.075-.027-.146-.031-.22-.587-.217-1.435-.385-1.562-.687-.128-.302.34-1.021.593-1.593a3.7 3.7 0 0 0-.593-.532m3.875 3.25c-.165.475-.305 1.086-.47 1.563-.43.047-.84.14-1.218.312-.38-.322-.787-.773-1.156-1.093a5.6 5.6 0 0 0-.688.468c.177.46.453 1.001.625 1.469-.298.309-.531.67-.719 1.063-.494 0-1.102-.084-1.593-.094a6 6 0 0 0-.219.812c.435.24 1.006.468 1.438.72-.006.093-.032.185-.032.28 0 .333.049.66.125.97-.382.304-.898.63-1.28.937.015.044.04.083.058.127l.613.613c.417-.1.868-.223 1.266-.303.248.343.532.626.875.875-.027.135-.068.283-.104.428.174-.063.34-.155.482-.297l1.432-1.432a1.994 1.994 0 0 1 .533-3.918c.919 0 1.684.623 1.918 1.467l1.338-1.338q.088-.09.156-.191c-.035-.062-.06-.13-.1-.188.096-.152.205-.31.315-.47.017-.348-.1-.7-.37-.971l-.177-.176c-.28.192-.561.387-.83.555-.345-.233-.746-.383-1.156-.5-.077-.507-.107-1.132-.187-1.625a5.4 5.4 0 0 0-.875-.063m-9.247.608q-.131.103-.254.205l.014.035z" overflow="visible" style="marker:none"/><path d="M8.707.293a1 1 0 0 0-1.415 0l-6.999 7a1 1 0 0 0 0 1.413l7 7.001a1 1 0 0 0 1.415 0l7-7a1 1 0 0 0 0-1.413zm-.708 2.121 5.587 5.587L8 13.586 2.414 7.999z" font-family="sans-serif" font-weight="400" overflow="visible" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none"/></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

81
data/meson.build Normal file
View File

@@ -0,0 +1,81 @@
desktop_file = configure_file(
input: 'page.kramo.Cartridges.desktop.in',
output: '@PLAINNAME@',
configuration: conf,
)
desktop_file = i18n.merge_file(
input: desktop_file,
output: f'@app_id@.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'applications',
)
test('Validate desktop file', desktop_utils, args: desktop_file)
configure_file(
input: 'page.kramo.Cartridges.gschema.xml.in',
output: f'@app_id@.gschema.xml',
configuration: conf,
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas',
)
test(
'Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()],
)
appstream_file = configure_file(
input: 'page.kramo.Cartridges.metainfo.xml.in',
output: '@PLAINNAME@',
configuration: conf,
)
appstream_file = i18n.merge_file(
input: appstream_file,
output: f'@app_id@.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'metainfo',
)
test(
'Validate appstream file',
appstreamcli,
args: ['validate', '--no-net', '--explain', appstream_file],
)
configure_file(
input: 'page.kramo.Cartridges.service.in',
output: f'@app_id@.service',
configuration: conf,
install_dir: get_option('datadir') / 'dbus-1' / 'services',
)
configure_file(
input: 'cartridges.in',
output: '@BASENAME@',
configuration: conf,
install_dir: get_option('bindir'),
install_mode: 'r-xr-xr-x',
)
resource = configure_file(
input: 'data.gresource.xml.in',
output: '@BASENAME@',
configuration: conf,
)
gnome.compile_resources(
'data',
resource,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
dependencies: appstream_file,
)
subdir('icons')

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Cartridges
Exec=cartridges
Icon=@APP_ID@
Terminal=false
Type=Application
Categories=Utility;
Keywords=GTK;
StartupNotify=true
DBusActivatable=true

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<schemalist gettext-domain="cartridges">
<schema id="@APP_ID@" path="@PREFIX@/">
</schema>
</schemalist>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>@APP_ID@</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<name>Cartridges</name>
<summary>Keep the summary shorter, between 10 and 35 characters</summary>
<description>
<p>No description</p>
</description>
<developer id="page.kramo">
<name translate="no">Developer Name</name>
</developer>
<url type="homepage">https://example.org/</url>
<url type="vcs-browser">https://example.org/repository</url>
<url type="bugtracker">https://example.org/issues</url>
<url type="translate">https://example.org/translate</url>
<url type="faq">https://example.org/faq</url>
<url type="help">https://example.org/help</url>
<url type="donation">https://example.org/donate</url>
<url type="contact">https://example.org/contact</url>
<url type="contribute">https://example.org/contribute</url>
<translation type="gettext">cartridges</translation>
<launchable type="desktop-id">@APP_ID@.desktop</launchable>
<content_rating type="oars-1.1" />
<requires>
<display_length compare="ge">360</display_length>
</requires>
<supports>
<control>keyboard</control>
<control>pointing</control>
<control>touch</control>
</supports>
<branding>
<color type="primary" scheme_preference="light">#ff00ff</color>
<color type="primary" scheme_preference="dark">#993d3d</color>
</branding>
<releases>
<release version="49.0"/>
</releases>
</component>

View File

@@ -0,0 +1,3 @@
[D-BUS Service]
Name=@APP_ID@
Exec=@BINDIR@/cartridges --gapplication-service