Update compile and install instructions

This commit is contained in:
2020-05-18 23:40:43 +01:00
parent a95be7ee4b
commit 825f5d90ed

View File

@@ -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