Skip to content

Commit 4856ee1

Browse files
committed
doc: Add MSYS2 build notes
1 parent e9f0dab commit 4856ee1

File tree

4 files changed

+60
-1
lines changed

4 files changed

+60
-1
lines changed

doc/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ The following are developer notes on how to build Gridcoin on your native platfo
2727
- [OS X Build Notes](build-macos.md)
2828
- [Unix Build Notes](build-unix.md)
2929
- [Windows Build Notes](build-windows.md)
30+
- [Windows (MSYS2) Build Notes](build-msys2.md)
3031
- [FreeBSD Build Notes](build-freebsd.md)
3132
- [OpenBSD Build Notes](build-openbsd.md)
3233

doc/build-msys2.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Windows (MSYS2) Build Notes
2+
===========================
3+
4+
This guide describes how to build gridcoinresearchd, command-line utilities, and GUI on Windows.
5+
6+
Preparing the Build
7+
-------------------
8+
9+
First, install [MSYS2](https://www.msys2.org/). All commands below are supposed to be run in the **MSYS2 UCRT64** shell.
10+
11+
Run the following to install the base dependencies for building:
12+
13+
```bash
14+
pacman -S make ninja pactoys
15+
pacboy -S boost:p cmake:p curl:p libzip:p openssl:p toolchain:p
16+
pacboy -S qrencode:p qt5-base:p qt5-tools:p # optional for the GUI
17+
```
18+
19+
To Build
20+
--------
21+
22+
### 1. Configuration
23+
24+
To configure with gridcoinresearchd:
25+
26+
```bash
27+
mkdir build && cd build
28+
cmake .. -DBUILD_SHARED_LIBS=OFF
29+
```
30+
31+
To configure with GUI:
32+
33+
```bash
34+
mkdir build && cd build
35+
cmake .. -DENABLE_GUI=ON -DBUILD_SHARED_LIBS=OFF
36+
```
37+
38+
> [!NOTE]
39+
> See also: [CMake Build Options](cmake-options.md)
40+
41+
### 2. Compile
42+
43+
```bash
44+
cmake --build . # use "-j N" here for N parallel jobs
45+
```
46+
47+
### 3. Test
48+
49+
```bash
50+
cmake .. -DENABLE_TESTS=ON
51+
cmake --build .
52+
ctest .
53+
```

doc/build-windows.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
WINDOWS BUILD NOTES
22
====================
33

4-
> This document is outdated.
4+
> [!NOTE]
5+
> See also: [Windows (MSYS2) Build Notes](build-msys2.md)
56
67
Below are some notes on how to build Gridcoin for Windows.
78

doc/cmake-options.md

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ ccmake .
2323

2424
`cmake .. -DENABLE_PIE=ON -DUSE_ASM=OFF`
2525

26+
* Build a static binary:
27+
28+
`cmake .. -DSTATIC_LIBS=ON -DSTATIC_RUNTIME=ON`
29+
2630
* Build tests and docs, run `lupdate`:
2731

2832
`cmake .. -DENABLE_DOCS=ON -DENABLE_TESTS=ON -DLUPDATE=ON`

0 commit comments

Comments
 (0)