On 10/01/13 17:41, Michael Meeks wrote:
Hi there,
I cleaned up the version bits (as well as I could in a back-portable
way for 4.0 - really we should drive this all from one setting in
configure.in IMHO).
I'd like to get the result into -4-0 if someone could review/ pick
these two:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=364cce0a511d3e7a3bbc51e09895999fbdf0dbe1
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0260f0b256c3675bb6d836c0a2babb7626577b7a
And hopefully it'd be possible (any chance you could do that Tor?) to
file an easy-hack to kill remaining code-based 'SUPD' uses to use
LIBO_VERSION_ bits
ok, these didn't cherry-pick cleanly, I manaully changed the "add
LIBO_VERSION_* macros and a config header for them to live in."
patch. After that it didn't build so I added "add config path for commit
bf85d5eb33ff33c9ff94336de9d9f67825296c10"
I don't feel confident pushing this on a friday afternoon, if anyone
else wants to test and try ( say on windows ) then that might be an
idea :-) note: builds for me ok on linux. If not I will push on Monday
Noel
From 656d36f7582ef647b9aa90b9ec46fb506eab2cfa Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@suse.com>
Date: Thu, 10 Jan 2013 17:38:18 +0000
Subject: [PATCH 1/3] export cleaned up dotted version in environment and GtkWindow user-data.
Change-Id: If865127a9a5560f4b3636fb870699e2f3bac0e83
Signed-off-by: Noel Power <noel.power@suse.com>
---
vcl/inc/svdata.hxx | 5 +++++
vcl/source/app/svapp.cxx | 4 ++++
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 4 ++++
vcl/unx/gtk/window/gtkframe.cxx | 6 +-----
4 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index f7dcbd6..5c4ea0c 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -44,6 +44,11 @@
#include <boost/unordered_map.hpp>
+#include <config_version.h>
+
+#define LIBO_VERSION_DOTTED (LIBO_VERSION_MAJOR "." LIBO_VERSION_MINOR "." \
+ LIBO_VERSION_MICRO "." LIBO_VERSION_PATCH)
+
struct ImplTimerData;
struct ImplConfigData;
class ImplDirectFontSubstitution;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 6a799cd..49cc5a7 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -205,6 +205,10 @@ Application* GetpApp()
Application::Application()
{
+ // useful for themes at least, perhaps extensions too
+ rtl::OUString aVar("LIBO_VERSION"), aValue(LIBO_VERSION_DOTTED);
+ osl_setEnvironment(aVar.pData, aValue.pData);
+
if( ! ImplGetSVData() )
ImplInitSVData();
ImplGetSVData()->mpApp = this;
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 46a4c01..736834a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_version.h>
#include "vcl/svapp.hxx"
@@ -4173,6 +4174,9 @@ static void NWAddWidgetToCacheWindow( GtkWidget* widget, SalX11Screen nScreen
)
if ( !rData.gCacheWindow )
{
rData.gCacheWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
+ g_object_set_data( G_OBJECT( rData.gCacheWindow ), "libo-version",
+ (gpointer)LIBO_VERSION_DOTTED );
+
GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(),
nScreen.getXScreen() );
if( pScreen )
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 6bba141..398ece4 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1071,11 +1071,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
m_pWindow = gtk_widget_new( GTK_TYPE_WINDOW, "type", eWinType,
"visible", FALSE, NULL );
g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", this );
-
- static char pVersion[16] = "";
- if( pVersion[0] == '\0' )
- g_sprintf( pVersion, "%d", SUPD );
- g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", pVersion );
+ g_object_set_data( G_OBJECT( m_pWindow ), "libo-version", (gpointer)LIBO_VERSION_DOTTED);
// force wm class hint
m_nExtStyle = ~0;
--
1.7.3.4
From 947986be0968c20c53a5d454be3d2a6d34052def Mon Sep 17 00:00:00 2001
From: Noel Power <noel.power@suse.com>
Date: Fri, 11 Jan 2013 18:38:47 +0000
Subject: [PATCH 3/3] add config path for commit bf85d5eb33ff33c9ff94336de9d9f67825296c10
Change-Id: Ib8dfd276246bc6bd157a63c26184991a9993c3c5
---
solenv/gbuild/platform/com_GCC_defs.mk | 4 +++-
solenv/gbuild/platform/com_MSC_class.mk | 1 +
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 21b34a9..437cdd3 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -157,7 +157,9 @@ gb_DEBUG_CFLAGS := $(GGDB2) $(FINLINE_LIMIT0) $(FNO_INLINE)
gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE)
-gb_LinkTarget_INCLUDE := $(subst -I. , ,$(SOLARINC))
+gb_LinkTarget_INCLUDE :=\
+ $(subst -I. , ,$(SOLARINC)) \
+ -I$(SRCDIR)/config \
ifeq ($(COM_GCC_IS_CLANG),TRUE)
ifeq ($(COMPILER_PLUGIN_TOOL),)
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index d0b3cfc..72d63af 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -108,6 +108,7 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
gb_LinkTarget_INCLUDE :=\
$(subst -I. , ,$(SOLARINC)) \
$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
+ -I$(SRCDIR)/config \
gb_LinkTarget_get_pdbfile = $(call gb_LinkTarget_get_target,)pdb/$(1).pdb
--
1.7.3.4
From a19e10b1bc3354801371f030f8c02cfbbd26b404 Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@suse.com>
Date: Thu, 10 Jan 2013 17:15:37 +0000
Subject: [PATCH 2/3] add LIBO_VERSION_* macros and a config header for them to live in.
Change-Id: Ia6735e3e7f3231722231e9d7a4c9839f08038b96
Signed-off-by: Noel Power <noel.power@suse.com>
---
config/config_version.h.in | 14 ++++++++++++++
configure.ac | 18 +++++++++++++++++-
2 files changed, 31 insertions(+), 1 deletions(-)
create mode 100644 config/config_version.h.in
diff --git a/config/config_version.h.in b/config/config_version.h.in
new file mode 100644
index 0000000..caaa9c4
--- /dev/null
+++ b/config/config_version.h.in
@@ -0,0 +1,14 @@
+/*
+Version settings
+ version 4.0.0.1 is Major.Minor.Micro.Patch
+*/
+
+#ifndef CONFIG_VERSION_H
+#define CONFIG_VERSION_H
+
+#undef LIBO_VERSION_MAJOR
+#undef LIBO_VERSION_MINOR
+#undef LIBO_VERSION_MICRO
+#undef LIBO_VERSION_PATCH
+
+#endif
diff --git a/configure.ac b/configure.ac
index 9da5b39..deb7163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4231,7 +4231,22 @@ SOURCEVERSION="OOO$UPD"
AC_SUBST(UPD)
AC_SUBST(SOURCEVERSION)
-
+dnl ===================================================================
+dnl Grim-ness to export version number of LibreOffice to code
+dnl this needs to be turned around and to be driven by configure
+dnl ===================================================================
+LIBO_VERSION_MAJOR="`$GREP VERSIONMAJOR solenv/inc/minor.mk | sed "s/^.*=//"`"
+LIBO_VERSION_MINOR="`$GREP VERSIONMINOR solenv/inc/minor.mk | sed "s/^.*=//"`"
+LIBO_VERSION_MICRO="`$GREP VERSIONMICRO solenv/inc/minor.mk | sed "s/^.*=//"`"
+LIBO_VERSION_PATCH="`$GREP BUILD solenv/inc/minor.mk | sed "s/^.*=//"`"
+AC_SUBST(LIBO_VERSION_MAJOR)
+AC_SUBST(LIBO_VERSION_MINOR)
+AC_SUBST(LIBO_VERSION_MICRO)
+AC_SUBST(LIBO_VERSION_PATCH)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,"$LIBO_VERSION_MAJOR")
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,"$LIBO_VERSION_MINOR")
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,"$LIBO_VERSION_MICRO")
+AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,"$LIBO_VERSION_PATCH")
dnl ===================================================================
dnl Set the ENABLE_CRASHDUMP variable.
@@ -12160,6 +12175,7 @@ else
fi
AC_CONFIG_FILES([config_host.mk])
+AC_CONFIG_HEADERS([config/config_version.h])
AC_OUTPUT
# touch the config timestamp file
--
1.7.3.4
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.