chore: simplify
This commit is contained in:
parent
a6dca9434d
commit
5f87057855
8 changed files with 12 additions and 49 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<schemalist>
|
<schemalist gettext-domain="mod-manager">
|
||||||
<schema id="@APP_ID@" gettext-domain="@GETTEXT_PACKAGE@" path="/dev/mnts/ModManager/">
|
<schema id="dev.mnts.ModManager" path="/dev/mnts/ModManager/">
|
||||||
<key name="games" type="{ss}">
|
<key name="games" type="{ss}">
|
||||||
<default>{}</default>
|
<default>{}</default>
|
||||||
<summary>Dictionary of games being managed. First string is game name second is path to mods folder.</summary>
|
<summary>Dictionary of games being managed. First string is game name second is path to mods folder.</summary>
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="desktop">
|
<component type="desktop">
|
||||||
<id>@APP_ID@</id>
|
<id>dev.mnts.ModManager</id>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>GPL-3.0-or-later</project_license>
|
<project_license>GPL-3.0-or-later</project_license>
|
||||||
<description>
|
<description>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
scalable_dir = 'hicolor' / 'scalable' / 'apps'
|
scalable_dir = 'hicolor' / 'scalable' / 'apps'
|
||||||
install_data(
|
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
|
install_dir: get_option('datadir') / 'icons' / scalable_dir
|
||||||
)
|
)
|
||||||
|
|
||||||
symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
|
symbolic_dir = 'hicolor' / 'symbolic' / 'apps'
|
||||||
install_data(
|
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
|
install_dir: get_option('datadir') / 'icons' / symbolic_dir
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
configuration = configuration_data()
|
|
||||||
configuration.set('APP_ID', application_id)
|
|
||||||
configuration.set('GETTEXT_PACKAGE', gettext_package)
|
|
||||||
|
|
||||||
desktop_file = i18n.merge_file(
|
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',
|
output: 'dev.mnts.ModManager.desktop',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
po_dir: '../po',
|
po_dir: '../po',
|
||||||
|
@ -17,7 +13,7 @@ if desktop_utils.found()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
appstream_file = i18n.merge_file(
|
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',
|
output: 'dev.mnts.ModManager.metainfo.xml',
|
||||||
po_dir: '../po',
|
po_dir: '../po',
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -29,12 +25,8 @@ test('Validate appstream file', appstreamcli,
|
||||||
args: ['validate', '--no-net', '--explain', appstream_file])
|
args: ['validate', '--no-net', '--explain', appstream_file])
|
||||||
|
|
||||||
|
|
||||||
gschema = configure_file(
|
install_data('dev.mnts.ModManager.gschema.xml',
|
||||||
input: '@0@.gschema.xml.in'.format(base_id),
|
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
|
||||||
output: '@0@.gschema.xml'.format(application_id),
|
|
||||||
configuration: configuration,
|
|
||||||
install: true,
|
|
||||||
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
|
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
|
||||||
|
|
19
meson.build
19
meson.build
|
@ -7,25 +7,6 @@ project('mod-manager', 'rust',
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
gnome = import('gnome')
|
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('data')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('po')
|
subdir('po')
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
option(
|
|
||||||
'profile',
|
|
||||||
type: 'combo',
|
|
||||||
choices: [
|
|
||||||
'default',
|
|
||||||
'development'
|
|
||||||
],
|
|
||||||
value: 'default',
|
|
||||||
description: 'The build profile for ModManager. One of "default" or "development".'
|
|
||||||
)
|
|
|
@ -23,9 +23,9 @@ gnome.compile_resources('mod-manager',
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
conf = configuration_data()
|
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('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('LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
||||||
conf.set_quoted('PKGDATADIR', pkgdatadir)
|
conf.set_quoted('PKGDATADIR', pkgdatadir)
|
||||||
conf.set_quoted('API_KEY', '$2a$10$AtaQ/fkWxMoVHVhO.6PMoOHQq7ERdSdpmegqJ09.2Mgj5iTQP3r.2')
|
conf.set_quoted('API_KEY', '$2a$10$AtaQ/fkWxMoVHVhO.6PMoOHQq7ERdSdpmegqJ09.2Mgj5iTQP3r.2')
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::config::APP_ID;
|
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(
|
#[gen_settings_define(
|
||||||
key_name = "games",
|
key_name = "games",
|
||||||
arg_type = "HashMap<String, String>",
|
arg_type = "HashMap<String, String>",
|
||||||
|
|
Loading…
Reference in a new issue