summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2013-08-29 15:41:59 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-08-29 16:56:35 +0200
commite372338807be890f02ae5d7eb56c795df3516c71 (patch)
treea3ee1ba745ebcbd50a1e52222488628826576348
parent2f684f3de4f356bc570d279a392a6afe862314c3 (diff)
make the tinderbox information more reliable in the about dialog (fdo#58034)
Pass the information via config/config_buildid.h. Then cui/source/dialogs/about.cxx will get rebuilt also in the incremental build. Also allow to set EXTRA_BUILDID also via environment variable. This is much easier with tinderboxed that work with static autogen.input. Change-Id: Ic0b0d13f031c988c096bfd4533e650e245a0ad74 Reviewed-on: https://gerrit.libreoffice.org/5680 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
-rw-r--r--.gitignore1
-rw-r--r--config/config_buildid.h.in10
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac7
-rw-r--r--cui/Library_cui.mk1
-rw-r--r--cui/source/dialogs/about.cxx10
6 files changed, 22 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 9aef00e14d99..5ea06d356d08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@
/config.log
/config.status
/config.parms
+/config/config_buildid.h
/config/config_version.h
/config_host.mk
/config_host.mk.last
diff --git a/config/config_buildid.h.in b/config/config_buildid.h.in
new file mode 100644
index 000000000000..04f03b83543a
--- /dev/null
+++ b/config/config_buildid.h.in
@@ -0,0 +1,10 @@
+/*
+Optional Build ID displayed in the about dialog
+*/
+
+#ifndef CONFIG_BUILDID_H
+#define CONFIG_BUILDID_H
+
+#undef EXTRA_BUILDID
+
+#endif
diff --git a/config_host.mk.in b/config_host.mk.in
index 4f1842d80cfd..85bfa89b4580 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -429,7 +429,6 @@ export OOOP_SAMPLES_PACK=@OOOP_SAMPLES_PACK@
export OOOP_TEMPLATES_PACK=@OOOP_TEMPLATES_PACK@
export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@
export OOO_SHELL=@BASH@
-export EXTRA_BUILDID=@EXTRA_BUILDID@
export OOO_VENDOR=@OOO_VENDOR@
export OPENSSL_CFLAGS=$(gb_SPACE)@OPENSSL_CFLAGS@
export OPENSSL_LIBS=$(gb_SPACE)@OPENSSL_LIBS@
diff --git a/configure.ac b/configure.ac
index e05fc8184f23..11316792f959 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11970,15 +11970,17 @@ else
fi
AC_SUBST(STARTCENTER_SPACE_BITMAP)
-EXTRA_BUILDID=
AC_MSG_CHECKING([for extra build ID])
if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
EXTRA_BUILDID="$with_extra_buildid"
+fi
+# in tinderboxes, it is easier to set EXTRA_BUILDID via the environment variable instead of configure switch
+if test -n "$EXTRA_BUILDID" ; then
AC_MSG_RESULT([$EXTRA_BUILDID])
else
AC_MSG_RESULT([not set])
fi
-AC_SUBST(EXTRA_BUILDID)
+AC_DEFINE_UNQUOTED([EXTRA_BUILDID], ["$EXTRA_BUILDID"])
OOO_VENDOR=
AC_MSG_CHECKING([for vendor])
@@ -12390,6 +12392,7 @@ else
fi
AC_CONFIG_FILES([config_host.mk])
+AC_CONFIG_HEADERS([config/config_buildid.h])
AC_CONFIG_HEADERS([config/config_version.h])
AC_OUTPUT
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index b367ad1be29f..c9c00a98041a 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -39,7 +39,6 @@ $(eval $(call gb_Library_add_defs,cui,\
$(if $(filter TRUE,$(ENABLE_TDE)),-DENABLE_TDE) \
$(if $(filter TRUE,$(ENABLE_KDE)),-DENABLE_KDE) \
$(if $(filter TRUE,$(ENABLE_KDE4)),-DENABLE_KDE4) \
- $(if $(EXTRA_BUILDID),-DEXTRA_BUILDID=\""$(EXTRA_BUILDID)"\") \
))
$(eval $(call gb_Library_use_sdk_api,cui))
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index b70754fdb88b..a7ddbb4cf62d 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -48,6 +48,7 @@
#include <sfx2/sfxcommands.h>
#include "about.hxx"
#include "about.hrc"
+#include <config_buildid.h>
#include <sfx2/sfxdefs.hxx>
#include <sfx2/app.hxx>
#include <rtl/ustrbuf.hxx>
@@ -489,10 +490,11 @@ rtl::OUString AboutDialog::GetVersionString()
sVersion += m_sBuildStr.replaceAll("$BUILDID", sBuildId);
}
-#ifdef EXTRA_BUILDID
- sVersion += "\n";
- sVersion += EXTRA_BUILDID;
-#endif
+ if (strlen(EXTRA_BUILDID) > 0)
+ {
+ sVersion += "\n";
+ sVersion += EXTRA_BUILDID;
+ }
return sVersion;
}