summaryrefslogtreecommitdiffstats
path: root/pyuno/zipcore/mac.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pyuno/zipcore/mac.sh')
-rw-r--r--pyuno/zipcore/mac.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/pyuno/zipcore/mac.sh b/pyuno/zipcore/mac.sh
new file mode 100644
index 000000000..830bcdaa1
--- /dev/null
+++ b/pyuno/zipcore/mac.sh
@@ -0,0 +1,14 @@
+# Set URE_BOOTSTRAP so that "uno.getComponentContext()" bootstraps a complete
+# OOo UNO environment:
+: ${URE_BOOTSTRAP=vnd.sun.star.pathname:$sd_prog/../Resources/fundamentalrc}
+export URE_BOOTSTRAP
+
+PYTHONHOME=$sd_prog/../Frameworks/LibreOfficePython.framework
+export PYTHONHOME
+
+pybasislibdir=$PYTHONHOME/Versions/%%PYVERSION%%/lib/python%%PYVERSION%%
+PYTHONPATH=$sd_prog/../Resources:$sd_prog/../Frameworks:$pybasislibdir:$pybasislibdir/lib-dynload:$pybasislibdir/lib-tk:$pybasislibdir/site-packages${PYTHONPATH+:$PYTHONPATH}
+export PYTHONPATH
+
+# execute binary
+exec "$PYTHONHOME/Versions/%%PYVERSION%%/Resources/Python.app/Contents/MacOS/LibreOfficePython" "$@"