[gnome-boxes] Use configure.ac's VERSION instead of BUILD_VERSION
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Use configure.ac's VERSION instead of BUILD_VERSION
- Date: Wed, 27 Mar 2013 17:20:00 +0000 (UTC)
commit 34e59289b53ff85aa876c518232fa34ad7244a90
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Mar 27 16:39:29 2013 +0100
Use configure.ac's VERSION instead of BUILD_VERSION
Boxes 3.8.0 reports 3.7.91 as its version even though .tarball-version
has the correct 3.8.0 version. However .version contains 3.7.91,
and this is what is currently used to generate BUILD_VERSION, which
Boxes then uses to report its version in the UI/in --version.
.
Since config.h already provides us with a VERSION #define, it's
better to use this one rather than guessing a version on our
own.
https://bugzilla.gnome.org/show_bug.cgi?id=696709
Makefile.am | 6 +-----
src/app.vala | 2 +-
src/config.vapi | 3 +--
src/main.vala | 2 +-
4 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 49e1e96..2b6b467 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,6 @@ DISTCLEANFILES = \
intltool-merge \
intltool-update \
po/.intltool-merge-cache \
- version.h \
$(NULL)
EXTRA_DIST = \
@@ -65,10 +64,7 @@ BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $ -t && mv $ -t $@
-all: version.h
-
-version.h: $(top_srcdir)/.version
- echo '#define BUILD_VERSION "'`cat $(top_srcdir)/.version`'"' > $ -t && mv $ -t $@
+all:
vala-clean:
rm -f `find . -name "*.stamp"`
diff --git a/src/app.vala b/src/app.vala
index 2075196..44484a9 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -151,7 +151,7 @@ private class Boxes.App: Boxes.UI {
"copyright", "Copyright 2011 Red Hat, Inc.",
"license-type", Gtk.License.LGPL_2_1,
"logo-icon-name", "gnome-boxes",
- "version", Config.BUILD_VERSION,
+ "version", Config.VERSION,
"website", "http://live.gnome.org/Boxes",
"wrap-license", true);
});
diff --git a/src/config.vapi b/src/config.vapi
index c61ddc4..cea0c2a 100644
--- a/src/config.vapi
+++ b/src/config.vapi
@@ -1,7 +1,6 @@
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
namespace Config {
- [CCode (cheader_filename = "version.h")]
- public const string BUILD_VERSION;
+ public const string VERSION;
public const string PACKAGE_DATADIR;
public const string PACKAGE_TARNAME;
public const string GETTEXT_PACKAGE;
diff --git a/src/main.vala b/src/main.vala
index e38e33c..fe46a9d 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -24,7 +24,7 @@ private static void parse_local_args (ref unowned string[] args) {
}
if (version) {
- GLib.stdout.printf ("%s\n", Config.BUILD_VERSION);
+ GLib.stdout.printf ("%s\n", Config.VERSION);
exit (0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]