From 825f5d90ed27a284bdf43687b8faaac7fd161305 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Mon, 18 May 2020 23:40:43 +0100 Subject: [PATCH] Update compile and install instructions --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/README.md b/README.md index e549ce8..2d3ae9b 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,58 @@ learning exercise! ## How +### Compiling + This project is written in Rust, so you'll need a rust compiler to build it. [Rustup]() comes highly recommended. Deltachat is also written in Rust and it needs the `nightly` version, so follow the instructions for that. +Once you have a working rust compiler, just: + +``` +$ cargo build --release +``` + +to get a `telepathy-padfoot binary. + + +### Cross-compiling amd64 -> i386 + +If you need a 32-bit binary and you're on an am64 bit system, this seems to +work, as long as you have 32-bit versions of `libdbus-1` and `libssl` installed. + +On Debian, the full sequence looks like: + +``` +$ dpkg --print-architecture +amd64 +# dpkg --add-architecture i386 +$ dpkg --print-foreign-architectures +i386 +# apt update +# apt install libdbus-1-dev:i386 libssl-dev:i386 +$ rustup target install i686-unknown-linux-gnu +$ PKG_CONFIG_ALLOW_CROSS=1 cargo build --target=i686-unknown-linux-gnu --release +``` + +This creates a 32-bit executable at `target/i686-unknown-linux-gnu/release/telepathy-padfoot` + +I don't have a 32-bit machine to test this on, but happy to take fixes for it. + +### Installing + +There is a `share/` directory in this project that contains a bunch of files. +They should be placed into `/usr/share`, following the same layout. Then put +the binary into `/usr/lib/telepathy/telepathy-padfoot`. + +I should probably put this into the makefile. + + + + +### Autogenerated telepathy DBUS bindings + + It makes use of the `dbus-codegen-rust` crate to convert the [telepathy interface specs](https://github.com/TelepathyIM/telepathy-spec) into the executable code in `src/telepathy`. This is checked in, but can be