[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - configure.ac Repository.mk shell/Library_spsupp.mk shell/Library_spsupp_x64.mk shell/Library_spsupp_x86.mk shell/Module_shell.mk solenv/gbuild

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 20 15:45:55 UTC 2019


 Repository.mk               |   12 +++++++++++-
 configure.ac                |    2 ++
 shell/Library_spsupp_x64.mk |    5 -----
 shell/Library_spsupp_x86.mk |   21 +++++++++------------
 shell/Module_shell.mk       |   12 +++++++++++-
 solenv/gbuild/Library.mk    |    1 +
 6 files changed, 34 insertions(+), 19 deletions(-)

New commits:
commit 733db098ddce73d951b64fff4b98daddbc0a5979
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue May 7 21:22:08 2019 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Jun 20 17:45:00 2019 +0200

    Make spsupp*.dll usable on 64-bit Windows
    
    Build spsupp for both x64 and x86, regardless of target platform.
    This allows to install the ActiveX component to be used by both
    64-bit and 32-bit applications on 64-bit systems (especially IE,
    which runs both 64-bit and 32-bit processes simultaneously at
    least on Win10), no matter which LO (32/64) was installed.
    
    Move the DLLs from activex feature to ooo, to copy unconditionally.
    Registration of LO-specific component will be also unconditional;
    registration of replacement of MSO component will need own feature.
    
    This doesn't yet register the component in system: TODO later.
    
    Change-Id: Iccf5e73dfae306cb777f844d40611e23c4520a13
    Reviewed-on: https://gerrit.libreoffice.org/71925
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/74410

diff --git a/Repository.mk b/Repository.mk
index 9c1b992c425e..268af2df6fd5 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -664,16 +664,26 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexbina
 
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activex, \
 	so_activex \
-	spsupp \
 ))
 
 ifneq ($(BUILD_X64),)
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,activexwin64, \
 	so_activex_x64 \
+))
+endif
+
+ifneq ($(CXX_X64_BINARY),)
+$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
 	spsupp_x64 \
 ))
 endif
 
+ifneq ($(CXX_X86_BINARY),)
+$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
+	spsupp_x86 \
+))
+endif
+
 $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooobinarytable, \
 	$(if $(WINDOWS_SDK_HOME),\
 		instooofiltmsi \
diff --git a/configure.ac b/configure.ac
index 3eaab42340ec..ec9ba8726c1f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3602,6 +3602,8 @@ if test "$_os" = "WINNT"; then
             AC_MSG_RESULT([not found])
             AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
         fi
+    else
+        CXX_X64_BINARY=$MSVC_CXX
     fi
     AC_SUBST(BUILD_X64)
 
diff --git a/shell/Library_spsupp_x64.mk b/shell/Library_spsupp_x64.mk
index 4b36a6c8d105..1988b2745539 100644
--- a/shell/Library_spsupp_x64.mk
+++ b/shell/Library_spsupp_x64.mk
@@ -20,11 +20,6 @@ $(eval $(call gb_Library_set_include,spsupp_x64,\
 	$$(INCLUDE) \
 ))
 
-$(eval $(call gb_Library_add_defs,spsupp_x64,\
-	-DUNICODE \
-	-D_UNICODE \
-))
-
 $(eval $(call gb_Library_use_system_win32_libs,spsupp_x64,\
 	advapi32 \
 	kernel32 \
diff --git a/shell/Library_spsupp.mk b/shell/Library_spsupp_x86.mk
similarity index 63%
rename from shell/Library_spsupp.mk
rename to shell/Library_spsupp_x86.mk
index fd9bdba84351..ba101b7bb4ec 100644
--- a/shell/Library_spsupp.mk
+++ b/shell/Library_spsupp_x86.mk
@@ -7,23 +7,20 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_Library_Library,spsupp))
+$(eval $(call gb_Library_Library,spsupp_x86))
 
-$(eval $(call gb_Library_use_custom_headers,spsupp,\
+$(eval $(call gb_Library_set_x86,spsupp_x86,YES))
+
+$(eval $(call gb_Library_use_custom_headers,spsupp_x86,\
 	shell/source/win32/spsupp/idl \
 ))
 
-$(eval $(call gb_Library_set_include,spsupp,\
+$(eval $(call gb_Library_set_include,spsupp_x86,\
 	-I$(SRCDIR)/shell/inc/spsupp \
 	$$(INCLUDE) \
 ))
 
-$(eval $(call gb_Library_add_defs,spsupp,\
-	-DUNICODE \
-	-D_UNICODE \
-))
-
-$(eval $(call gb_Library_use_system_win32_libs,spsupp,\
+$(eval $(call gb_Library_use_system_win32_libs,spsupp_x86,\
 	advapi32 \
 	kernel32 \
 	ole32 \
@@ -31,13 +28,13 @@ $(eval $(call gb_Library_use_system_win32_libs,spsupp,\
 	user32 \
 ))
 
-$(eval $(call gb_Library_add_nativeres,spsupp,spsupp))
+$(eval $(call gb_Library_add_nativeres,spsupp_x86,spsupp))
 
-$(eval $(call gb_Library_add_ldflags,spsupp,\
+$(eval $(call gb_Library_add_ldflags,spsupp_x86,\
 	/DEF:$(SRCDIR)/shell/source/win32/spsupp/spsupp.def \
 ))
 
-$(eval $(call gb_Library_add_exception_objects,spsupp,\
+$(eval $(call gb_Library_add_exception_objects,spsupp_x86,\
     shell/source/win32/spsupp/COMOpenDocuments \
     shell/source/win32/spsupp/registrar \
     shell/source/win32/spsupp/spsuppClassFactory \
diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk
index b1bebc69beae..ccee899165b4 100644
--- a/shell/Module_shell.mk
+++ b/shell/Module_shell.mk
@@ -62,7 +62,6 @@ $(eval $(call gb_Module_add_targets,shell,\
 	StaticLibrary_xmlparser \
 	WinResTarget_shlxthdl \
 	CustomTarget_spsupp_idl \
-	Library_spsupp \
 	WinResTarget_spsupp \
 	WinResTarget_spsupp_dlg \
 ))
@@ -80,10 +79,21 @@ $(eval $(call gb_Module_add_targets,shell,\
 	Library_shlxthdl_x64 \
 	StaticLibrary_shlxthandler_common_x64 \
 	StaticLibrary_xmlparser_x64 \
+))
+endif
+
+ifneq ($(CXX_X64_BINARY),)
+$(eval $(call gb_Module_add_targets,shell,\
 	Library_spsupp_x64 \
 ))
 endif
 
+ifneq ($(CXX_X86_BINARY),)
+$(eval $(call gb_Module_add_targets,shell,\
+	Library_spsupp_x86 \
+))
+endif
+
 endif
 
 ifeq ($(OS),MACOSX)
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 5166dbe6c390..6de9fcc943a3 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -204,6 +204,7 @@ gb_Library_set_include = $(call gb_Library__forward_to_Linktarget,$(subst gb_Lib
 gb_Library_add_ldflags = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))
 gb_Library_set_ldflags = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))
 gb_Library_set_x64 = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))
+gb_Library_set_x86 = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))
 gb_Library_add_libs = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))
 gb_Library_disable_standard_system_libs = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))
 gb_Library_use_system_darwin_frameworks = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3))


More information about the Libreoffice-commits mailing list