From efbd9fd36ae8719f53400d8249101fda41850175 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Apr 2021 19:32:07 +0100 Subject: [PATCH] docs: wip work on build Signed-off-by: Ian Jackson --- docs/build.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++ docs/dev.md | 74 -------------------------------------------- docs/index.rst | 1 + 3 files changed, 85 insertions(+), 74 deletions(-) create mode 100644 docs/build.md diff --git a/docs/build.md b/docs/build.md new file mode 100644 index 00000000..e30a2504 --- /dev/null +++ b/docs/build.md @@ -0,0 +1,84 @@ +Building +======== + +Otter is mostly written in Rust. The web UI frontend is written in +Typescript. The shape libraries are SVGs and need SVG manipulation +libraries. The main documentation is done with Sphnix. + +Setup +----- + +Install the packaged build dependencies: + + +``` + sudo apt install build-essential cpio git curl \ + pkg-config libssl-dev \ + node-typescript inkscape bubblewrap \ + netpbm imagemagick \ + python3-sphinx python3-recommonmark +``` + + +Install Rust. This is most easily done with [rustup](https://rustup.rs)): + +``` + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + + and then follow the instructions about your `PATH`. If this rune + alarms you, see below about Rust privsep. + +3. Switch your Rust install to use Rust Nightly and add the WASM + target: + +``` + rustup default nightly + rustup target add wasm32-unknown-unknown +``` + + Unfortunately, it is possible that the Rust nightly you find when + you run this is missing some pieces. The following is known to + work (with otter from the time of writing): +``` + rustup default nightly-2021-01-26 +``` + +4. Install the `usvg` SVG launderer, which we need for shape libraries + +``` + cargo install usvg +``` + + This will put it in `~/.cargo/bin`, which you presumably have on + your `PATH` (or the above `rustup` and `cargo` runes wouldn't work). + + +** If you just want to edit and preview the shape libraries + (ie the piece shapes) you can stop here ** + + +5. Install some more build tools: + +``` + cargo install bundle-sources +``` + + +Build +----- + +``` + git clone https://salsa.debian.org/iwj/otter + cd otter + make -j8 all bundled-sources +``` + +Or if you just want to edit the piece libraries: + +``` + make -j8 shapelib +``` +And then open `./templates/shapelib.html` in your browser + + diff --git a/docs/dev.md b/docs/dev.md index 6f997446..3a29ce1d 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -14,80 +14,6 @@ code. These instructions have been tested on Debian buster. -Setup ------ - -1. -``` - sudo apt install build-essential cpio git curl \ - pkg-config libssl-dev \ - node-typescript inkscape bubblewrap \ - netpbm imagemagick \ - python3-sphinx python3-recommonmark -``` - -2. Install Rust. This is most easily done with [rustup](https://rustup.rs)): - -``` - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -``` - - and then follow the instructions about your `PATH`. If this rune - alarms you, see below about Rust privsep. - -3. Switch your Rust install to use Rust Nightly and add the WASM - target: - -``` - rustup default nightly - rustup target add wasm32-unknown-unknown -``` - - Unfortunately, it is possible that the Rust nightly you find when - you run this is missing some pieces. The following is known to - work (with otter from the time of writing): -``` - rustup default nightly-2021-01-26 -``` - -4. Install the `usvg` SVG launderer, which we need for shape libraries - -``` - cargo install usvg -``` - - This will put it in `~/.cargo/bin`, which you presumably have on - your `PATH` (or the above `rustup` and `cargo` runes wouldn't work). - - -** If you just want to edit and preview the shape libraries - (ie the piece shapes) you can stop here ** - - -5. Install some more build tools: - -``` - cargo install bundle-sources -``` - - -Build ------ - -``` - git clone https://salsa.debian.org/iwj/otter - cd otter - make -j8 all bundled-sources -``` - -Or if you just want to edit the piece libraries: - -``` - make -j8 shapelib -``` -And then open `./templates/shapelib.html` in your browser - - Ad-hoc tests ------------ diff --git a/docs/index.rst b/docs/index.rst index bc31557c..04cda1e8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,6 +13,7 @@ Otter - Online Table Top Environment Renderer README user advanced + build dev -- 2.30.2