about: Improve versionning information
I'm always a bit confused by the static 1.1 revision that
appears in the about box.
This patch does:
- add a .version file to the root of the project that represents
- add configure.in bits that parse the .version and get svn
information if source tree seems to be a checkout and svn tool
is available
- add a new define to config.h.in
- add .version as an extra data file in Makefile.am
- print the more user friendly revision number in about box
Please review and apply
Index: configure.in
===================================================================
--- configure.in (revision 3616)
+++ configure.in (working copy)
@@ -103,6 +103,15 @@
AM_CONDITIONAL(CAN_COMPILE_SSE4_1, test "$_CAN_COMPILE_SSE4_1" = yes)
AM_CONDITIONAL(CAN_COMPILE_SSE2, test "$_CAN_COMPILE_SSE2" = yes)
+RAWSTUDIO_VERSION=$(cat .version)
+if test -d .svn ; then
+ if svn --version >/dev/null 2>&1 ; then
+ RAWSTUDIO_SVNREV=$(LC_ALL=C svn info | awk '/^Revision:/ {printf("%s",
$2); }')
+ RAWSTUDIO_VERSION="${RAWSTUDIO_VERSION}-svn${RAWSTUDIO_SVNREV}"
+ fi
+fi
+AC_DEFINE_UNQUOTED([RAWSTUDIO_VERSION], ["$RAWSTUDIO_VERSION"], ["Public
revision"])
+
AC_OUTPUT([
Makefile
librawstudio/Makefile
Index: src/rs-actions.c
===================================================================
--- src/rs-actions.c (revision 3616)
+++ src/rs-actions.c (working copy)
@@ -1146,7 +1146,7 @@
"artists", artists,
"translator-credits", "Simone Contini\nPaweł
Gołaszewski\nAlexandre Prokoudine\nJakub Friedl\nCarsten Mathaes\nEdouard
Gomez\nMartin Egger\nKrzysztof Kościuszkiewicz\nEinar Ryeng\nOlli
Hänninen\nCarlos Dávila\nPatrik Jarl\nOlav Lavell\nRafael Sachetto
Oliveira\nPaco Rivière",
"comments", _("A raw image converter for GTK+/GNOME"),
- "version", VERSION,
+ "version", RAWSTUDIO_VERSION,
"website", "http://rawstudio.org/",
"name", "Rawstudio",
NULL
Index: .version
===================================================================
--- .version (revision 0)
+++ .version (revision 0)
@@ -0,0 +1 @@
+1.3
Index: Makefile.am
===================================================================
--- Makefile.am (revision 3616)
+++ Makefile.am (working copy)
@@ -9,7 +9,8 @@
autogen.sh \
ChangeLog \
rawstudio.desktop \
- gettext.h
+ gettext.h \
+ .version
ChangeLog:
svn2cl -i
--
Edouard Gomez
_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev