Kaydet (Commit) e16ac693 authored tarafından David Ostrovsky's avatar David Ostrovsky Kaydeden (comit) Stephan Bergmann

gbuild migration: pyuno module

Change-Id: I7f923a5622214f7540a789bcdd93bf6fd1d166db
üst 951ed658
......@@ -91,6 +91,7 @@ package\
packimages\
padmin\
psprint_config\
pyuno\
qadevOOo\
regexp\
registry\
......@@ -228,7 +229,6 @@ pango\
postgresql\
postprocess\
python\
pyuno\
readlicense_oo\
redland\
rhino\
......
......@@ -78,6 +78,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
package \
padmin \
psprint_config \
pyuno \
$(if $(filter QADEVOOO,$(BUILD_TYPE)),\
qadevOOo \
) \
......
......@@ -105,6 +105,7 @@ $(eval $(call gb_Helper_register_executables,OOO,\
langsupport \
odbcconfig \
officeloader \
python_wrapper \
quickstart \
sbase \
scalc \
......@@ -447,6 +448,8 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
mozbootstrap \
officebean \
package2 \
pyuno \
pyuno_wrapper \
recentfile \
scriptframe \
sdbc2 \
......@@ -554,6 +557,7 @@ $(eval $(call gb_Helper_register_libraries,UNOLIBS_OOO, \
nullcanvas \
OGLTrans \
passwordcontainer \
pythonloader \
postgresql-sdbc \
postgresql-sdbc-impl \
simplecanvas \
......
......@@ -1616,6 +1616,57 @@ endef
endif # ENABLE_GCONF
# PYTHON
ifeq ($(SYSTEM_PYTHON),YES)
define gb_LinkTarget__use_python
$(call gb_LinkTarget_add_defs,$(1),\
$(filter-out -I%,$(PYTHON_CFLAGS)) \
)
$(call gb_LinkTarget_set_include,$(1),\
$(filter -I%,$(PYTHON_CFLAGS)) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),\
$(PYTHON_LIBS) \
)
endef
else # !SYSTEM_PYTHON
define gb_LinkTarget__use_python
ifeq ($(OS),WNT)
$(call gb_LinkTarget_add_libs,$(1),\
python26.lib \
)
else ifeq ($(OS),MACOSX)
$(call gb_LinkTarget_add_libs,$(1),\
-F $(OUTDIR)/lib -framework OOoPython \
)
else
$(call gb_LinkTarget_use_libraries,$(1),\
python2.6 \
)
endif
$(call gb_LinkTarget_set_include,$(1),\
-I$(OUTDIR)/inc/python \
$$(INCLUDE) \
)
endef
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
python2.6 \
))
endif # SYSTEM_PYTHON
# MacOSX-only frameworks ############################################
# (in alphabetical order)
......
......@@ -42,6 +42,15 @@ gb_Library_FILENAMES := $(patsubst reg:libuno_reg%,reg:libreg%,$(gb_Library_FILE
gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst store:libuno_store%,store:libstore%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst ucbhelper:libucbhelper%,ucbhelper:libucbhelper4%,$(gb_Library_FILENAMES))
ifeq ($(OS),MACOSX)
# libpyuno_wrapper.so => pyuno.dyn
gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.dyn,$(gb_Library_FILENAMES))
else
# libpyuno_wrapper.so => pyuno.so
gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
endif
ifneq ($(OS),ANDROID)
gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
......@@ -58,6 +67,9 @@ gb_Library_DLLFILENAMES := $(patsubst ucbhelper:ucbhelper%,ucbhelper:ucbhelper4%
gb_Library_DLLFILENAMES := $(patsubst unsafe_uno:unsafe_uno%,unsafe_uno:unsafe_uno_uno%,$(gb_Library_DLLFILENAMES))
gb_Library_DLLFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_DLLFILENAMES))
# libpyuno_wrapper.dll => pyuno.pyd
gb_Library_DLLFILENAMES := $(patsubst pyuno:pyuno.dll,pyuno:pyuno.pyd,$(gb_Library_DLLFILENAMES))
gb_Library_FILENAMES := $(patsubst sb:isb%,sb:basic%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst sfx:isfx%,sfx:sfx%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst svt:isvt%,svt:svtool%,$(gb_Library_FILENAMES))
......
......@@ -203,7 +203,7 @@ my_components += \
.IF "$(DISABLE_PYTHON)" != "TRUE"
my_components += \
pythonloader \
component/pyuno/source/loader/pythonloader \
.ENDIF
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_CustomTarget_CustomTarget,pyuno/python_bin))
# do we need it here: $(gb_Executable_EXT)?
$(call gb_CustomTarget_get_target,pyuno/python_bin) : \
$(call gb_CustomTarget_get_workdir,pyuno/python_bin)/python.bin
$(call gb_CustomTarget_get_workdir,pyuno/python_bin)/python.bin : $(OUTDIR)/bin/python | \
$(call gb_CustomTarget_get_workdir,pyuno/python_bin)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),COP,1)
cp $< $@.tmp
strip $@.tmp
mv $@.tmp $@
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_CustomTarget_CustomTarget,pyuno/python_shell))
$(call gb_CustomTarget_get_target,pyuno/python_shell) : \
$(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh
include $(OUTDIR)/inc/pyversion.Makefile
ifeq ($(OS),MACOSX)
pyuno_PYTHON_SHELL_VERSION:=$(PYMAJOR).$(PYMINOR)
pyuno_PYTHON_SHELL_STRIPRULE:=-e '/^NONMACSECTION/,/^MACSECTION/d'
else
pyuno_PYTHON_SHELL_VERSION:=$(PYVERSION)
pyuno_PYTHON_SHELL_STRIPRULE:=-e '/^NONMACSECTION/d' -e '/^MACSECTION/,$$d'
endif
$(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh : $(SRCDIR)/pyuno/zipcore/python.sh | \
$(call gb_CustomTarget_get_workdir,pyuno/python_shell)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
sed -e "s/%%PYVERSION%%/$(pyuno_PYTHON_SHELL_VERSION)/g" -e \
"s/%%OOO_LIBRARY_PATH_VAR%%/$(gb_Helper_LIBRARY_PATH_VAR)/g" \
$(pyuno_PYTHON_SHELL_STRIPRULE) < $? > $@
chmod +x $@
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_CustomTarget_CustomTarget,pyuno/python_wrapper))
python_wrapper_TARGET := $(OUTDIR)/bin/pyuno/python.exe
$(call gb_CustomTarget_get_target,pyuno/python_wrapper) : $(python_wrapper_TARGET)
$(python_wrapper_TARGET) : $(call gb_Executable_get_target,python_wrapper)
cp $< $@
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_CustomTarget_CustomTarget,pyuno/pyversion))
$(call gb_CustomTarget_get_target,pyuno/pyversion) : \
$(call gb_CustomTarget_get_workdir,pyuno/pyversion)/pyversion.hxx
include $(OUTDIR)/inc/pyversion.Makefile
$(call gb_CustomTarget_get_workdir,pyuno/pyversion)/pyversion.hxx : $(SRCDIR)/pyuno/zipcore/pyversion.inc | \
$(call gb_CustomTarget_get_workdir,pyuno/pyversion)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
sed -e "s/@/$(PYVERSION)/g" < $? > $@
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_CustomTarget_CustomTarget,pyuno/zipcore))
include $(OUTDIR)/inc/pyversion.Makefile
pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYVERSION).zip
FIND=find
GREP=grep
$(call gb_CustomTarget_get_target,pyuno/zipcore) : \
$(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME)
# capture the files to have them in prerequisite list
pyuno_zipcore_FINDLIBFILES:=\
$(shell $(FIND) $(OUTDIR)/lib/python -type f| $(GREP) -v "\.pyc" | $(GREP) -v "\.py~" | $(GREP) -v .orig | $(GREP) -v _failed)
# create zip archive
$(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) : $(pyuno_zipcore_FINDLIBFILES) | \
$(call gb_CustomTarget_get_workdir,pyuno/zipcore)/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ZIP,1)
cd $(OUTDIR)/lib/python && zip $@ $(shell cd $(OUTDIR)/lib/python && $(FIND) . -type f | $(GREP) -v "\.pyc" | $(GREP) -v "\.py~" | $(GREP) -v .orig | $(GREP) -v _failed)
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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,python_wrapper))
$(eval $(call gb_Executable_use_static_libraries,python_wrapper,\
ooopathutils \
))
$(eval $(call gb_Executable_use_custom_headers,python_wrapper,\
pyuno/pyversion \
))
$(eval $(call gb_Executable_add_noexception_objects,python_wrapper,\
pyuno/zipcore/python \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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,pythonloader))
$(eval $(call gb_Library_set_componentfile,pythonloader,pyuno/source/loader/pythonloader))
$(eval $(call gb_Library_set_include,pythonloader,\
-I$(SRCDIR)/pyuno/source/loader \
-I$(SRCDIR)/pyuno/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_use_api,pythonloader,\
udkapi \
))
$(eval $(call gb_Library_use_libraries,pythonloader,\
cppu \
cppuhelper \
pyuno \
sal \
))
$(eval $(call gb_Library_use_externals,pythonloader,\
python \
))
$(eval $(call gb_Library_add_exception_objects,pythonloader,\
pyuno/source/loader/pyuno_loader \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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,pyuno))
$(eval $(call gb_Library_set_include,pyuno,\
-I$(SRCDIR)/pyuno/source/loader \
-I$(SRCDIR)/pyuno/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_add_defs,pyuno,\
-DLO_DLLIMPLEMENTATION_PYUNO \
))
$(eval $(call gb_Library_use_api,pyuno,\
udkapi \
))
$(eval $(call gb_Library_use_libraries,pyuno,\
cppu \
cppuhelper \
sal \
salhelper \
))
$(eval $(call gb_Library_use_externals,pyuno,\
python \
))
$(eval $(call gb_Library_add_exception_objects,pyuno,\
pyuno/source/module/pyuno_runtime \
pyuno/source/module/pyuno \
pyuno/source/module/pyuno_callable \
pyuno/source/module/pyuno_module \
pyuno/source/module/pyuno_type \
pyuno/source/module/pyuno_util \
pyuno/source/module/pyuno_except \
pyuno/source/module/pyuno_adapter \
pyuno/source/module/pyuno_gc \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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,pyuno_wrapper))
$(eval $(call gb_Library_set_include,pyuno_wrapper,\
-I$(SRCDIR)/pyuno/source/module \
-I$(SRCDIR)/pyuno/inc \
$$(INCLUDE) \
))
# not using here external
# because we do not want to link here
# against python!
# we need only -Idirective
ifeq ($(SYSTEM_PYTHON),YES)
$(eval $(call gb_Library_set_include,pyuno_wrapper,\
$(PYTHON_CFLAGS) \
$$(INCLUDE) \
))
else
$(eval $(call gb_Library_set_include,pyuno_wrapper,\
-I$(OUTDIR)/inc/python \
$$(INCLUDE) \
))
endif
ifneq ($(GUI)$(COM),WNTMSC)
ifneq ($(OS),MACOSX)
$(eval $(call gb_Library_add_libs,pyuno_wrapper,\
-ldl \
))
endif
endif
$(eval $(call gb_Library_add_cobjects,pyuno_wrapper,\
pyuno/source/module/pyuno_dlopenwrapper \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_Module_Module,pyuno))
ifneq ($(DISABLE_PYTHON),TRUE)
$(eval $(call gb_Module_add_targets,pyuno,\
Library_pyuno \
Library_pythonloader \
Package_pyunorc \
Package_python_scripts \
))
ifneq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,pyuno,\
Library_pyuno_wrapper \
))
endif
# zipcore: python.exe on Windows
# zipcore: pyversion.hxx on Windows
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,pyuno,\
CustomTarget_pyversion \
Executable_python_wrapper \
CustomTarget_python_wrapper \
))
endif
# zipcore: python.sh on Unix
ifneq ($(SYSTEM_PYTHON),YES)
ifeq ($(GUI),UNX)
$(eval $(call gb_Module_add_targets,pyuno,\
CustomTarget_python_shell \
Package_python_shell \
))
ifneq ($(OS),MACOSX)
$(eval $(call gb_Module_add_targets,pyuno,\
CustomTarget_python_bin \
Package_python_bin \
))
endif
endif
endif
# python-zipcore-$(PYVESION) not on MACOSX
# (OOoPython.framework.zip is already delivered for MACOSX in python module)
ifneq ($(SYSTEM_PYTHON),YES)
ifneq ($(OS),MACOSX)
$(eval $(call gb_Module_add_targets,pyuno,\
CustomTarget_zipcore \
Package_zipcore \
))
endif
endif
endif # DISABLE_PYTHON
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_Package_Package,python_bin,$(call gb_CustomTarget_get_workdir,pyuno/python_bin)))
$(eval $(call gb_Package_add_file,python_bin,bin/python.bin,python.bin))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_Package_Package,pyuno_python,$(SRCDIR)/pyuno/source))
ifeq ($(GUI),WNT)
pyuno_PYTHON_SCRIPT_DIR=bin
else
pyuno_PYTHON_SCRIPT_DIR=lib
endif
$(eval $(call gb_Package_add_file,pyuno_python,$(pyuno_PYTHON_SCRIPT_DIR)/pyuno/unohelper.py,module/unohelper.py))
$(eval $(call gb_Package_add_file,pyuno_python,$(pyuno_PYTHON_SCRIPT_DIR)/pyuno/uno.py,module/uno.py))
$(eval $(call gb_Package_add_file,pyuno_python,$(pyuno_PYTHON_SCRIPT_DIR)/pyuno/pythonloader.py,loader/pythonloader.py))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_Package_Package,python_shell,$(call gb_CustomTarget_get_workdir,pyuno/python_shell)))
$(eval $(call gb_Package_add_file,python_shell,bin/pyuno/python,python.sh))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_Package_Package,pyuno_pyunorc,$(SRCDIR)/pyuno/source/module))
$(eval $(call gb_Package_add_file,pyuno_pyunorc,$(call gb_Helper_get_rcfile,bin/pyuno),pyuno))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# 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.
#
# Major Contributor(s):
# Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
#
# All Rights Reserved.
#
# 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_Package_Package,python_zipcore,$(call gb_CustomTarget_get_workdir,pyuno/zipcore)))
include $(OUTDIR)/inc/pyversion.Makefile
pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYVERSION).zip
$(eval $(call gb_Package_add_file,python_zipcore,bin/$(pyuno_PYTHON_ARCHIVE_NAME),$(pyuno_PYTHON_ARCHIVE_NAME)))
# vim: set noet sw=4 ts=4:
......@@ -27,10 +27,10 @@
to do the necessary conversions.
*/
#ifdef WIN32
#define PY_DLLEXPORT __declspec(dllexport)
#if defined LO_DLLIMPLEMENTATION_PYUNO
#define LO_DLLPUBLIC_PYUNO SAL_DLLPUBLIC_EXPORT
#else
#define PY_DLLEXPORT
#define LO_DLLPUBLIC_PYUNO SAL_DLLPUBLIC_IMPORT
#endif
/** function called by the python runtime to initialize the
......@@ -39,7 +39,8 @@
preconditions: python has been initialized before and
the global interpreter lock is held
*/
extern "C" PY_DLLEXPORT
extern "C" LO_DLLPUBLIC_PYUNO
#if PY_MAJOR_VERSION >= 3
PyObject* SAL_CALL PyInit_pyuno();
#else
......@@ -136,7 +137,7 @@ enum ConversionMode { ACCEPT_UNO_ANY, REJECT_UNO_ANY };
make sure to fulfill all preconditions mentioned for the specific methods.
*/
class PY_DLLEXPORT Runtime
class LO_DLLPUBLIC_PYUNO Runtime
{
RuntimeImpl *impl;
public:
......@@ -235,7 +236,7 @@ public:
e.g. when you would leave them away, dtors of potential pyrefs
may be called after the thread has detached again.
*/
class PY_DLLEXPORT PyThreadAttach
class LO_DLLPUBLIC_PYUNO PyThreadAttach
{
PyThreadState *tstate;
PyThreadAttach ( const PyThreadAttach & ); // not implemented
......@@ -262,7 +263,7 @@ public:
@see PyThreadAttach
*/
class PY_DLLEXPORT PyThreadDetach
class LO_DLLPUBLIC_PYUNO PyThreadDetach
{
PyThreadState *tstate;
PyThreadDetach ( const PyThreadDetach & ); // not implemented
......
bgpu pyuno : salhelper stoc cpputools cppuhelper bridges tools PYTHON:python LIBXSLT:libxslt NULL
pu pyuno usr1 - all br_mkout NULL
pu pyuno\zipcore nmake - all pu_zipcore NULL
pu pyuno\source\module nmake - all pu_module NULL
pu pyuno\source\loader nmake - all pu_loader pu_module NULL
pu pyuno\prj nmake - all pu_prj NULL
......@@ -84,14 +84,14 @@ static void * load(void * address, char const * symbol) {
#if PY_MAJOR_VERSION >= 3
PyObject * PyInit_pyuno(void) {
SAL_DLLPUBLIC_EXPORT PyObject * PyInit_pyuno(void) {
return
((PyObject * (*)(void)) load((void *) &PyInit_pyuno, "PyInit_pyuno"))();
}
#else
void initpyuno(void) {
SAL_DLLPUBLIC_EXPORT void initpyuno(void) {
((void (*)(void)) load((void *) &initpyuno, "initpyuno"))();
}
......
......@@ -833,7 +833,7 @@ struct PyMethodDef PyUNOModule_methods [] =
}
extern "C" PY_DLLEXPORT
extern "C"
#if PY_MAJOR_VERSION >= 3
PyObject* PyInit_pyuno()
{
......
......@@ -51,7 +51,6 @@ Module gid_Module_Root_Brand
Files = (gid_Brand_File_Bin_Crashreport,
gid_Brand_File_Bin_Crashreport_Script,
gid_Brand_File_Bin_Crashreport_Com,
gid_Brand_File_Bin_Python,
gid_Brand_File_Gdb_Trace,
gid_Brand_File_Bin_Soffice,
gid_Brand_File_Bin_Soffice_Bin,
......@@ -1431,16 +1430,6 @@ ProfileItem gid_Brand_Profileitem_Setup_Install
End
#endif
//TODO: This actually belongs into a module of its own:
#if !defined DISABLE_PYUNO && !defined SYSTEM_PYTHON
File gid_Brand_File_Bin_Python
BIN_FILE_BODY;
Name = EXENAME(pyuno/python);
Dir = gid_Brand_Dir_Program;
Styles = (PACKED);
End
#endif
File gid_License_Txt
TXT_FILE_BODY;
#if defined MACOSX
......
......@@ -73,29 +73,59 @@ File gid_File_Py_Pythonloader
End
#ifndef SYSTEM_PYTHON
File gid_File_Py_Bin_Python
BIN_FILE_BODY;
Name = EXENAME(pyuno/python);
Dir = gid_Brand_Dir_Program;
Styles = (PACKED);
End
#ifndef MACOSX
Directory gid_Dir_Py_PythonCore
ParentID = gid_Brand_Dir_Program;
HostName = STRING(CONCAT2(python-core-,PYVERSION));
End
Directory gid_Dir_Py_PythonCore_Lib
ParentID = gid_Dir_Py_PythonCore;
HostName = "lib";
End
#endif
File gid_File_Py_Python_Core
TXT_FILE_BODY;
Dir = gid_Brand_Dir_Program;
#ifdef MACOSX
Dir = gid_Brand_Dir_Program;
Name = "OOoPython.framework.zip";
Styles = (ARCHIVE,USE_INTERNAL_RIGHTS);
#else
Dir = gid_Dir_Py_PythonCore_Lib;
Name = STRING(CONCAT3(python-core-,PYVERSION,.zip));
Styles = (ARCHIVE);
#endif
End
#ifdef UNX
#ifdef WNT
Directory gid_Dir_Py_PythonCore_Bin
ParentID = gid_Dir_Py_PythonCore;
HostName = "bin";
End
#endif
#ifndef MACOSX
File gid_File_Py_Python_Bin
BIN_FILE_BODY;
#ifdef UNX
Dir = gid_Brand_Dir_Program;
Name = "python.bin";
#else
Dir = gid_Dir_Py_PythonCore_Bin;
Name = EXENAME(python);
#endif
Styles = (PACKED);
End
#endif
#endif
#endif
//Scripting Framework Python example scripts
......
......@@ -40,8 +40,22 @@ Module gid_Module_Optional_Pyuno
gid_Dir_PythonFramework_Versions_ver_bin,
gid_Dir_PythonFramework_Versions_ver_lib,
gid_Dir_PythonFramework_Versions_ver_lib_pythonver,
gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config);
Files = (gid_File_Pyuno,gid_File_Lib_Pyuno,gid_File_Lib_Pythonloader,gid_File_Py_Unohelper,gid_File_Py_Uno,gid_File_Py_Pythonloader,gid_File_Py_Python_Core,gid_File_Py_Python_Bin,gid_File_Lib_Python_So,gid_Shortcut_Lib_Python_So,gid_File_Scripts_Python,gid_File_Share_Registry_Pyuno_Xcd);
gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config,
gid_Dir_Py_PythonCore, gid_Dir_Py_PythonCore_Bin,
gid_Dir_Py_PythonCore_Lib);
Files = (gid_File_Pyuno,
gid_File_Lib_Pyuno,
gid_File_Lib_Pythonloader,
gid_File_Py_Bin_Python,
gid_File_Py_Unohelper,
gid_File_Py_Uno,
gid_File_Py_Pythonloader,
gid_File_Py_Python_Core,
gid_File_Py_Python_Bin,
gid_File_Lib_Python_So,
gid_Shortcut_Lib_Python_So,
gid_File_Scripts_Python,
gid_File_Share_Registry_Pyuno_Xcd);
Unixlinks = (gid_Unixlink_Python_Headers,
gid_Unixlink_Python_Resources,
gid_Unixlink_Python_Versions_Current,
......
......@@ -34,22 +34,4 @@ $(eval $(call gb_StaticLibrary_add_exception_objects,ooopathutils,\
tools/source/misc/pathutils \
))
# HACK for now
# We really should fix the clients of this to link against the static library
# Instead of this evil linking of an object from $(OUTDIR)
define StaticLibrary_ooopathutils_hack
$(call gb_StaticLibrary_get_target,ooopathutils) : $(OUTDIR)/lib/$(1)
$$(eval $$(call gb_Deliver_add_deliverable,$(OUTDIR)/lib/$(1),$(call gb_CxxObject_get_target,tools/source/misc/pathutils),$(1)))
$(OUTDIR)/lib/$(1) : $(call gb_CxxObject_get_target,tools/source/misc/pathutils)
$$(call gb_Deliver_deliver,$$<,$$@)
endef
ifeq ($(OS),WNT)
$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.obj))
else
$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.o))
endif
# vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment