Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
/hyphenation-patterns
/dictionaries
/dist
/books
/bundle
/plato-*.zip
/thirdparty/*/*
Expand Down
6 changes: 3 additions & 3 deletions crates/core/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ fn main() {
"linux" => {
println!("cargo:rustc-link-search=target/mupdf_wrapper/Linux");
println!("cargo:rustc-link-lib=dylib=stdc++");
},
}
"macos" => {
println!("cargo:rustc-link-search=target/mupdf_wrapper/Darwin");
println!("cargo:rustc-link-lib=dylib=c++");
},
}
_ => panic!("Unsupported platform: {}.", target_os),
}

println!("cargo:rustc-link-lib=mupdf-third");
// println!("cargo:rustc-link-lib=mupdf-third");
}

println!("cargo:rustc-link-lib=z");
Expand Down
27 changes: 27 additions & 0 deletions doc/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ git clone https://github.com/baskerville/plato.git
cd plato
```

## Nix (recommended)

A `flake.nix` is provided that supplies every dependency automatically on macOS and Linux.

Enable flakes (once, user-level):
```sh
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
```

Enter the development shell:
```sh
nix develop
```

This gives you the Linaro cross-compiler, Rust stable with the ARM target, and all libraries needed for the emulator. From inside the shell, the usual commands apply:

```sh
./build.sh # cross-compile for Kobo
./run-emulator.sh # run the emulator
./dist.sh # build the distribution archive
```

---

## Manual Setup

## Plato

#### Preliminary
Expand Down
Loading