]> git.sesse.net Git - nageru/commitdiff
Make the Nageru version settable from the Meson configuration.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 6 Dec 2018 18:42:13 +0000 (19:42 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 6 Dec 2018 18:42:13 +0000 (19:42 +0100)
meson.build
nageru/aboutdialog.cpp
nageru/aboutdialog.ui

index 2efead5c8d85f48979a0a68eaa9bed50feb2f54d..9dbfd22648c140dbfded07ed3133bc95fc3e00e4 100644 (file)
@@ -1,4 +1,4 @@
-project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'])
+project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'], version: '1.8.0-pre')
 
 cxx = meson.get_compiler('cpp')
 
@@ -17,6 +17,9 @@ if r.returncode() != 0
 endif
 add_project_arguments('-DMOVIT_SHADER_DIR="' + r.stdout().strip() + '"', language: 'cpp')
 
+# Make the Nageru version available as a #define.
+add_project_arguments('-DNAGERU_VERSION="' + meson.project_version() + '"', language: 'cpp')
+
 # DeckLink has these issues, and we include it from various places.
 if cxx.has_argument('-Wno-non-virtual-dtor')
        add_project_arguments('-Wno-non-virtual-dtor', language: 'cpp')
index 94ef345d92d8a690a46a68ebc4c1e5520684f80f..def415111aa664cb530b1a5bd74e7dae1fe14926 100644 (file)
@@ -10,6 +10,9 @@ AboutDialog::AboutDialog()
        : ui(new Ui::AboutDialog)
 {
        ui->setupUi(this);
+       QString str = ui->header->text();
+       str.replace("@NAGERU_VERSION@", NAGERU_VERSION);
+       ui->header->setText(str);
 
        connect(ui->button_box, &QDialogButtonBox::accepted, [this]{ this->close(); });
 }
index 57caf43bcb9cc4cea93923f1087137ccda5d4950..0ffbd441e2f5daf473c21cb7c7f3c49072f0ee01 100644 (file)
@@ -15,9 +15,9 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <widget class="QLabel" name="label">
+    <widget class="QLabel" name="header">
      <property name="text">
-      <string>&lt;p&gt;&lt;b&gt;Nageru 1.7.5&lt;/b&gt;&lt;/p&gt;
+      <string>&lt;p&gt;&lt;b&gt;Nageru @NAGERU_VERSION@&lt;/b&gt;&lt;/p&gt;
 
 &lt;p&gt;Realtime video mixer&lt;/p&gt;</string>
      </property>