From 671a06660f2f5919a2db6a8c42a7c82edb9b7347 Mon Sep 17 00:00:00 2001 From: teamcons Date: Sun, 10 May 2026 12:01:32 +0200 Subject: [PATCH] Use profiles --- data/icons/meson.build | 10 +++++----- io.github.ellie_commons.jorts.flathub.yml | 4 ++-- io.github.elly_code.jorts.devel.yml | 4 ++-- io.github.elly_code.jorts.yml | 2 +- meson.build | 14 +++++++------- meson_options.txt | 10 +++++++--- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/data/icons/meson.build b/data/icons/meson.build index 5347e64d..a22357aa 100644 --- a/data/icons/meson.build +++ b/data/icons/meson.build @@ -3,8 +3,8 @@ # # Override only default -if development_build and variant == 'default' - variant = 'devel' +if profile == 'development' and icon_variant == 'default' + icon_variant = 'devel' endif #======================== @@ -14,13 +14,13 @@ icon_sizes = ['16', '24', '32', '48', '64', '128'] foreach i : icon_sizes install_data( - variant / 'hicolor' / i + '.png', + icon_variant / 'hicolor' / i + '.png', install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps', rename: app_id + '.png' ) install_data( - variant / 'hicolor@2' / i + '@2.png', + icon_variant / 'hicolor@2' / i + '@2.png', install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps', rename: app_id + '.png' ) @@ -28,7 +28,7 @@ foreach i : icon_sizes endforeach install_data( - variant / 'scalable.svg', + icon_variant / 'scalable.svg', install_dir: get_option('datadir') / 'icons' / 'scalable' / 'apps', rename: app_id + '.svg' ) diff --git a/io.github.ellie_commons.jorts.flathub.yml b/io.github.ellie_commons.jorts.flathub.yml index 4865cbeb..8d1cb34a 100644 --- a/io.github.ellie_commons.jorts.flathub.yml +++ b/io.github.ellie_commons.jorts.flathub.yml @@ -28,8 +28,8 @@ modules: - name: jorts buildsystem: meson config-opts: - - -Dvariant=default - - -Dlegacy-rdnn=true + - -Dprofile=legacy-rdnn + - -Dicon-variant=default sources: - type: dir path: . diff --git a/io.github.elly_code.jorts.devel.yml b/io.github.elly_code.jorts.devel.yml index 658bc759..21e511fa 100644 --- a/io.github.elly_code.jorts.devel.yml +++ b/io.github.elly_code.jorts.devel.yml @@ -23,8 +23,8 @@ modules: - name: jorts buildsystem: meson config-opts: - - -Dvariant=default - - -Ddevelopment=true + - -Dprofile=development + - -Dicon-variant=default sources: - type: dir path: . diff --git a/io.github.elly_code.jorts.yml b/io.github.elly_code.jorts.yml index c5309391..585dcad3 100644 --- a/io.github.elly_code.jorts.yml +++ b/io.github.elly_code.jorts.yml @@ -21,7 +21,7 @@ modules: - name: jorts buildsystem: meson config-opts: - - -Dvariant=default + - -Dicon-variant=default sources: - type: dir path: . diff --git a/meson.build b/meson.build index 77f075fe..9f218e03 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'jorts', 'vala', 'c', - version: '4.1.1', + version: '4.1.2', license: 'GPL-3.0-or-later' ) @@ -16,8 +16,9 @@ legacy_app_path = '/io/github/ellie_commons/' + app_name vala_flags = [] +profile = get_option('profile') -if get_option('legacy-rdnn') +if profile == 'legacy-rdnn' app_id = legacy_app_id alternate_app_id = correct_app_id app_path = legacy_app_path @@ -30,8 +31,7 @@ else app_path = correct_app_path endif -development_build = get_option('development') -if development_build +if profile == 'development' app_id += '.devel' vala_flags += ['--define', 'DEVEL'] vala_flags += ['--define', 'LATTE'] @@ -39,11 +39,11 @@ endif #================================ # Cool icon variants -variant = get_option('variant') +icon_variant = get_option('icon-variant') -if variant == 'pride' +if icon_variant == 'pride' vala_flags += ['--define', 'PRIDE'] -elif variant == 'halloween' +elif icon_variant == 'halloween' vala_flags += ['--define', 'HALLOWEEN'] else vala_flags += ['--define', 'DEFAULT'] diff --git a/meson_options.txt b/meson_options.txt index fc63b7f9..4548492e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,9 +1,13 @@ -option('variant', +option('profile', + type : 'combo', + choices : ['release', 'development', 'legacy-rdnn'], + value : 'release', + description : 'Which profile to use for the app' +) +option('icon-variant', type : 'combo', choices : ['default', 'classic', 'pride', 'halloween', 'devel'], value : 'default', description : 'The name of the seasonal icon and style to use' ) -option('development', type: 'boolean', value: false, description: 'If this is a development build') -option('legacy-rdnn', type: 'boolean', value: false, description: 'If this uses the legacy RDNN') option('windows_build', type: 'boolean', value: false, description: 'If this is a windows build. Switched on automatically on windows machines') \ No newline at end of file