Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Added Speculos 'pip' installation rather than only C, source compilation #513

Merged
merged 1 commit into from
Sep 6, 2024
Merged
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
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`:
lpascal-ledger marked this conversation as resolved.
Show resolved Hide resolved

```
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
Loading