Skip to content

Commit

Permalink
[doc] Added Speculos 'pip' installation rather than only C, source co…
Browse files Browse the repository at this point in the history
…mpilation
  • Loading branch information
lpascal-ledger committed Sep 6, 2024
1 parent 877a187 commit ab54633
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 6 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,41 @@ Usage example:
# ... and open a browser on http://127.0.0.1:5000
```

## Installation

### From Python `pypi` packages

The easiest, stable way to install Speculos is with `pip`:

```
pip install speculos
```

It is advised to use Python virtualenv, otherwise admin rights will probably be
necessary.


### From sources

Installing Speculos from sources is a bit heavier and, depending on the platform,
complex, due to all the dependency needed for compiling the emulator.

On Debian (10 or later) or Ubuntu (18.04 or later):

```
sudo apt install \
git cmake gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gdb-multiarch \
python3-pyqt5 python3-construct python3-flask-restful python3-jsonschema \
python3-mnemonic python3-pil python3-pyelftools python3-requests \
qemu-user-static libvncserver-dev
# from the root directory of the source repository
pip install .
```

Dependency management will vary on other platforms; using Docker images and/or WSL
should facilitate the installation.

## Bugs and contributions

Feel free to open issues and create pull requests on this GitHub repository.
Expand Down
22 changes: 16 additions & 6 deletions docs/installation/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,30 @@ For Debian (version 10 "Buster" or later) and Ubuntu (version 18.04 or later):

```shell
sudo apt install \
cmake gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gdb-multiarch \
git cmake gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gdb-multiarch \
python3-pyqt5 python3-construct python3-flask-restful python3-jsonschema \
python3-mnemonic python3-pil python3-pyelftools python3-requests \
qemu-user-static

qemu-user-static libvncserver-dev
```

For optional VNC support, please also install `libvncserver-dev`:
Please note that VNC support (the `libvncserver-dev` package), although necessary
for a Python installation, is optional when building only the launcher (see below).

## Build & install

Easiest way to build & install Speculos is with `pip`. It will not only compile
the launcher, but will also install the Python package wrapped around it, which
includes the high-level Speculos entrypoint, used (for instance) in the
[Ragger](https://ledgerhq.github.io/ragger/) framework.

Following command ought to be executed into a Python virtualenv, else admin
rights will be necessary.

```shell
sudo apt install libvncserver-dev
pip install .
```

## Build
## Building the Speculos launcher only

### speculos

Expand Down

0 comments on commit ab54633

Please sign in to comment.