Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvladus committed Aug 23, 2023
1 parent 8aa6598 commit 166bbde
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 16 deletions.
4 changes: 2 additions & 2 deletions build-aux/run-flatpak.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/bash
echo -e "\n\033[32;1m---------- BUILDING ERRANDS ---------\033[0m\n"
flatpak run org.flatpak.Builder --user --install --force-clean --keep-build-dirs --ccache --disable-updates _build io.github.mrvladus.List.json
flatpak run org.flatpak.Builder --user --install --force-clean --keep-build-dirs --ccache --disable-updates _build io.github.mrvladus.List.Devel.json
echo -e "\n\033[32;1m---------- RUNNING ERRANDS ----------\033[0m\n"
flatpak run io.github.mrvladus.List
flatpak run io.github.mrvladus.List.Devel
echo -e "\n\033[32;1m------------- DONE! --------------\033[0m\n"
2 changes: 1 addition & 1 deletion data/io.github.mrvladus.List.gschema.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="list">
<schema id="io.github.mrvladus.List" path="/io/github/mrvladus/List/">
<schema id="@APP_ID@" path="/io/github/mrvladus/List/">
<key name="width" type="i">
<default>500</default>
</key>
Expand Down
13 changes: 12 additions & 1 deletion data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ install_data(
install_dir: join_paths(get_option('datadir'), 'metainfo')
)

install_data('io.github.mrvladus.List.gschema.xml',
install_data(
configure_file(
input: 'io.github.mrvladus.List.gschema.xml',
output: app_id + '.gschema.xml',
configuration: conf
),
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)

compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('Validate schema file',
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()])
endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app-id": "io.github.mrvladus.List",
"app-id": "io.github.mrvladus.List.Devel",
"runtime": "org.gnome.Platform",
"runtime-version": "44",
"sdk": "org.gnome.Sdk",
Expand All @@ -15,6 +15,9 @@
{
"name": "errands",
"buildsystem": "meson",
"config-opts": [
"-Dprofile=development"
],
"sources": [
{
"type": "dir",
Expand Down
22 changes: 22 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ project(

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 = 'io.github.mrvladus.List.Devel'
prefix = '/io/github/mrvladus/List/Devel'
elif profile == 'release'
app_id = 'io.github.mrvladus.List'
prefix = '/io/github/mrvladus/List'
endif

conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').full_path())
conf.set('PYTHON_VERSION', python.find_installation('python3').language_version())
conf.set('APP_ID', app_id)
conf.set('PREFIX', prefix)
conf.set('VERSION', meson.project_version())
conf.set('PROFILE', profile)
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)

subdir('data')
subdir('src')
Expand Down
9 changes: 9 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
option(
'profile',
type: 'combo',
choices: [
'release',
'development',
],
value: 'release'
)
2 changes: 1 addition & 1 deletion src/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

from gi.repository import Gio, Adw, Gtk, Gdk

from __main__ import APP_ID
from __main__ import APP_ID, PREFIX

from .utils import GSettings, UserData, Log
from .window import Window
Expand Down
1 change: 1 addition & 0 deletions src/errands.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

APP_ID = "@APP_ID@"
VERSION = "@VERSION@"
PREFIX = "@PREFIX@"
pkgdatadir = "@pkgdatadir@"
localedir = "@localedir@"

Expand Down
10 changes: 0 additions & 10 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, meson.project_name())

subdir('res')

python = import('python')

conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').full_path())
conf.set('VERSION', meson.project_version())
conf.set('APP_ID', 'io.github.mrvladus.List')
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)

configure_file(
input: 'errands.py',
output: 'errands',
Expand Down

0 comments on commit 166bbde

Please sign in to comment.