chore: simplify

This commit is contained in:
Tine Jozelj 2023-12-20 23:14:36 +01:00
parent a6dca9434d
commit 5f87057855
Signed by: mentos1386
SSH key fingerprint: SHA256:MNtTsLbihYaWF8j1fkOHfkKNlnN1JQfxEU/rBU8nCGw
8 changed files with 12 additions and 49 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="@APP_ID@" gettext-domain="@GETTEXT_PACKAGE@" path="/dev/mnts/ModManager/">
<schemalist gettext-domain="mod-manager">
<schema id="dev.mnts.ModManager" path="/dev/mnts/ModManager/">
<key name="games" type="{ss}">
<default>{}</default>
<summary>Dictionary of games being managed. First string is game name second is path to mods folder.</summary>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>@APP_ID@</id>
<id>dev.mnts.ModManager</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<description>

View file

@ -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
)

View file

@ -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)

View file

@ -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')

View file

@ -1,10 +0,0 @@
option(
'profile',
type: 'combo',
choices: [
'default',
'development'
],
value: 'default',
description: 'The build profile for ModManager. One of "default" or "development".'
)

View file

@ -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')

View file

@ -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<String, String>",