Skip to content
Snippets Groups Projects
Verified Commit 0fddd186 authored by Bruce Cowan's avatar Bruce Cowan :airplane:
Browse files

Use combo for default-development profile

parent ef3de424
No related branches found
No related tags found
No related merge requests found
......@@ -28,4 +28,4 @@ modules:
- type: git
url: https://git.fossgalaxy.com/SuborbitalPigeon/rugby.git
config_opts:
- "-Ddevelopment=true"
- "-Dprofile=development"
......@@ -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',
......
......@@ -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?'
)
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment