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

Better version handling

parent 7fae22b2
No related branches found
No related tags found
No related merge requests found
...@@ -27,3 +27,5 @@ modules: ...@@ -27,3 +27,5 @@ modules:
sources: sources:
- type: git - type: git
url: https://git.fossgalaxy.com/SuborbitalPigeon/rugby.git url: https://git.fossgalaxy.com/SuborbitalPigeon/rugby.git
config_opts:
- "-Ddevelopment=true"
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
project('rugby', 'c', project('rugby', 'c',
version: '0.3.0', version: '0.4.alpha',
license:'GPLv3+', license:'GPLv3+',
meson_version: '>= 0.57.0', meson_version: '>= 0.57.0',
default_options: [ default_options: [
...@@ -24,12 +24,24 @@ libadwaita_dep = dependency('libadwaita-1') ...@@ -24,12 +24,24 @@ libadwaita_dep = dependency('libadwaita-1')
conf = configuration_data() conf = configuration_data()
conf.set_quoted('VERSION','@VCS_TAG@') conf.set_quoted('VERSION','@VCS_TAG@')
devel = get_option('development')
conf.set10('DEVELOPMENT', devel)
if devel
conf.set_quoted('VERSION', '@0@-@VCS_TAG@'.format(meson.project_version()))
else
conf.set_quoted('VERSION', meson.project_version())
endif
config_h = vcs_tag( config_h = vcs_tag(
input: configure_file( input: configure_file(
output: 'config.h.in', output: 'config.h.in',
configuration: conf configuration: conf
), ),
output: 'config.h', output: 'config.h',
command: ['git', 'rev-parse', '--short', 'HEAD'],
fallback: devel ? 'devel' : '',
) )
cflags = ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66', cflags = ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66',
......
# SPDX-FileCopyrightText: 2022 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: CC0-1.0
option('development', type: 'boolean', value: true, description: 'Is this a development build?')
...@@ -17,6 +17,9 @@ on_activate ( GApplication *app, ...@@ -17,6 +17,9 @@ on_activate ( GApplication *app,
if (!window) if (!window)
window = GTK_WIDGET (rugby_app_window_new (GTK_APPLICATION (app))); window = GTK_WIDGET (rugby_app_window_new (GTK_APPLICATION (app)));
if (DEVELOPMENT)
gtk_widget_add_css_class (GTK_WIDGET (window), "devel");
gtk_window_present (GTK_WINDOW (window)); 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