From 917f7eebf54fc3e25353607bc709cc4b41219f7f Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 11 Oct 2020 16:16:59 +0200 Subject: [PATCH] install instruction for macOS On macOS, things are a bit tricky, so I added install instructions for JDK and LibreOffice (incl. command line tool) and making it all run together smoothly. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 78a5a04..d734faa 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ More [examples](/examples) ## Installation +##### On Linux-based systems + ```bash sudo add-apt-repository ppa:libreoffice/ppa sudo apt-get update @@ -50,6 +52,8 @@ sudo apt-get install libreoffice-writer composer require mnvx/lowrapper ``` +##### Inside a Docker container + Example of installation libreoffice into docker container: ```dockerfile @@ -67,6 +71,30 @@ RUN mkdir -p /var/www/.cache/dconf \ && chmod -R ugo+rwx /var/www/.config ``` +##### On macOS + +Watch out! For weird reasons, the LibreOffice command line binary has a non-obvious name on macOS: +`soffice`, probably because until 2010 the software was named StarOffice. +Install the necessary Java Development Kit (which is needed for LibreOffice to run) and LibreOffice +itself for example with the packet manager [brew](https://brew.sh): + +``` +brew install openjdk +brew install libreoffice +``` +Check if LibreOffice is installed correctly: + +``` +soffice -v +# should show +# LibreOffice 7.0.x.x +``` +And in your code tell the Converter the name of the binary: + +``` +$converter = new Converter('soffice'); +``` + ## Run tests ```bash