From 8b665b58af200b51ec6d884168d3781899ed5ba0 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Thu, 29 Aug 2013 15:41:59 +0200 Subject: make the tinderbox information more reliable in the about dialog (fdo#58034) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Luboš Luňák --- .gitignore | 1 + config/config_buildid.h.in | 10 ++++++++++ config_host.mk.in | 1 - configure.ac | 7 +++++-- cui/Library_cui.mk | 1 - cui/source/dialogs/about.cxx | 10 ++++++---- 6 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 config/config_buildid.h.in 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 bcb016df13cd..eae77d5c5a3a 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -418,7 +418,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 21b68cbf1324..3f685c6d5cc3 100644 --- a/configure.ac +++ b/configure.ac @@ -11853,15 +11853,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]) @@ -12273,6 +12275,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 f7332b991797..8684df7c5412 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -48,6 +48,7 @@ #include #include "about.hxx" #include "about.hrc" +#include #include #include #include @@ -474,10 +475,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; } -- cgit v1.2.3