On 13.06.2012 12:36, Stephan Bergmann wrote:
On 06/12/2012 03:07 PM, Stephan Bergmann wrote:
On 06/11/2012 12:17 AM, David Ostrovsky wrote:
Still have to test it on Windows and ask somebody to test it in MacosX.
Quick update: Attached windows.patch allowed me to at least build
<https://gerrit.libreoffice.org/#/c/179/11> on Windows (on top of recent
master). "Tools - Macros - Organize Macros - Python... - LOdev Macros -
HelloWord - HelloWOrdPython - Run" within Writer works, but executing
...\program\python.exe does nothing.
...and with the attached additional windows2.patch, now also
.../program/python -c 'import uno' works.
Thanks!
I cleaned it and pushed a new gerrit change set [1] and created a patch
that cleanly applies to the current master.
Test matrix:
==========================
All platforms: compiles with --disable-python
Mingw32: not considering (pyuno bridge is broken prior to gbuild'ification)
Windows: compiles and works with only supported option:
--enable-python=internal
Linux: compiles and works with: --enable-python=internal &&
--enable-python=system
MacOSX: compiles and works with: --enable-python=internal &&
--enable-python=system
(actually not sure here, have you tried both options? ;-)
I assume it can be pushed now?
@Stephan, really big thank once time again forexplaining how
LibO,pyuno,wrappers and python match together.
And for your tests (on Linux, Windows and MacOSX) and patches. I
*especially* loved your involved
scp2 hack: with on-the-fly simulation of not materialised
python-core-2.6.1-tree with
lib and bin subdirectories.
I also want to thank my gerrit reviewer: David Tardon and Michael Stahl.
Regards
David
[1] https://gerrit.libreoffice.org/#/c/179/13/
From ff001a254c78e0e5c89b6233c44a5e656a72a580 Mon Sep 17 00:00:00 2001
From: David Ostrovsky <David.Ostrovsky@gmx.de>
Date: Sun, 27 May 2012 22:50:41 +0200
Subject: [PATCH] gbuild migration: pyuno module
Change-Id: I7f923a5622214f7540a789bcdd93bf6fd1d166db
---
Makefile.top | 2 +-
Module_tail_build.mk | 1 +
Repository.mk | 4 +
RepositoryExternal.mk | 51 +++++++++
RepositoryFixes.mk | 12 ++
postprocess/packcomponents/makefile.mk | 2 +-
pyuno/CustomTarget_python_bin.mk | 40 +++++++
pyuno/CustomTarget_python_shell.mk | 50 ++++++++
pyuno/CustomTarget_python_wrapper.mk | 36 ++++++
pyuno/CustomTarget_pyversion.mk | 39 +++++++
pyuno/CustomTarget_zipcore.mk | 47 ++++++++
pyuno/Executable_python_wrapper.mk | 41 +++++++
pyuno/Library_pythonloader.mk | 56 +++++++++
pyuno/Library_pyuno.mk | 66 +++++++++++
pyuno/Library_pyuno_wrapper.mk | 65 +++++++++++
pyuno/Makefile | 7 +
pyuno/Module_pyuno.mk | 86 ++++++++++++++
pyuno/Package_python_bin.mk | 31 +++++
pyuno/Package_python_scripts.mk | 39 +++++++
pyuno/Package_python_shell.mk | 31 +++++
pyuno/Package_pyunorc.mk | 31 +++++
pyuno/Package_zipcore.mk | 35 ++++++
pyuno/demo/makefile.mk | 42 -------
pyuno/inc/pyuno/pyuno.hxx | 15 ++-
pyuno/prj/build.lst | 6 +-
pyuno/prj/d.lst | 27 -----
pyuno/source/loader/makefile.mk | 94 ----------------
pyuno/source/module/makefile.mk | 173 -----------------------------
pyuno/source/module/pyuno_dlopenwrapper.c | 4 +-
pyuno/source/module/pyuno_module.cxx | 2 +-
pyuno/zipcore/makefile.mk | 135 ----------------------
scp2/source/ooo/common_brand.scp | 11 --
scp2/source/python/file_python.scp | 36 ++++++-
scp2/source/python/module_python.scp | 18 +++-
tools/StaticLibrary_ooopathutils.mk | 18 ---
35 files changed, 832 insertions(+), 521 deletions(-)
create mode 100644 pyuno/CustomTarget_python_bin.mk
create mode 100644 pyuno/CustomTarget_python_shell.mk
create mode 100755 pyuno/CustomTarget_python_wrapper.mk
create mode 100644 pyuno/CustomTarget_pyversion.mk
create mode 100644 pyuno/CustomTarget_zipcore.mk
create mode 100644 pyuno/Executable_python_wrapper.mk
create mode 100644 pyuno/Library_pythonloader.mk
create mode 100644 pyuno/Library_pyuno.mk
create mode 100644 pyuno/Library_pyuno_wrapper.mk
create mode 100644 pyuno/Makefile
create mode 100755 pyuno/Module_pyuno.mk
create mode 100644 pyuno/Package_python_bin.mk
create mode 100644 pyuno/Package_python_scripts.mk
create mode 100644 pyuno/Package_python_shell.mk
create mode 100644 pyuno/Package_pyunorc.mk
create mode 100644 pyuno/Package_zipcore.mk
delete mode 100644 pyuno/demo/makefile.mk
delete mode 100644 pyuno/prj/dmake
delete mode 100644 pyuno/source/loader/makefile.mk
delete mode 100644 pyuno/source/module/makefile.mk
delete mode 100644 pyuno/zipcore/makefile.mk
diff --git a/Makefile.top b/Makefile.top
index 0d002dd..2b04790 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -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\
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 334bce8..f6b9a9d 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -78,6 +78,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
package \
padmin \
psprint_config \
+ pyuno \
$(if $(filter QADEVOOO,$(BUILD_TYPE)),\
qadevOOo \
) \
diff --git a/Repository.mk b/Repository.mk
index 2ac927d..2c465c2 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -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 \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 226ee03..1ce7c59 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -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)
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index dfdba60..45833b9 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -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))
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index 5ff27d5..463fd4b 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -203,7 +203,7 @@ my_components += \
.IF "$(DISABLE_PYTHON)" != "TRUE"
my_components += \
- pythonloader \
+ component/pyuno/source/loader/pythonloader \
.ENDIF
diff --git a/pyuno/CustomTarget_python_bin.mk b/pyuno/CustomTarget_python_bin.mk
new file mode 100644
index 0000000..044bb68
--- /dev/null
+++ b/pyuno/CustomTarget_python_bin.mk
@@ -0,0 +1,40 @@
+# -*- 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:
diff --git a/pyuno/CustomTarget_python_shell.mk b/pyuno/CustomTarget_python_shell.mk
new file mode 100644
index 0000000..cf64f53
--- /dev/null
+++ b/pyuno/CustomTarget_python_shell.mk
@@ -0,0 +1,50 @@
+# -*- 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:
diff --git a/pyuno/CustomTarget_python_wrapper.mk b/pyuno/CustomTarget_python_wrapper.mk
new file mode 100755
index 0000000..9f459a1
--- /dev/null
+++ b/pyuno/CustomTarget_python_wrapper.mk
@@ -0,0 +1,36 @@
+# -*- 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:
diff --git a/pyuno/CustomTarget_pyversion.mk b/pyuno/CustomTarget_pyversion.mk
new file mode 100644
index 0000000..8766e7e
--- /dev/null
+++ b/pyuno/CustomTarget_pyversion.mk
@@ -0,0 +1,39 @@
+# -*- 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:
diff --git a/pyuno/CustomTarget_zipcore.mk b/pyuno/CustomTarget_zipcore.mk
new file mode 100644
index 0000000..ba22084
--- /dev/null
+++ b/pyuno/CustomTarget_zipcore.mk
@@ -0,0 +1,47 @@
+# -*- 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:
diff --git a/pyuno/Executable_python_wrapper.mk b/pyuno/Executable_python_wrapper.mk
new file mode 100644
index 0000000..709db4d
--- /dev/null
+++ b/pyuno/Executable_python_wrapper.mk
@@ -0,0 +1,41 @@
+# -*- 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:
diff --git a/pyuno/Library_pythonloader.mk b/pyuno/Library_pythonloader.mk
new file mode 100644
index 0000000..d57168d
--- /dev/null
+++ b/pyuno/Library_pythonloader.mk
@@ -0,0 +1,56 @@
+# -*- 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:
diff --git a/pyuno/Library_pyuno.mk b/pyuno/Library_pyuno.mk
new file mode 100644
index 0000000..8ecda3d
--- /dev/null
+++ b/pyuno/Library_pyuno.mk
@@ -0,0 +1,66 @@
+# -*- 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:
diff --git a/pyuno/Library_pyuno_wrapper.mk b/pyuno/Library_pyuno_wrapper.mk
new file mode 100644
index 0000000..eba06d6
--- /dev/null
+++ b/pyuno/Library_pyuno_wrapper.mk
@@ -0,0 +1,65 @@
+# -*- 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:
diff --git a/pyuno/Makefile b/pyuno/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/pyuno/Makefile
@@ -0,0 +1,7 @@
+# -*- 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:
diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk
new file mode 100755
index 0000000..0f15ac5
--- /dev/null
+++ b/pyuno/Module_pyuno.mk
@@ -0,0 +1,86 @@
+# -*- 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:
diff --git a/pyuno/Package_python_bin.mk b/pyuno/Package_python_bin.mk
new file mode 100644
index 0000000..a0a5a08
--- /dev/null
+++ b/pyuno/Package_python_bin.mk
@@ -0,0 +1,31 @@
+# -*- 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:
diff --git a/pyuno/Package_python_scripts.mk b/pyuno/Package_python_scripts.mk
new file mode 100644
index 0000000..3672f61
--- /dev/null
+++ b/pyuno/Package_python_scripts.mk
@@ -0,0 +1,39 @@
+# -*- 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:
diff --git a/pyuno/Package_python_shell.mk b/pyuno/Package_python_shell.mk
new file mode 100644
index 0000000..bb2d6fa
--- /dev/null
+++ b/pyuno/Package_python_shell.mk
@@ -0,0 +1,31 @@
+# -*- 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:
diff --git a/pyuno/Package_pyunorc.mk b/pyuno/Package_pyunorc.mk
new file mode 100644
index 0000000..1f9a4b5c
--- /dev/null
+++ b/pyuno/Package_pyunorc.mk
@@ -0,0 +1,31 @@
+# -*- 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:
diff --git a/pyuno/Package_zipcore.mk b/pyuno/Package_zipcore.mk
new file mode 100644
index 0000000..9069a8f
--- /dev/null
+++ b/pyuno/Package_zipcore.mk
@@ -0,0 +1,35 @@
+# -*- 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:
diff --git a/pyuno/demo/makefile.mk b/pyuno/demo/makefile.mk
deleted file mode 100644
index e00a2fb..0000000
--- a/pyuno/demo/makefile.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-PRJNAME=pyuno
-PRJ=..
-
-.INCLUDE : settings.mk
-.INCLUDE : pyversion.mk
-
-ROOT=$(MISC)/pyuno-doc
-
-FILES=\
- $(ROOT)/python-bridge.html \
- $(ROOT)/customized_setup.png \
- $(ROOT)/mode_component.png \
- $(ROOT)/mode_ipc.png \
- $(ROOT)/modes.sxd \
- $(ROOT)/optional_components.png \
- $(ROOT)/samples/swriter.py \
- $(ROOT)/samples/swritercomp.py \
- $(ROOT)/samples/ooextract.py \
- $(ROOT)/samples/biblioaccess.py \
- $(ROOT)/samples/swritercompclient.py \
- $(ROOT)/samples/hello_world_pyuno.zip
-
-
-$(MISC)/pyuno-doc.zip : dirs $(FILES)
- -rm -f $@
- cd $(MISC) && zip -r pyuno-doc.zip pyuno-doc
-
-dirs .PHONY :
- -mkdir $(ROOT)
- -mkdir $(ROOT)/samples
-
-$(ROOT)/samples/hello_world_pyuno.zip : hello_world_comp.py Addons.xcu
- -rm -f $@
- zip $@ hello_world_comp.py Addons.xcu
-
-$(ROOT)/samples/% : %
- -rm -f $@
- $(COPY) $? $@
-
-$(ROOT)/% : ../doc/%
- -rm -f $@
- $(COPY) $? $@
diff --git a/pyuno/inc/pyuno/pyuno.hxx b/pyuno/inc/pyuno/pyuno.hxx
index e62563e..066fc93 100644
--- a/pyuno/inc/pyuno/pyuno.hxx
+++ b/pyuno/inc/pyuno/pyuno.hxx
@@ -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
diff --git a/pyuno/prj/build.lst b/pyuno/prj/build.lst
index 8d0f8ba..ca0bce9 100644
--- a/pyuno/prj/build.lst
+++ b/pyuno/prj/build.lst
@@ -1,5 +1,3 @@
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 usr1 - all br_mkout NULL
+pu pyuno\prj nmake - all pu_prj NULL
diff --git a/pyuno/prj/d.lst b/pyuno/prj/d.lst
index 38ae95d..e69de29 100644
--- a/pyuno/prj/d.lst
+++ b/pyuno/prj/d.lst
@@ -1,27 +0,0 @@
-mkdir: %_DEST%\bin\pyuno
-mkdir: %_DEST%\lib\pyuno
-
-..\%__SRC%\lib\libpyuno.so %_DEST%\lib\libpyuno.so
-..\%__SRC%\lib\libpyuno.dylib %_DEST%\lib\libpyuno.dylib
-..\%__SRC%\lib\pyuno.so %_DEST%\lib\pyuno.so
-..\%__SRC%\lib\pyuno.dylib %_DEST%\lib\pyuno.dylib
-..\%__SRC%\lib\pythonloader.uno.so %_DEST%\lib\pythonloader.uno.so
-..\%__SRC%\lib\pythonloader.uno.dylib %_DEST%\lib\pythonloader.uno.dylib
-..\%__SRC%\lib\unohelper.py %_DEST%\lib\pyuno\unohelper.py
-..\%__SRC%\lib\pythonloader.py %_DEST%\lib\pyuno\pythonloader.py
-..\%__SRC%\lib\uno.py %_DEST%\lib\pyuno\uno.py
-..\%__SRC%\misc\pythonloader.component %_DEST%\xml\pythonloader.component
-
-..\%__SRC%\bin\unohelper.py %_DEST%\bin\pyuno\unohelper.py
-..\%__SRC%\bin\pythonloader.py %_DEST%\bin\pyuno\pythonloader.py
-..\%__SRC%\bin\uno.py %_DEST%\bin\pyuno\uno.py
-..\%__SRC%\bin\pyuno.pyd %_DEST%\bin\pyuno.pyd
-..\%__SRC%\bin\pyuno.dll %_DEST%\bin\pyuno.dll
-..\%__SRC%\bin\pythonl*.dll %_DEST%\bin\pythonl*.dll
-
-..\%__SRC%\misc\pyunorc %_DEST%\lib\pyunorc
-..\%__SRC%\misc\pyuno.ini %_DEST%\bin\pyuno.ini
-..\%__SRC%\bin\python-core-*.zip %_DEST%\bin\python-core-*.zip
-..\%__SRC%\bin\python.bin %_DEST%\bin\python.bin
-..\%__SRC%\bin\python.sh %_DEST%\bin\pyuno\python
-..\%__SRC%\bin\python.exe %_DEST%\bin\pyuno\python.exe
diff --git a/pyuno/prj/dmake b/pyuno/prj/dmake
deleted file mode 100644
index e69de29..0000000
diff --git a/pyuno/source/loader/makefile.mk b/pyuno/source/loader/makefile.mk
deleted file mode 100644
index 1760a88..0000000
--- a/pyuno/source/loader/makefile.mk
+++ /dev/null
@@ -1,94 +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=pyuno
-TARGET=$(ENFORCEDSHLPREFIX)pythonloader.uno
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-DLLPRE =
-
-#-------------------------------------------------------------------
-
-.IF "$(OS)$(COMEX)" == "SOLARIS4"
-# no -Bdirect for SunWS CC
-DIRECT= $(LINKFLAGSDEFS)
-.ENDIF
-
-.IF "$(SYSTEM_PYTHON)" == "YES"
-PYTHONLIB=$(PYTHON_LIBS)
-CFLAGS+=$(PYTHON_CFLAGS)
-.IF "$(EXTRA_CFLAGS)"!=""
-PYTHONLIB+=-framework Python
-.ENDIF # "$(EXTRA_CFLAGS)"!=""
-.ELSE
-.INCLUDE : pyversion.mk
-
-CFLAGS+=-I$(SOLARINCDIR)/python
-.ENDIF
-
-SHL1TARGET=$(TARGET)
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB) \
- $(PYUNOLIB) \
- $(PYTHONLIB)
-
-SHL1VERSIONMAP=$(SOLARENV)/src/component.map
-SHL1DEPN=
-SHL1IMPLIB=i$(TARGET)
-SHL1LIBS=$(SLB)/$(TARGET).lib
-SHL1DEF=$(MISC)/$(SHL1TARGET).def
-
-DEF1NAME=$(SHL1TARGET)
-SLOFILES=$(SLO)/pyuno_loader.obj
-
-# --- Targets ------------------------------------------------------
-
-ALL : ALLTAR \
- $(DLLDEST)/pythonloader.py
-.ENDIF # L10N_framework
-
-.INCLUDE : target.mk
-.IF "$(L10N_framework)"==""
-$(DLLDEST)/%.py: %.py
- cp $? $@
-.ENDIF # L10N_framework
-
-ALLTAR : $(MISC)/pythonloader.component
-
-$(MISC)/pythonloader.component .ERRREMOVE : \
- $(SOLARENV)/bin/createcomponent.xslt pythonloader.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' \
- -o $@ $(SOLARENV)/bin/createcomponent.xslt pythonloader.component
diff --git a/pyuno/source/module/makefile.mk b/pyuno/source/module/makefile.mk
deleted file mode 100644
index 5c9d81e..0000000
--- a/pyuno/source/module/makefile.mk
+++ /dev/null
@@ -1,173 +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=pyuno
-TARGET=pyuno
-ENABLE_EXCEPTIONS=TRUE
-
-LINKFLAGSDEFS = # do not fail with missing symbols
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-
-#-------------------------------------------------------------------
-
-.IF "$(OS)$(COMEX)" == "SOLARIS4"
-# no -Bdirect for SunWS CC
-DIRECT = $(LINKFLAGSDEFS)
-.ENDIF
-
-# special setting from environment
-.IF "$(EXTRA_CFLAGS)"!=""
-EXTRA_FRAMEWORK_FLAG=-framework Python
-.ENDIF # .IF "$(EXTRA_CFLAGS)"!=""
-
-.IF "$(GUI)" == "UNX"
-# python expects modules without the lib prefix
-# pyuno.so even on Mac OS X, because it is a python module
-PYUNO_MODULE=$(DLLDEST)$/pyuno.so
-PYUNORC=pyunorc
-.ELSE
-.IF "$(CROSS_COMPILING)" != "YES"
-.INCLUDE : pyversion.mk
-.ENDIF
-PYUNORC=pyuno.ini
-DLLPOST=.pyd
-.ENDIF
-
-.IF "$(SYSTEM_PYTHON)" == "YES"
-PYTHONLIB=$(PYTHON_LIBS)
-CFLAGS+=$(PYTHON_CFLAGS)
-.ELSE # "$(SYSTEM_PYTHON)" == "YES"
-.INCLUDE : pyversion.mk
-CFLAGS+=-I$(SOLARINCDIR)/python
-.ENDIF # "$(SYSTEM_PYTHON)" == "YES"
-
-SHL1TARGET=$(TARGET)
-SLOFILES= \
- $(SLO)/pyuno_runtime.obj \
- $(SLO)/pyuno.obj \
- $(SLO)/pyuno_callable.obj \
- $(SLO)/pyuno_module.obj \
- $(SLO)/pyuno_type.obj \
- $(SLO)/pyuno_util.obj \
- $(SLO)/pyuno_except.obj \
- $(SLO)/pyuno_adapter.obj \
- $(SLO)/pyuno_gc.obj
-
-# remove this, when issue i35064 is integrated
-.IF "$(COM)"=="GCC"
-NOOPTFILES= \
- $(SLO)/pyuno_module.obj
-.ENDIF # "$(COM)"=="GCC"
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB) \
- $(SALHELPERLIB) \
- $(PYTHONLIB) \
- $(EXTRA_FRAMEWORK_FLAG)
-
-SHL1DEPN=$(eq,$(OS),MACOSX $(MISC)/framework_link $(NULL))
-SHL1LIBS=$(SLB)/$(TARGET).lib
-SHL1IMPLIB=i$(TARGET)
-
-SHL1DEF=$(MISC)/$(SHL1TARGET).def
-
-DEF1NAME=$(SHL1TARGET)
-DEF1DEPN=$(MISC)/pyuno.flt
-
-DEFLIB1NAME=$(TARGET)
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(GUI)$(COM)"=="WNTGCC"
-ALLTAR : \
- $(DLLDEST)/uno.py \
- $(DLLDEST)/unohelper.py \
- $(PYUNO_MODULE) \
- $(MISC)/$(PYUNORC) \
- $(LB)/lib$(TARGET).a
-
-$(LB)/lib$(TARGET).a: $(MISC)/$(TARGET).def
- $(DLLTOOL) --dllname $(TARGET)$(DLLPOST) --input-def=$(MISC)/$(TARGET).def --kill-at
--output-lib=$(LB)/lib$(TARGET).a
-.ELSE
-
-ALLTAR : \
- $(DLLDEST)/uno.py \
- $(DLLDEST)/unohelper.py \
- $(PYUNO_MODULE) \
- $(MISC)/$(PYUNORC)
-.ENDIF
-.ENDIF
-
-.INCLUDE : target.mk
-.IF "$(L10N_framework)"==""
-$(DLLDEST)/%.py: %.py
- cp $? $@
-
-# make checkdll happy
-$(MISC)/framework_link :
- $(COMMAND_ECHO)ln -sf $(SOLARLIBDIR)/OOoPython.framework $(LB)/OOoPython.framework
- @touch $@
-
-.IF "$(GUI)" == "UNX"
-$(PYUNO_MODULE) : $(SLO)$/pyuno_dlopenwrapper.obj
-.IF "$(OS)" == "LINUX"
- @echo $(LINK) $(LINKFLAGS) $(LINKFLAGSRUNPATH_OOO) $(LINKFLAGSSHLCUI) -ldl -o $@
$(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ELIF "$(OS)" == "SOLARIS"
- @echo ld -G -ldl -o $@ $(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ELIF "$(OS)" == "FREEBSD"
- @echo ld -shared -o $@ $(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ELIF "$(OS)" == "NETBSD"
- @echo $(LINK) $(LINKFLAGSSHLCUI) -o $@ $(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ELIF "$(OS)" == "OPENBSD"
- @echo ld -shared -o $@ $(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ELIF "$(OS)" == "DRAGONFLY"
- @echo ld -shared -o $@ $(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ELIF "$(OS)" == "MACOSX"
- @echo $(CC) -bundle -ldl -o $@ $(SLO)$/pyuno_dlopenwrapper.o $(EXTRA_LINKFLAGS)
$(EXTRA_FRAMEWORK_FLAG) > $(MISC)$/$(@:b).cmd
-.ELSE
- @echo $(LINK) $(LINKFLAGSSHLCUI) -o $@ $(SLO)$/pyuno_dlopenwrapper.o > $(MISC)$/$(@:b).cmd
-.ENDIF
- cat $(MISC)$/$(@:b).cmd
- @+source $(MISC)$/$(@:b).cmd
-.ENDIF
-
-$(MISC)/$(PYUNORC) : pyuno
- -rm -f $@
- cat pyuno > $@
-
-$(MISC)/pyuno.flt : pyuno.flt
- -rm -f $@
- cat $? > $@
-
-.ENDIF # L10N_framework
diff --git a/pyuno/source/module/pyuno_dlopenwrapper.c b/pyuno/source/module/pyuno_dlopenwrapper.c
index 3bdc912..cb17c51 100644
--- a/pyuno/source/module/pyuno_dlopenwrapper.c
+++ b/pyuno/source/module/pyuno_dlopenwrapper.c
@@ -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"))();
}
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index 432a61e..26d1932 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -833,7 +833,7 @@ struct PyMethodDef PyUNOModule_methods [] =
}
-extern "C" PY_DLLEXPORT
+extern "C"
#if PY_MAJOR_VERSION >= 3
PyObject* PyInit_pyuno()
{
diff --git a/pyuno/zipcore/makefile.mk b/pyuno/zipcore/makefile.mk
deleted file mode 100644
index 166fff4..0000000
--- a/pyuno/zipcore/makefile.mk
+++ /dev/null
@@ -1,135 +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.
-#
-#*************************************************************************
-
-PRJNAME=pyuno
-PRJ=..
-
-TARGET=zipcore
-LIBTARGET=NO
-
-.INCLUDE : settings.mk
-.IF "$(L10N_framework)"==""
-UWINAPILIB =
-
-.IF "$(SYSTEM_PYTHON)" == "YES"
-
-systempython:
-# nothing
-
-.ELSE
-
-.INCLUDE : pyversion.mk
-
-PYDIRNAME=python-core-$(PYVERSION)
-DESTROOT=$(BIN)/$(PYDIRNAME)
-.IF "$(GUI)" == "UNX"
-PYTHONBINARY=$(BIN)/python$(EXECPOST).bin
-.ELSE
-.IF "$(COM)" == "GCC"
-PYTHONBINARY=$(DESTROOT)/bin/python.bin
-.ELSE
-PYTHONBINARY=$(DESTROOT)/bin/python$(EXECPOST)
-.ENDIF
-.ENDIF
-
-.IF "$(OS)" != "MACOSX"
-FINDLIBFILES:=$(subst,$(SOLARLIBDIR)/python, \
- $(shell @$(FIND) $(SOLARLIBDIR)/python -type f| $(GREP) -v "\.pyc" |$(GREP) -v "\.py~"
|$(GREP) -v .orig | $(GREP) -v _failed))
-
-FILES=\
- $(PYTHONBINARY) \
- $(foreach,i,$(FINDLIBFILES) $(DESTROOT)/lib$(i))
-
-.IF "$(OS)" == "WNT"
-APP1TARGET=python
-APP1OBJS=$(OBJFILES) $(SOLARLIBDIR)/pathutils-obj.obj
-APP1STDLIBS=
-APP1RPATH=OOO
-OBJFILES=$(OBJ)/python.obj
-.ENDIF
-
-
-.INCLUDE: target.mk
-
-ALLTAR: \
- $(BIN)/$(PYDIRNAME).zip
-.ENDIF
-
-.IF "$(GUI)" == "UNX"
-ALLTAR : $(BIN)/python.sh
-
-STRIPMAC=-e '/^NONMACSECTION/d' -e '/^MACSECTION/,$$d'
-STRIPNONMAC=-e '/^NONMACSECTION/,/^MACSECTION/d'
-
-$(BIN)/python.sh : python.sh
- $(COMMAND_ECHO)sed -e 's/%%PYVERSION%%/$(eq,$(OS),MACOSX $(PYMAJOR).$(PYMINOR)
$(PYVERSION))/g' -e 's/%%OOO_LIBRARY_PATH_VAR%%/$(OOO_LIBRARY_PATH_VAR)/g' \
- $(eq,$(OS),MACOSX $(STRIPNONMAC) $(STRIPMAC)) < $? > $@
- @chmod +x $@
-.ENDIF
-
-$(OBJ)/python.obj: $(OUT)/inc/pyversion.hxx
-
-$(OUT)/inc/pyversion.hxx: pyversion.inc
- $(SED) $(USQ)s/@/$(PYVERSION)/g$(USQ) < $< > $@
-
-$(BIN)/$(PYDIRNAME).zip : $(FILES)
-.IF "$(GUI)" == "UNX"
-.IF "$(OS)" != "AIX"
- cd $(DESTROOT) && find . -name '*$(DLLPOST)' | xargs strip
-.ENDIF
-.ENDIF
- -rm -f $@
- cd $(BIN) && zip -r $(PYDIRNAME).zip $(PYDIRNAME)
-
-$(DESTROOT)/lib/% : $(SOLARLIBDIR)/python/%
- -$(MKDIRHIER) $(@:d)
- -rm -f $@
- cat $< > $@
-
-.IF "$(GUI)"== "UNX"
-$(BIN)/python$(EXECPOST).bin : $(SOLARBINDIR)/python$(EXECPOST)
- -$(MKDIRHIER) $(@:d)
- -rm -f $@
- cat $< > $@
-.IF "$(OS)" != "MACOSX" && "$(OS)" != "AIX"
- strip $@
-.ENDIF
- chmod +x $@
-.ELSE
-.IF "$(COM)" == "GCC"
-$(DESTROOT)/bin/python.bin : $(SOLARBINDIR)/python$(EXECPOST)
-.ELSE
-$(DESTROOT)/bin/python$(EXECPOST) : $(SOLARBINDIR)/python$(EXECPOST)
-.ENDIF
- -$(MKDIRHIER) $(@:d)
- -rm -f $@
- cat $< > $@
-.ENDIF
-
-.ENDIF
-.ELSE
-.ENDIF # L10N_framework
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 359f9c6..1de1e4b 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -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
diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp
index 194394d..47ab5fe 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -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
diff --git a/scp2/source/python/module_python.scp b/scp2/source/python/module_python.scp
index 6ee8345..0f15826 100644
--- a/scp2/source/python/module_python.scp
+++ b/scp2/source/python/module_python.scp
@@ -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,
diff --git a/tools/StaticLibrary_ooopathutils.mk b/tools/StaticLibrary_ooopathutils.mk
index a656700..b21a0fd 100644
--- a/tools/StaticLibrary_ooopathutils.mk
+++ b/tools/StaticLibrary_ooopathutils.mk
@@ -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:
--
1.7.5.4
Context
- Re: [GERRIT] gbuild migration: pyuno module (continued)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.