diff --git a/build-aux/uk.me.bcowan.Rugby.yml b/build-aux/uk.me.bcowan.Rugby.yml index 5e34aba6246fc8d2274bdae86fc3958b606bb176..ec2d535c6f828ce73a8e6a91db307c928a01af1d 100644 --- a/build-aux/uk.me.bcowan.Rugby.yml +++ b/build-aux/uk.me.bcowan.Rugby.yml @@ -28,4 +28,4 @@ modules: - type: git url: https://git.fossgalaxy.com/SuborbitalPigeon/rugby.git config_opts: - - "-Ddevelopment=true" + - "-Dprofile=development" diff --git a/meson.build b/meson.build index b2199148b21c5d13b76624cf5ee19029d69b6605..b8cbefc2e4223814d1aff004a37341c993311962 100644 --- a/meson.build +++ b/meson.build @@ -23,12 +23,11 @@ gtk_dep = dependency('gtk4', version: '>= 4.0') libadwaita_dep = dependency('libadwaita-1') conf = configuration_data() -conf.set_quoted('VERSION','@VCS_TAG@') -devel = get_option('development') -conf.set10('DEVELOPMENT', devel) +profile = get_option('profile') +conf.set_quoted('PROFILE', profile) -if devel +if profile == 'development' conf.set_quoted('VERSION', '@0@-@VCS_TAG@'.format(meson.project_version())) else conf.set_quoted('VERSION', meson.project_version()) @@ -41,7 +40,7 @@ config_h = vcs_tag( ), output: 'config.h', command: ['git', 'rev-parse', '--short', 'HEAD'], - fallback: devel ? 'devel' : '', + fallback: (profile == 'development') ? 'devel' : '', ) cflags = ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66', diff --git a/meson_options.txt b/meson_options.txt index 961ff3e117d49085600a3d200387d24cd83bfd08..289d70c0999bf6aea0b28a208c5dab97bcdbccc9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,4 +2,10 @@ # # SPDX-License-Identifier: CC0-1.0 -option('development', type: 'boolean', value: true, description: 'Is this a development build?') +option( + 'profile', + type: 'combo', + choices: ['default', 'development'], + value: 'default', + description: 'What sort of build is this?' +) diff --git a/src/main.c b/src/main.c index ee6f4e5246a769ebd2ea8cd5649cc1e050cbedb1..20756b42873933fc6b1ae27b6d91af71d33f1051 100644 --- a/src/main.c +++ b/src/main.c @@ -17,7 +17,7 @@ on_activate ( GApplication *app, if (!window) window = GTK_WIDGET (rugby_app_window_new (GTK_APPLICATION (app))); - if (DEVELOPMENT) + if (g_strcmp0 (PROFILE, "development") == 0) gtk_widget_add_css_class (GTK_WIDGET (window), "devel"); gtk_window_present (GTK_WINDOW (window));