diff options
-rw-r--r-- | Repository.mk | 1 | ||||
-rw-r--r-- | RepositoryFixes.mk | 2 | ||||
-rw-r--r-- | extensions/Executable_nsplugin.mk | 82 | ||||
-rw-r--r-- | extensions/Library_npsoplugin.mk | 104 | ||||
-rw-r--r-- | extensions/Module_extensions.mk | 26 | ||||
-rwxr-xr-x | extensions/WinResTarget_npsoplugin.mk | 35 | ||||
-rw-r--r-- | extensions/prj/build.lst | 2 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/exports.dxp | 16 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/exports_wnt.dxp | 18 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/makefile.mk | 164 | ||||
-rwxr-xr-x | extensions/source/nsplugin/source/npsoplugin.def | 21 | ||||
-rw-r--r-- | solenv/gbuild/platform/WNT_INTEL_GCC.mk | 2 |
12 files changed, 273 insertions, 200 deletions
diff --git a/Repository.mk b/Repository.mk index ff8dccd62bfb..b897665f060a 100644 --- a/Repository.mk +++ b/Repository.mk @@ -279,6 +279,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ localedata_others \ mcnttype \ neon \ + npsoplugin \ package2 \ reg \ scriptframe \ diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk index 59dd09db0b0b..3267e4c7e3e6 100644 --- a/RepositoryFixes.mk +++ b/RepositoryFixes.mk @@ -55,6 +55,8 @@ gb_Library_FILENAMES := $(patsubst sfx:isfx%,sfx:sfx%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst svt:isvt%,svt:svtool%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst tl:itl%,tl:itools%,$(gb_Library_FILENAMES)) gb_Library_FILENAMES := $(patsubst vbahelper:ivbahelper%,vbahelper:vbahelper%,$(gb_Library_FILENAMES)) +gb_Library_FILENAMES := $(patsubst curl:icurl%,curl:libcurl%,$(gb_Library_FILENAMES)) +gb_Library_FILENAMES := $(patsubst npsoplugin:inpsoplugin%,npsoplugin:npsoplugin%,$(gb_Library_FILENAMES)) gb_StaticLibrary_FILENAMES := $(patsubst graphite:graphite%,graphite:graphite_dll%,$(gb_StaticLibrary_FILENAMES)) diff --git a/extensions/Executable_nsplugin.mk b/extensions/Executable_nsplugin.mk new file mode 100644 index 000000000000..439424f2f1d3 --- /dev/null +++ b/extensions/Executable_nsplugin.mk @@ -0,0 +1,82 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Peter Foley <pefoley2@verizon.net> +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. +# + +$(eval $(call gb_Executable_Executable,nsplugin)) + +$(eval $(call gb_Executable_add_api,nsplugin,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Executable_add_exception_objects,nsplugin,\ + extensions/source/nsplugin/source/so_closelistener \ + extensions/source/nsplugin/source/so_instance \ + extensions/source/nsplugin/source/so_env \ + extensions/source/nsplugin/source/so_main \ +)) + +$(eval $(call gb_Executable_add_linked_libs,nsplugin,\ + cppu \ + cppuhelper \ + sal \ +)) + +ifeq ($(OS),SOLARIS) +$(eval $(call gb_Executable_add_libs,nsplugin,\ + -lsocket \ + -lnsl \ +)) +endif + +ifeq ($(GUI),WNT) +$(eval $(call gb_Executable_add_ldflags,nsplugin,\ + $(OUTDIR)/lib/pathutils-obj.obj \ +)) + +$(eval $(call gb_Executable_add_exception_objects,nsplugin,\ + extensions/source/nsplugin/source/nsp_windows \ +)) + +$(eval $(call gb_Executable_add_linked_libs,nsplugin,\ + ws2_32 \ + shell32 \ + ole32 \ + kernel32 \ + user32 \ + gdi32 \ + winspool \ + comdlg32 \ + advapi32 \ + oleaut32 \ + uuid \ +)) +endif # WNT + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/extensions/Library_npsoplugin.mk b/extensions/Library_npsoplugin.mk new file mode 100644 index 000000000000..e5710fed4fa8 --- /dev/null +++ b/extensions/Library_npsoplugin.mk @@ -0,0 +1,104 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Peter Foley <pefoley2@verizon.net> +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. +# + +$(eval $(call gb_Library_Library,npsoplugin)) + +ifeq ($(SYSTEM_MOZILLA_HEADERS),YES) +$(eval $(call gb_Library_set_include,npsoplugin,\ + $$(INCLUDE) \ + $(MOZILLA_HEADERS_CFLAGS) +)) +else +$(eval $(call gb_Library_set_include,npsoplugin,\ + -I$(OUTDIR)/inc/npsdk \ + $$(INCLUDE) \ +)) +endif + +ifeq ($(GUI),UNX) + +$(eval $(call gb_Library_add_ldflags,npsoplugin,\ + $(OUTDIR)/lib/npunix.o \ +)) + +$(eval $(call gb_Library_add_libs,npsoplugin,\ + -ldl \ +)) + +$(eval $(call gb_Library_use_external,npsoplugin,gtk)) + +$(eval $(call gb_Library_add_defs,npsoplugin,\ + -DMOZ_X11 \ +)) + +ifeq ($(filter-out LINUX FREEBSD NETBSD OPENBSD DRAGONFLY,$(OS)),) +$(eval $(call gb_Library_add_defs,npsoplugin,\ + -DNP_LINUX \ +)) +endif + +endif # GUI=UNX + +ifeq ($(GUI),WNT) + +$(eval $(call gb_Library_add_ldflags,npsoplugin,\ + $(OUTDIR)/lib/pathutils-obj.obj \ + $(OUTDIR)/lib/npwin.obj \ + /DEF:$(call gb_Helper_convert_native,$(SRCDIR)/extensions/source/nsplugin/source/npsoplugin.def) \ +)) + +$(eval $(call gb_Library_add_linked_libs,npsoplugin,\ + ws2_32 \ + shell32 \ + ole32 \ + kernel32 \ + user32 \ + gdi32 \ + winspool \ + comdlg32 \ + advapi32 \ + oleaut32 \ + uuid \ +)) + +$(eval $(call gb_Library_add_defs,npsoplugin,\ + -DENGLISH \ +)) + +$(eval $(call gb_Library_add_nativeres,npsoplugin,npsoplugin_res)) + +endif # GUI=WNT + +$(eval $(call gb_Library_add_exception_objects,npsoplugin,\ + extensions/source/nsplugin/source/so_env \ + extensions/source/nsplugin/source/npshell \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk index d471c76fe663..78830783761b 100644 --- a/extensions/Module_extensions.mk +++ b/extensions/Module_extensions.mk @@ -49,6 +49,32 @@ $(eval $(call gb_Module_add_targets,extensions,\ endif endif +ifneq ($(WITH_MOZILLA),NO) + +$(eval $(call gb_Module_add_targets,extensions,\ + Executable_nsplugin \ +)) + +ifeq ($(GUI),WNT) +$(eval $(call gb_Module_add_targets,extensions,\ + Library_npsoplugin \ + WinResTarget_npsoplugin \ +)) +endif # GUI=WNT + +ifeq ($(GUI),UNX) + +ifneq ($(ENABLE_GTK),) +$(eval $(call gb_Module_add_targets,extensions,\ + Library_npsoplugin \ +)) +endif # ENABLE_GTK + +endif # GUI=UNX + +endif # WITH_MOZILLA=YES + + $(eval $(call gb_Module_add_check_targets,extensions,\ CppunitTest_extensions_test_update \ )) diff --git a/extensions/WinResTarget_npsoplugin.mk b/extensions/WinResTarget_npsoplugin.mk new file mode 100755 index 000000000000..bba691713970 --- /dev/null +++ b/extensions/WinResTarget_npsoplugin.mk @@ -0,0 +1,35 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Peter Foley <pefoley2@verizon.net> +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. +# + +$(eval $(call gb_WinResTarget_WinResTarget,npsoplugin_res)) + +$(eval $(call gb_WinResTarget_add_file,npsoplugin_res,extensions/source/nsplugin/source/nsplugin_oo)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index c0cd9aad2870..e6144e5d14ed 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -21,8 +21,6 @@ ex extensions\source\dbpilots nmake - all ex_dbpilots ex_i ex extensions\source\abpilot nmake - all ex_abpilot ex_inc NULL ex extensions\source\logging nmake - all ex_logging ex_inc NULL ex extensions\source\config\ldap nmake - all ex_ldap ex_inc NULL -ex extensions\source\nsplugin\source nmake - u ex_nsplugin ex_inc NULL -ex extensions\source\nsplugin\source nmake - w ex_nsplugin ex_inc NULL ex extensions\util nmake - all ex_util ex_abpilot ex_dbpilots ex_logging ex_ldap ex_bib ex_plutil NULL ex extensions\prj nmake - all ex_prj NULL diff --git a/extensions/source/nsplugin/source/exports.dxp b/extensions/source/nsplugin/source/exports.dxp deleted file mode 100644 index e8b697289c20..000000000000 --- a/extensions/source/nsplugin/source/exports.dxp +++ /dev/null @@ -1,16 +0,0 @@ -NPP_GetMIMEDescription -NPP_GetValue -NPP_Initialize -NPP_GetJavaClass -NPP_Shutdown -NPP_New -NPP_Destroy -NPP_SetWindow -NPP_NewStream -NPP_WriteReady -NPP_Write -NPP_DestroyStream -NPP_StreamAsFile -NPP_URLNotify -NPP_Print -NPP_Shutdown diff --git a/extensions/source/nsplugin/source/exports_wnt.dxp b/extensions/source/nsplugin/source/exports_wnt.dxp deleted file mode 100644 index a27be8c38300..000000000000 --- a/extensions/source/nsplugin/source/exports_wnt.dxp +++ /dev/null @@ -1,18 +0,0 @@ -NPP_GetMIMEDescription -NPP_Initialize -NPP_Shutdown -NPP_New -NPP_Destroy -NPP_SetWindow -NPP_NewStream -NPP_WriteReady -NPP_Write -NPP_DestroyStream -NPP_StreamAsFile -NPP_URLNotify -NPP_Print -NPP_Shutdown -NP_GetEntryPoints -NP_Initialize -NP_Shutdown -NP_GetMIMEDescription diff --git a/extensions/source/nsplugin/source/makefile.mk b/extensions/source/nsplugin/source/makefile.mk deleted file mode 100644 index 5b7476408a31..000000000000 --- a/extensions/source/nsplugin/source/makefile.mk +++ /dev/null @@ -1,164 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. -PRJNAME=extensions -TARGET=npsoplugin - -ENABLE_EXCEPTIONS=TRUE -USE_DEFFILE=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk - -.IF "$(SYSTEM_MOZILLA_HEADERS)" == "YES" -INCPRE+=$(MOZILLA_HEADERS_CFLAGS) -.ELSE -INCPRE=$(SOLARINCDIR)$/npsdk -.ENDIF - -.IF "$(GUI)"=="UNX" - -# not sure about -DMOZ_X11 but otheriwse some struct member don't exist... -CFLAGS+=-DMOZ_X11 - -.IF "$(ENABLE_NSPLUGIN)"=="NO" - -dummy: - @echo Nsplugin disabled, nothing to build - -.ELSE # ENABLE_NSPLUGIN -.IF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD" || "$(OS)"=="NETBSD" || \ - "$(OS)"=="OPENBSD" || "$(OS)"=="DRAGONFLY" -INC+= -DNP_LINUX -.ENDIF -PKGCONFIG_MODULES=gtk+-2.0 -.INCLUDE: pkg_config.mk -.ENDIF # ENABLE_NSPLUGIN -.ENDIF # "$(GUI)"=="UNX" -.IF "$(GUI)"=="WNT" -INC+= -DENGLISH -.ENDIF - - -# --- Files ------------------------------------- - -SLOFILES= $(SLO)$/npshell.obj \ - $(SLO)$/so_env.obj - -SHL1OBJS= $(SLO)$/npshell.obj \ - $(SLO)$/so_env.obj - -.IF "$(GUI)"=="UNX" -STDLIBS+=$(SOLARLIBDIR)$/npunix.o -SHL1STDLIBS+=$(SOLARLIBDIR)$/npunix.o -.ENDIF #UNX -.IF "$(GUI)"=="WNT" -SHL1OBJS+=$(SOLARLIBDIR)$/pathutils-obj.obj -STDLIBS+=$(SOLARLIBDIR)$/npwin.obj -SHL1STDLIBS+= $(SHELL32LIB) $(SOLARLIBDIR)$/npwin.obj - -.ENDIF - -OBJFILES=\ - $(OBJ)$/so_closelistener.obj\ - $(OBJ)$/so_instance.obj\ - $(OBJ)$/so_env.obj\ - $(OBJ)$/so_main.obj - -# --- Plugin executable ------------------------- -APP1TARGET=nsplugin$(EXEPOSTFIX) -APP1OBJS=$(OBJFILES) - -APP1STDLIBS=\ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) - -.IF "$(OS)"=="SOLARIS" -APP1STDLIBS+= -lsocket -lnsl -.ENDIF - -.IF "$(GUI)"=="WNT" -DEPOBJFILES=$(OBJ)$/nsp_windows.obj -APP1OBJS+=$(OBJ)$/nsp_windows.obj $(SOLARLIBDIR)$/pathutils-obj.obj -APP1STDLIBS+= $(WS2_32LIB) $(SHELL32LIB) $(OLE32LIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) $(OLEAAUT32LIB) $(UUIDLIB) -.ENDIF - -# --- Library ----------------------------------- - -SHL1TARGET=$(TARGET)_so -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+= $(WS2_32LIB) $(SHELL32LIB) $(OLE32LIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) $(OLE32LIB) $(OLEAAUT32LIB) $(UUIDLIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) -.ENDIF - -SHL1DEPN= -SHL1IMPLIB= i$(SHL1TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1RPATH=OOO - -# ----- get some additional keys in versioninfo ------------ -SHL1ADD_VERINFO=nsplugin.rc -SHL1DEPN+=$(SHL1ADD_VERINFO) - -DEF1NAME=$(SHL1TARGET) -.IF "$(GUI)"=="UNX" -DEF1EXPORTFILE=exports.dxp -.ENDIF -.IF "$(GUI)"=="WNT" -DEF1EXPORTFILE=exports_wnt.dxp -.ENDIF - -SHL2OBJS=$(SHL1OBJS) -SHL2STDLIBS=$(SHL1STDLIBS) -SHL2TARGET=$(TARGET) -.IF "$(GUI)"=="WNT" -SHL2STDLIBS+= $(WS2_32LIB) $(SHELL32LIB) $(OLE32LIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) $(OLE32LIB) $(OLEAAUT32LIB) $(UUIDLIB) $(KERNEL32LIB) $(USER32LIB) $(GDI32LIB) $(WINSPOOLLIB) $(COMDLG32LIB) $(ADVAPI32LIB) -.ENDIF - -SHL2DEPN= -SHL2IMPLIB= i$(SHL2TARGET) -SHL2DEF= $(MISC)$/$(SHL2TARGET).def -SHL2RPATH=OOO - -# ----- get some additional keys in versioninfo ------------ -SHL2ADD_VERINFO=nsplugin_oo.rc -SHL2DEPN+=$(SHL2ADD_VERINFO) - -DEF2NAME=$(SHL2TARGET) -.IF "$(GUI)"=="UNX" -DEF2EXPORTFILE=exports.dxp -.ENDIF -.IF "$(GUI)"=="WNT" -DEF2EXPORTFILE=exports_wnt.dxp -.ENDIF - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/extensions/source/nsplugin/source/npsoplugin.def b/extensions/source/nsplugin/source/npsoplugin.def new file mode 100755 index 000000000000..160072a9f82e --- /dev/null +++ b/extensions/source/nsplugin/source/npsoplugin.def @@ -0,0 +1,21 @@ +LIBRARY "npsoplugin.dll" + +EXPORTS + NPP_GetMIMEDescription + NPP_Initialize + NPP_Shutdown + NPP_New + NPP_Destroy + NPP_SetWindow + NPP_NewStream + NPP_WriteReady + NPP_Write + NPP_DestroyStream + NPP_StreamAsFile + NPP_URLNotify + NPP_Print + NPP_Shutdown + NP_GetEntryPoints + NP_Initialize + NP_Shutdown + NP_GetMIMEDescription diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index 40027a102149..e8fe61670e34 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -278,12 +278,14 @@ gb_Library_PLAINLIBS_NONE += \ oleaut32 \ shell32 \ shlwapi \ + urlmon \ user32 \ uuid \ uwinapi \ winmm \ version \ winspool \ + ws2_32 \ gb_Library_LAYER := \ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ |