Skip to content

Commit

Permalink
More 3.2.0 and translations prep
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidyjames committed May 24, 2024
1 parent a276650 commit 6355921
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 52 deletions.
26 changes: 26 additions & 0 deletions build-aux/flatpak/com.cassidyjames.plausible.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"id": "com.cassidyjames.plausible",
"runtime": "org.gnome.Platform",
"runtime-version": "46",
"sdk": "org.gnome.Sdk",
"command": "com.cassidyjames.plausible",
"finish-args": [
"--socket=wayland",
"--socket=fallback-x11",
"--share=ipc",
"--share=network",
"--device=dri"
],
"modules": [
{
"name": "tally",
"buildsystem": "meson",
"sources": [
{
"type": "dir",
"path": "."
}
]
}
]
}
29 changes: 9 additions & 20 deletions build-aux/meson/post_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
import os
import subprocess

prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = os.path.join(prefix, 'share')
schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')

# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
print('Updating icon cache...')
icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
if not os.path.exists(icon_cache_dir):
os.makedirs(icon_cache_dir)
subprocess.call(['gtk-update-icon-cache', '-qtf', icon_cache_dir])

print('Updating desktop database...')
desktop_database_dir = os.path.join(datadir, 'applications')
if not os.path.exists(desktop_database_dir):
os.makedirs(desktop_database_dir)
subprocess.call(['update-desktop-database', '-q', desktop_database_dir])

print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
print('Compiling gsettings schemas…')
subprocess.call([
'glib-compile-schemas',
os.path.join(
os.environ['MESON_INSTALL_PREFIX'],
'share',
'glib-2.0',
'schemas')
])
26 changes: 0 additions & 26 deletions com.cassidyjames.plausible.json

This file was deleted.

2 changes: 2 additions & 0 deletions data/metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
<ul>
<li>Updated colors throughout the app</li>
<li>More subtle header bar to fit in better in both light and dark styles</li>
<li>Improved About dialog</li>
<li>More preparation for translations</li>
</ul>
</description>
</release>
Expand Down
19 changes: 13 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
project(
'com.cassidyjames.plausible',
'vala', 'c',
version: '3.2.0'
version: '3.2.0',
meson_version: '>= 0.62',
)

i18n = import('i18n')
gnome = import('gnome')

add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()), language:'c')

asresources = gnome.compile_resources(
'as-resources',
'data' / 'gresource.xml',
source_dir: 'data'
source_dir: 'data',
c_name: 'as',
)

config_data = configuration_data()
Expand All @@ -22,7 +25,7 @@ config_data.set_quoted('VERSION', meson.project_version())
config_file = configure_file(
input: 'src/Config.vala.in',
output: '@BASENAME@',
configuration: config_data
configuration: config_data,
)

executable(
Expand All @@ -35,13 +38,17 @@ executable(
dependencies: [
dependency('glib-2.0'),
dependency('gtk4'),
dependency('libadwaita-1'),
dependency('libadwaita-1', version: '>=1.5'),
dependency('webkitgtk-6.0'),
meson.get_compiler('vala').find_library('posix'),
],
install: true
install: true,
)

subdir('data')

meson.add_install_script('build-aux' / 'meson'/ 'post_install.py')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)

0 comments on commit 6355921

Please sign in to comment.