Start by cloning the repository:
git clone https://github.com/baskerville/plato.git
cd plato
There are two ways to build Plato:
Install the appropriate compiler toolchain (the binaries of the bin
directory need to be in your path).
Install the required dependencies: wget
, curl
, git
, pkg-config
, unzip
, jq
, patchelf
.
Install rustup:
curl https://sh.rustup.rs -sSf | sh
Install the appropriate target:
rustup target add arm-unknown-linux-gnueabihf
./build.sh
./dist.sh
Install the required dependencies: MuPDF 1.20.0, DjVuLibre, FreeType, HarfBuzz.
Install one additional dependency: SDL2.
You can then run the emulator with:
./run-emulator.sh
You can install the importer with:
./install-importer.sh
- Build the image for armhf:
docker build . -t plato:armhf
- The following compiles, mounts a local volume, and outputs the
plato
binary to your local foldertarget/arm-unknown-linux-gnueabihf
:
docker run --rm -t -v $(pwd)/target:/plato/target plato:armhf
You can copy the binary to your Kobo device (make sure you install an existing release first) and it will run.
- Build the image for dev environments:
docker build . -f Dockerfile.dev -t plato:dev
- The following runs tests, compiles, mounts a local volume, and outputs all binaries to your local folder
target/debug
:
docker run --rm -t -v $(pwd):/plato plato:dev
If the emulator or importer fail to run, please follow the steps in Local–Developer Tools to ensure you have the relevant libraries.