2022-05-01 23:19:12 +00:00
|
|
|
# Building WOWlet
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
Building for Linux and Windows via Docker is done in 3 steps:
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
1. Cloning this repository (+submodules)
|
|
|
|
2. Creating a base Docker image
|
|
|
|
3. Using the base image to compile a build
|
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
**important:** you only have to do step 2 (base docker image) once.
|
|
|
|
|
|
|
|
For Mac OS, scroll down.
|
|
|
|
|
|
|
|
# Linux
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
For more information, check the Dockerfile: `Dockerfile`.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
### 1. Clone
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2021-03-11 20:50:29 +00:00
|
|
|
git clone --branch master --recursive https://git.wownero.com/wowlet/wowlet.git
|
|
|
|
cd wowlet
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
Replace `master` with the desired version tag (e.g. `v3.1.0`) to build the release binary.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
### 2. Base image
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2021-05-15 23:05:05 +00:00
|
|
|
docker build --tag wowlet:linux --build-arg THREADS=6 .
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
Building the base image takes a while. **You only need to build the base image once.**
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
### 3. Build
|
2021-01-15 21:04:53 +00:00
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
```bash
|
2021-05-15 23:05:05 +00:00
|
|
|
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:linux sh -c 'make release-static -j6'
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2020-12-10 17:13:18 +00:00
|
|
|
If you're re-running a build make sure to `rm -rf build/` first.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-03-11 20:50:29 +00:00
|
|
|
The resulting binary can be found in `build/bin/wowlet`.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
# Windows
|
2021-01-15 21:04:53 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
### 1. Clone
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2021-03-11 20:50:29 +00:00
|
|
|
git clone --branch master --recursive https://git.wownero.com/wowlet/wowlet.git
|
|
|
|
cd wowlet
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
Replace `master` with the desired version tag (e.g. `v3.1.0`) to build the release binary.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
### 2. Base image
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2021-05-15 23:05:05 +00:00
|
|
|
docker build -f Dockerfile.windows --tag wowlet:win --build-arg THREADS=6 .
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
Building the base image takes a while. **You only need to build the base image once.**
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2022-05-01 23:19:12 +00:00
|
|
|
### 3. Build
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
```bash
|
2021-05-15 23:05:05 +00:00
|
|
|
docker run --rm -it -v $PWD:/wowlet -w /wowlet wowlet:win sh -c 'make windows root=/depends target=x86_64-w64-mingw32 tag=win-x64 -j6'
|
2020-10-07 10:36:04 +00:00
|
|
|
```
|
|
|
|
|
2021-01-10 23:40:17 +00:00
|
|
|
If you're re-running a build make sure to `rm -rf build/` first.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-03-11 20:50:29 +00:00
|
|
|
The resulting binary can be found in `build/x86_64-w64-mingw32/release/bin/wowlet.exe`.
|