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 14:52:09 +0000
commit8b665b58af200b51ec6d884168d3781899ed5ba0 (patch)
tree3874241fd57af6c72af1e8b990211909f70ea3a8
parent563d441f9401d8868fae0dc379e9b712019325e7 (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 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 <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>
@@ -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;
}