summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--instsetoo_native/util/makefile.mk14
-rw-r--r--scp2/source/python/file_python.scp158
-rw-r--r--scp2/source/python/makefile.mk2
-rw-r--r--scp2/source/python/profileitem_python.scp12
4 files changed, 172 insertions, 14 deletions
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index b2f014f6ad58..28b9c33628c5 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -279,24 +279,12 @@ openoffice:
.ENDIF # "$(alllangiso)"!=""
.IF "$(LOCALPYFILES)"!=""
-$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES) $(BIN)$/cp1251.py $(BIN)$/iso8859_1.py
+$(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES)
.ENDIF # "$(LOCALPYFILES)"!=""
$(BIN)$/%.py : $(SOLARSHAREDBIN)$/pyuno$/%.py
@$(COPY) $< $@
-.IF "$(SYSTEM_PYTHON)" != "YES"
-$(BIN)$/cp1251.py : $(SOLARLIBDIR)$/python$/encodings$/cp1251.py
- @$(COPY) $< $@
-$(BIN)$/iso8859_1.py : $(SOLARLIBDIR)$/python$/encodings$/iso8859_1.py
- @$(COPY) $< $@
-.ELSE
-$(BIN)$/cp1251.py :
- @echo "Using system python - nothing more to do here"
-$(BIN)$/iso8859_1.py :
- @echo "Using system python - nothing more to do here"
-.ENDIF
-
$(BIN)$/intro.zip : $(SOLARCOMMONPCKDIR)$/openoffice_nologo$/intro.zip
$(COPY) $< $@
diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp
index 1303bf59460f..5cd84d82b3e9 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -83,11 +83,17 @@ End
File gid_File_Py_Python_Core
TXT_FILE_BODY;
Dir = gid_Dir_Program;
+ #ifdef MACOSX
+ Name = "OOoPython.framework.zip";
+ Styles = (ARCHIVE,USE_INTERNAL_RIGHTS);
+ #else
Name = STRING(CONCAT3(python-core-,PYVERSION,.zip));
Styles = (ARCHIVE);
+ #endif
End
#ifdef UNX
+#ifndef MACOSX
File gid_File_Py_Python_Bin
BIN_FILE_BODY;
Dir = gid_Dir_Program;
@@ -96,6 +102,7 @@ File gid_File_Py_Python_Bin
End
#endif
#endif
+#endif
// Scripting Framework Python script proxy
@@ -126,12 +133,163 @@ File gid_File_Share_Registry_Pyuno_Xcd
End
#ifndef SYSTEM_PYTHON
+#ifndef MACOSX
File gid_File_Lib_Python_So
TXT_FILE_BODY;
Dir = gid_Dir_Program;
Name = STRING(PY_FULL_DLL_NAME);
Styles = (PACKED);
End
+#else //MACOSX
+//directory entries solely to be able to create the symlinks
+Directory gid_Dir_PythonFramework
+ ParentID = gid_Dir_Program;
+ HostName = "OOoPython.framework";
+End
+
+Unixlink gid_Unixlink_Python_Headers
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework;
+ Name = "Headers";
+ Target = "Versions/Current/Headers";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_Resources
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework;
+ Name = "Resources";
+ Target = "Versions/Current/Resources";
+ Styles = ();
+End
+
+Directory gid_Dir_PythonFramework_Versions
+ ParentID = gid_Dir_PythonFramework;
+ HostName = "Versions";
+End
+
+Unixlink gid_Unixlink_Python_Versions_Current
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions;
+ Name = "Current";
+ Target = STRING(PYMAJMIN);
+ Styles = ();
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver
+ ParentID = gid_Dir_PythonFramework_Versions;
+ HostName = STRING(PYMAJMIN);
+End
+
+Unixlink gid_Unixlink_Python_Versions_ver_Headers
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver;
+ Name = "Headers";
+ Target = STRING(CONCAT2(include/python,PYMAJMIN));
+ Styles = ();
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_bin
+ ParentID = gid_Dir_PythonFramework_Versions_ver;
+ HostName = "bin";
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_lib
+ ParentID = gid_Dir_PythonFramework_Versions_ver;
+ HostName = "lib";
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_lib_pythonver
+ ParentID = gid_Dir_PythonFramework_Versions_ver_lib;
+ HostName = STRING(CONCAT2(python,PYMAJMIN));
+End
+
+Directory gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config
+ ParentID = gid_Dir_PythonFramework_Versions_ver_lib_pythonver;
+ HostName = "config";
+End
+
+Unixlink gid_Unixlink_Python_OOoPython
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework;
+ Name = "OOoPython";
+ Target = "Versions/Current/OOoPython";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_idle
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "idle";
+ Target = STRING(CONCAT2(idle,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pydoc
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "pydoc";
+ Target = STRING(CONCAT2(pydoc,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_python_real
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "python";
+ Target = "../Resources/Python.app/Contents/MacOS/OOoPython";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_python
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "python";
+ Target = STRING(CONCAT2(python,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pythonconfig
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "python-config";
+ Target = STRING(CONCAT3(python,PYMAJMIN,-config));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pythonw_real
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "pythonw";
+ Target = "../Resources/Python.app/Contents/MacOS/OOoPython";
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_pythonw
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "pythonw";
+ Target = STRING(CONCAT2(pythonw,PYMAJMIN));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_bin_smtpdpy
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_bin;
+ Name = "smtpd.py";
+ Target = STRING(CONCAT3(smtpd,PYMAJMIN,.py));
+ Styles = ();
+End
+
+Unixlink gid_Unixlink_Python_libpython
+ BIN_FILE_BODY;
+ Dir = gid_Dir_PythonFramework_Versions_ver_lib_pythonver_config;
+ Name = STRING(PY_FULL_DLL_NAME);
+ Target = "../../../OOoPython";
+ Styles = ();
+End
+#endif //MACOSX
+
#ifdef WNT
File gid_File_Lib_Python_So_Brand // Fix for system-python-problem on windows
TXT_FILE_BODY;
diff --git a/scp2/source/python/makefile.mk b/scp2/source/python/makefile.mk
index b34c0af1491d..4e03218ff06a 100644
--- a/scp2/source/python/makefile.mk
+++ b/scp2/source/python/makefile.mk
@@ -44,7 +44,7 @@ SCPDEFS+=-DSYSTEM_PYTHON
.ENDIF
SCPDEFS+=\
- -DPYVERSION=$(PYVERSION) \
+ -DPYVERSION=$(PYVERSION) -DPYMAJMIN=$(PYMAJOR).$(PYMINOR) \
-DPY_FULL_DLL_NAME=$(PY_FULL_DLL_NAME)
SCP_PRODUCT_TYPE=osl
diff --git a/scp2/source/python/profileitem_python.scp b/scp2/source/python/profileitem_python.scp
index be8edc601eb6..1c4fdb077986 100644
--- a/scp2/source/python/profileitem_python.scp
+++ b/scp2/source/python/profileitem_python.scp
@@ -46,7 +46,11 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonhome
Section = "Bootstrap";
Order = 1;
Key = "PYUNO_LOADER_PYTHONHOME";
+ #ifdef MACOSX
+ Value = CONCAT2($ORIGIN,"OOoPython.framework");
+ #else
Value = CONCAT2($ORIGIN/python-core-,PYVERSION);
+ #endif
End
#endif
@@ -60,11 +64,19 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonpath
Value = "$ORIGIN";
#else
#ifdef UNX
+ #ifdef MACOSX
+ #define FRAMEWORKLIB CONCAT4($ORIGIN/OOoPython.framework/Versions/,PYMAJMIN,/lib/python,PYMAJMIN)
+ Value = CONCAT4(FRAMEWORKLIB FRAMEWORKLIB,
+ /lib-dynload FRAMEWORKLIB,
+ /lib-tk FRAMEWORKLIB,
+ /site-packages $ORIGIN);
+ #else
Value = CONCAT9($ORIGIN/python-core-,PYVERSION,
/lib $ORIGIN/python-core-,PYVERSION,
/lib/lib-dynload $ORIGIN/python-core-,PYVERSION,
/lib/lib-tk $ORIGIN/python-core-,PYVERSION,
/lib/site-packages $ORIGIN);
+ #endif
#else
#ifdef _gcc3
Value = STRING(CONCAT9($ORIGIN/python-core-,PYVERSION,