From 5f87057855651b8a2dc449ea7c0ce7ed1a2ffab7 Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Wed, 20 Dec 2023 23:14:36 +0100 Subject: [PATCH] chore: simplify --- ...xml.in => dev.mnts.ModManager.gschema.xml} | 4 ++-- data/dev.mnts.ModManager.metainfo.xml.in | 2 +- data/icons/meson.build | 4 ++-- data/meson.build | 16 ++++------------ meson.build | 19 ------------------- meson_options.txt | 10 ---------- src/meson.build | 4 ++-- src/settings.rs | 2 +- 8 files changed, 12 insertions(+), 49 deletions(-) rename data/{dev.mnts.ModManager.gschema.xml.in => dev.mnts.ModManager.gschema.xml} (71%) delete mode 100644 meson_options.txt diff --git a/data/dev.mnts.ModManager.gschema.xml.in b/data/dev.mnts.ModManager.gschema.xml similarity index 71% rename from data/dev.mnts.ModManager.gschema.xml.in rename to data/dev.mnts.ModManager.gschema.xml index a80203b..423f5a8 100644 --- a/data/dev.mnts.ModManager.gschema.xml.in +++ b/data/dev.mnts.ModManager.gschema.xml @@ -1,6 +1,6 @@ - - + + {} Dictionary of games being managed. First string is game name second is path to mods folder. diff --git a/data/dev.mnts.ModManager.metainfo.xml.in b/data/dev.mnts.ModManager.metainfo.xml.in index 12e17a3..9b3750a 100644 --- a/data/dev.mnts.ModManager.metainfo.xml.in +++ b/data/dev.mnts.ModManager.metainfo.xml.in @@ -1,6 +1,6 @@ - @APP_ID@ + dev.mnts.ModManager CC0-1.0 GPL-3.0-or-later diff --git a/data/icons/meson.build b/data/icons/meson.build index 9b5e4f1..3acf3c5 100644 --- a/data/icons/meson.build +++ b/data/icons/meson.build @@ -1,11 +1,11 @@ scalable_dir = 'hicolor' / 'scalable' / 'apps' install_data( - scalable_dir / ('@0@.svg').format(application_id), + scalable_dir / ('@0@.svg').format('dev.mnts.ModManager'), install_dir: get_option('datadir') / 'icons' / scalable_dir ) symbolic_dir = 'hicolor' / 'symbolic' / 'apps' install_data( - symbolic_dir / ('@0@-symbolic.svg').format(application_id), + symbolic_dir / ('@0@-symbolic.svg').format('dev.mnts.ModManager'), install_dir: get_option('datadir') / 'icons' / symbolic_dir ) diff --git a/data/meson.build b/data/meson.build index 488d00b..c7d938f 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,9 +1,5 @@ -configuration = configuration_data() -configuration.set('APP_ID', application_id) -configuration.set('GETTEXT_PACKAGE', gettext_package) - desktop_file = i18n.merge_file( - input: configure_file(input: 'dev.mnts.ModManager.metainfo.xml.in', output: '@BASENAME@.in', configuration: configuration), + input: 'dev.mnts.ModManager.desktop.in', output: 'dev.mnts.ModManager.desktop', type: 'desktop', po_dir: '../po', @@ -17,7 +13,7 @@ if desktop_utils.found() endif appstream_file = i18n.merge_file( - input: configure_file(input: 'dev.mnts.ModManager.metainfo.xml.in', output: '@BASENAME@.in', configuration: configuration), + input: 'dev.mnts.ModManager.metainfo.xml.in', output: 'dev.mnts.ModManager.metainfo.xml', po_dir: '../po', install: true, @@ -29,12 +25,8 @@ test('Validate appstream file', appstreamcli, args: ['validate', '--no-net', '--explain', appstream_file]) -gschema = configure_file( - input: '@0@.gschema.xml.in'.format(base_id), - output: '@0@.gschema.xml'.format(application_id), - configuration: configuration, - install: true, - install_dir: get_option('datadir') / 'glib-2.0' / 'schemas' +install_data('dev.mnts.ModManager.gschema.xml', + install_dir: get_option('datadir') / 'glib-2.0' / 'schemas' ) compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) diff --git a/meson.build b/meson.build index 9017219..a9bbf32 100644 --- a/meson.build +++ b/meson.build @@ -7,25 +7,6 @@ project('mod-manager', 'rust', i18n = import('i18n') gnome = import('gnome') -base_id = 'dev.mnts.ModManager' -gettext_package = meson.project_name() - -if get_option('profile') == 'development' - profile = 'Devel' - vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip() - if vcs_tag == '' - version_suffix = '-devel' - else - version_suffix = '-@0@'.format(vcs_tag) - endif - application_id = '@0@.@1@'.format(base_id, profile) -else - profile = '' - version_suffix = '' - application_id = base_id -endif - - subdir('data') subdir('src') subdir('po') diff --git a/meson_options.txt b/meson_options.txt deleted file mode 100644 index 64a6b69..0000000 --- a/meson_options.txt +++ /dev/null @@ -1,10 +0,0 @@ -option( - 'profile', - type: 'combo', - choices: [ - 'default', - 'development' - ], - value: 'default', - description: 'The build profile for ModManager. One of "default" or "development".' -) \ No newline at end of file diff --git a/src/meson.build b/src/meson.build index 4e66df6..abdaffd 100644 --- a/src/meson.build +++ b/src/meson.build @@ -23,9 +23,9 @@ gnome.compile_resources('mod-manager', # Configuration conf = configuration_data() -conf.set_quoted('APP_ID', application_id) +conf.set_quoted('APP_ID', 'dev.mnts.ModManager') conf.set_quoted('VERSION', meson.project_version()) -conf.set_quoted('GETTEXT_PACKAGE', gettext_package) +conf.set_quoted('GETTEXT_PACKAGE', 'mod-manager') conf.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir')) conf.set_quoted('PKGDATADIR', pkgdatadir) conf.set_quoted('API_KEY', '$2a$10$AtaQ/fkWxMoVHVhO.6PMoOHQq7ERdSdpmegqJ09.2Mgj5iTQP3r.2') diff --git a/src/settings.rs b/src/settings.rs index 9a23c3c..252ef02 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -5,7 +5,7 @@ use std::collections::HashMap; use crate::config::APP_ID; -#[gen_settings(file = "./data/dev.mnts.ModManager.gschema.xml.in")] +#[gen_settings(file = "./data/dev.mnts.ModManager.gschema.xml")] #[gen_settings_define( key_name = "games", arg_type = "HashMap",