Skip to content

Commit

Permalink
Add instructions on how to build the emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
baskerville committed Mar 2, 2020
1 parent 2af2643 commit 0c8f06a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/EMULATOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Building on Linux

1. Install the following dependencies with your package manager: *SDL2*, *DjVuLibre*, *HarfBuzz*, *OpenJPEG*, *jpeg*, *jbig2dec*, *zlib*.
2. Unpack the sources for *MuPDF 1.16.0* and copy the files in `contrib/linux/mupdf` in the same directory.
3. Apply the patch and build the library (it will appear in `build/release`):
```sh
patch -p 1 < linux.patch
./build-linux.sh
```
4. Within *Plato*'s directory, go to `src/wrapper` and build the wrapper (replace `<path_to_mupdf>` with the appropriate path):
```sh
CFLAGS="-I<path_to_mupdf>/include" ./build.sh
```
5. Copy the libraries generated on steps 3 (`libmupdf.so`) and 4 (`libmupdfwrapper.so`) in the appropriate directory (e.g. `/usr/lib`).
6. And finally, in *Plato*'s directory:
```sh
cargo run --bin plato-emulator --features emulator
```

0 comments on commit 0c8f06a

Please sign in to comment.