[PATCH libreoffice-4-0] fdo#54087 link the correct resource file to npsoplugin.dll

Andras Timar (via Code Review) gerrit at gerrit.libreoffice.org
Thu May 2 10:33:02 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3746

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/46/3746/1

fdo#54087 link the correct resource file to npsoplugin.dll

I had to add a new function to gbuild system: set_nativeres,
because the trick in extensions/Library_npsoplugin.mk did not work.
It linked the default.res, and that made the plugin unusable under
Windows. Also, one export was missing compared to LibreOffice 3.5.

Change-Id: Ib91fa2a3b72b15912587f22becccb0aebc2aa390
---
M extensions/Library_npsoplugin.mk
M extensions/WinResTarget_npsoplugin.mk
M solenv/gbuild/Library.mk
M solenv/gbuild/platform/WNT_INTEL_GCC.mk
M solenv/gbuild/platform/com_MSC_class.mk
5 files changed, 18 insertions(+), 8 deletions(-)



diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk
index 31908f6..0ff92e5 100644
--- a/extensions/Library_npsoplugin.mk
+++ b/extensions/Library_npsoplugin.mk
@@ -95,6 +95,8 @@
 ifeq ($(COM),MSC)
 $(eval $(call gb_Library_add_ldflags,npsoplugin,\
 	/EXPORT:NPP_GetMIMEDescription \
+	/EXPORT:NPP_Initialize \
+	/EXPORT:NPP_Shutdown \
 	/EXPORT:NPP_New \
 	/EXPORT:NPP_Destroy \
 	/EXPORT:NPP_SetWindow \
@@ -105,7 +107,6 @@
 	/EXPORT:NPP_StreamAsFile \
 	/EXPORT:NPP_URLNotify \
 	/EXPORT:NPP_Print \
-	/EXPORT:NPP_Shutdown \
 	/EXPORT:NP_GetEntryPoints \
 	/EXPORT:NP_Initialize \
 	/EXPORT:NP_Shutdown \
@@ -113,11 +114,7 @@
 ))
 endif
 
-# Trick to get rid of the default.res to avoid duplicate VERSION
-# resource: Set NATIVERES for npsoplugin to be *only* npsoplugin_res
-
-$(eval $(call gb_LinkTarget_get_target,npsoplugin) : $(call gb_WinResTarget_get_target,npsoplugin_res))
-$(eval $(call gb_LinkTarget_get_target,npsoplugin) : NATIVERES := $(call gb_WinResTarget_get_target,npsoplugin_res))
+$(eval $(call gb_Library_set_nativeres,npsoplugin,npsoplugin/npsoplugin))
 
 endif # GUI=WNT
 
diff --git a/extensions/WinResTarget_npsoplugin.mk b/extensions/WinResTarget_npsoplugin.mk
index d6b1e95..9db0984 100644
--- a/extensions/WinResTarget_npsoplugin.mk
+++ b/extensions/WinResTarget_npsoplugin.mk
@@ -28,8 +28,8 @@
 # instead of those above.
 #
 
-$(eval $(call gb_WinResTarget_WinResTarget,npsoplugin_res))
+$(eval $(call gb_WinResTarget_WinResTarget,npsoplugin/npsoplugin))
 
-$(eval $(call gb_WinResTarget_set_rcfile,npsoplugin_res,extensions/source/nsplugin/source/nsplugin_oo))
+$(eval $(call gb_WinResTarget_set_rcfile,npsoplugin/npsoplugin,extensions/source/nsplugin/source/nsplugin_oo))
 
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index bb79911..6c9e96e 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -225,6 +225,7 @@
 	add_sdi_headers \
 	export_objects_list \
 	add_nativeres \
+	set_nativeres \
 	set_visibility_default \
 	set_warnings_not_errors \
 	set_generated_cxx_suffix \
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index b9edab0..3f01233 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -293,6 +293,12 @@
 
 endef
 
+define gb_LinkTarget_set_nativeres
+$(call gb_LinkTarget_get_target,$(1)) : $(call gb_WinResTarget_get_target,$(2))
+$(call gb_LinkTarget_get_target,$(1)) : NATIVERES := $(call gb_WinResTarget_get_target,$(2))
+
+endef
+
 define gb_Library_get_dllname
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
 endef
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 72d63af..c965f2b 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -283,6 +283,12 @@
 
 endef
 
+define gb_LinkTarget_set_nativeres
+$(call gb_LinkTarget_get_target,$(1)) : $(call gb_WinResTarget_get_target,$(2))
+$(call gb_LinkTarget_get_target,$(1)) : NATIVERES := $(call gb_WinResTarget_get_target,$(2))
+
+endef
+
 define gb_Library_get_dllname
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_DLLFILENAMES)))
 endef

-- 
To view, visit https://gerrit.libreoffice.org/3746
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib91fa2a3b72b15912587f22becccb0aebc2aa390
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Andras Timar <atimar at suse.com>



More information about the LibreOffice mailing list