2020-10-07 10:36:04 +00:00
|
|
|
# Documentation for developers
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
Feather is developed primarily on Linux, but can also be built and debugged on macOS. Development on Windows is not
|
|
|
|
currently supported.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
## Setting up a development environment
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
### Dependencies
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2023-10-13 11:42:46 +00:00
|
|
|
Note: Feather requires Qt 6.3 or later. Make sure your distro's package manager provides this version.
|
2022-05-26 16:25:03 +00:00
|
|
|
If not, it is recommended that you install Qt manually using the online installer, which can be found here:
|
|
|
|
https://www.qt.io/download (under open-source).
|
|
|
|
|
|
|
|
#### Arch Linux
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2023-10-13 11:42:46 +00:00
|
|
|
pacman -S git cmake base-devel ccache unbound boost qrencode qt6-base qt6-svg qt6-websockets qt6-multimedia libzip hidapi protobuf zxing-cpp
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
#### Ubuntu 22.04
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2022-05-26 16:25:03 +00:00
|
|
|
apt update
|
2023-10-13 11:42:46 +00:00
|
|
|
apt install git cmake build-essential ccache libssl-dev libunbound-dev libboost-all-dev libqrencode-dev \
|
2022-05-26 16:25:03 +00:00
|
|
|
qt6-base-dev libgl1-mesa-dev libqt6svg6-dev libqt6websockets6-dev libzip-dev libsodium-dev libgcrypt-dev \
|
2023-10-13 11:42:46 +00:00
|
|
|
libx11-xcb-dev libprotobuf-dev libhidapi-dev libzxing-dev
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2023-01-23 21:53:06 +00:00
|
|
|
#### Void Linux
|
|
|
|
|
|
|
|
```bash
|
2023-10-13 11:42:46 +00:00
|
|
|
xbps-install -S base-devel cmake boost-devel openssl-devel unbound-devel libsodium-devel zlib-devel qt6-base-devel \
|
2023-01-23 21:53:06 +00:00
|
|
|
qt6-svg-devel qt6-websockets-devel qt6-multimedia-devel libgcrypt-devel libzip-devel hidapi-devel protobuf \
|
2023-10-13 11:42:46 +00:00
|
|
|
protobuf-devel qrencode-devel zxing-cpp-devel
|
2023-01-23 21:53:06 +00:00
|
|
|
```
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
#### macOS
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:58:54 +00:00
|
|
|
For macOS it's easiest to leverage [brew](https://brew.sh) to install the required dependencies.
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
```bash
|
2023-10-13 11:42:46 +00:00
|
|
|
brew install qt libsodium libzip qrencode unbound cmake boost hidapi openssl expat libunwind-headers protobuf pkgconfig
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
2022-05-26 16:25:03 +00:00
|
|
|
|
2023-10-13 11:42:46 +00:00
|
|
|
Build [zxing-cpp](https://github.com/zxing-cpp/zxing-cpp) from source or compile Feather with `-DWITH_SCANNER=Off`.
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
### Tor daemon
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
A Tor daemon is required to connect to .onion nodes and the websocket server. Development builds do not include
|
|
|
|
the Tor binary by default, this can be enabled with `-DTOR_DIR=/path/to/tor`. We recommend running a local Tor daemon
|
|
|
|
as this prevents Feather from spawning a child process and saves time.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
#### Arch Linux
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
```bash
|
|
|
|
pacman -S tor
|
|
|
|
systemctl enable --now tor
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
#### Ubuntu Debian
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
```bash
|
|
|
|
apt update && apt install tor
|
|
|
|
systemctl enable --now tor
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2023-01-23 21:53:06 +00:00
|
|
|
#### Void Linux
|
|
|
|
|
|
|
|
```bash
|
|
|
|
xbps-install tor
|
|
|
|
ln -s /etc/sv/tor /var/service/.
|
|
|
|
sv start tor
|
|
|
|
```
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
#### macOS
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
```bash
|
|
|
|
brew install tor
|
|
|
|
brew services restart tor
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
### Clone Feather
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2022-05-26 16:25:03 +00:00
|
|
|
git clone http://github.com/feather-wallet/feather.git
|
|
|
|
cd feather
|
|
|
|
git submodule update --init --recursive
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-26 16:58:54 +00:00
|
|
|
### Jetbrains Clion (IDE)
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
We recommend using Jetbrains Clion for Feather development. It integrates nicely with CMake and comes with a built-in
|
|
|
|
debugger.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
To pass CMake flags to CLion, go to `File->Settings->Build->CMake`, set Build Type to `Debug` and set your
|
2022-12-21 15:15:22 +00:00
|
|
|
preferred CMake options. If you installed Qt using the online installer you may have to add
|
|
|
|
`-DCMAKE_PREFIX_PATH=/path/to/qt/installation` in the CMake options. More CMake options are documented below.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
Run CMake (`View -> Tool Windows -> CMake`). Click on the 🔃 (`Reload CMake Project`) button.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
Go to `Run -> Edit configurations` and make sure the `feather` target is selected.
|
|
|
|
You can add any environment variables and program arguments here:
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
- For more verbose logging add `MONERO_LOG_LEVEL=1` to environment variables.
|
|
|
|
- To start Feather in stagenet mode, add `--stagenet` to program arguments.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
After the target is configured, `Run -> Run 'feather'` or press Shift + F10 to build Feather.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:58:54 +00:00
|
|
|
### Building without IDE
|
|
|
|
|
|
|
|
To build Feather without an IDE:
|
|
|
|
|
2022-12-21 15:15:22 +00:00
|
|
|
```bash
|
2023-01-23 21:53:06 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
2022-12-21 15:15:22 +00:00
|
|
|
cmake --build . -j $(nproc)
|
|
|
|
```
|
2022-05-26 16:58:54 +00:00
|
|
|
|
2023-01-23 21:53:06 +00:00
|
|
|
On platforms without `execinfo.h` use `cmake -DSTACK_TRACE:BOOL=OFF ..` instead of `cmake ..`
|
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
### CMake
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-26 16:25:03 +00:00
|
|
|
There are some CMake options that you may pass to control how Feather is built:
|
|
|
|
|
|
|
|
- `-DCHECK_UPDATES=ON` - enable checking for updates, only for standalone binaries
|
|
|
|
- `-DDONATE_BEG=OFF` - disable the dreaded donate requests
|
|
|
|
- `-DUSE_DEVICE_TREZOR=OFF` - disable Trezor hardware wallet support
|
|
|
|
- `-DWITH_SCANNER=ON` - enable the webcam QR code scanner
|
|
|
|
- `-DTOR_DIR=/path/to/tor/` - embed a Tor binary in Feather, argument should be a directory containing the binary
|
2023-11-30 14:01:39 +00:00
|
|
|
- `-DWITH_PLUGIN_<NAME>=OFF` - disable a plugin
|