summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2013-05-02 08:35:46 -0700
committerDavid Tardon <dtardon@redhat.com>2013-05-03 05:09:51 +0000
commitb8ec5216464e99feb5b6debfb517cc7b19a74739 (patch)
treed11cf62e2f03fb8774c3efbf976542207e925e59
parent98bffe149346077a9866f372fa0080dfb533c0e5 (diff)
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. Conflicts: solenv/gbuild/Library.mk solenv/gbuild/platform/com_MSC_class.mk Change-Id: Ib91fa2a3b72b15912587f22becccb0aebc2aa390 Reviewed-on: https://gerrit.libreoffice.org/3750 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--extensions/Library_npsoplugin.mk9
-rw-r--r--extensions/WinResTarget_npsoplugin.mk4
-rw-r--r--solenv/gbuild/Library.mk1
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk6
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_MSC.mk6
5 files changed, 18 insertions, 8 deletions
diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk
index 2f1d8f61512c..d6fa74f4bcb6 100644
--- a/extensions/Library_npsoplugin.mk
+++ b/extensions/Library_npsoplugin.mk
@@ -94,6 +94,8 @@ $(eval $(call gb_Library_add_defs,npsoplugin,\
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 \
@@ -104,7 +106,6 @@ $(eval $(call gb_Library_add_ldflags,npsoplugin,\
/EXPORT:NPP_StreamAsFile \
/EXPORT:NPP_URLNotify \
/EXPORT:NPP_Print \
- /EXPORT:NPP_Shutdown \
/EXPORT:NP_GetEntryPoints \
/EXPORT:NP_Initialize \
/EXPORT:NP_Shutdown \
@@ -112,11 +113,7 @@ $(eval $(call gb_Library_add_ldflags,npsoplugin,\
))
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 d6b1e9570fd1..9db098444f2a 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 cb043d0f4350..92e35d2d006c 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -211,6 +211,7 @@ $(eval $(foreach method,\
add_sdi_headers \
export_objects_list \
add_nativeres \
+ set_nativeres \
set_warnings_not_errors \
,\
$(call gb_Library__forward_to_Linktarget,$(method))\
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 78dac2561475..0f612b033724 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -333,6 +333,12 @@ $(call gb_LinkTarget_get_target,$(1)) : NATIVERES += $(call gb_WinResTarget_get_
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/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 9cc5a78e589f..7647bad35d09 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -514,6 +514,12 @@ $(call gb_LinkTarget_get_target,$(1)) : NATIVERES += $(call gb_WinResTarget_get_
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