Skip to content

Commit

Permalink
doc: Add MSYS2 build notes
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberTailor committed Jan 28, 2024
1 parent e9f0dab commit 4856ee1
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The following are developer notes on how to build Gridcoin on your native platfo
- [OS X Build Notes](build-macos.md)
- [Unix Build Notes](build-unix.md)
- [Windows Build Notes](build-windows.md)
- [Windows (MSYS2) Build Notes](build-msys2.md)
- [FreeBSD Build Notes](build-freebsd.md)
- [OpenBSD Build Notes](build-openbsd.md)

Expand Down
53 changes: 53 additions & 0 deletions doc/build-msys2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Windows (MSYS2) Build Notes
===========================

This guide describes how to build gridcoinresearchd, command-line utilities, and GUI on Windows.

Preparing the Build
-------------------

First, install [MSYS2](https://www.msys2.org/). All commands below are supposed to be run in the **MSYS2 UCRT64** shell.

Run the following to install the base dependencies for building:

```bash
pacman -S make ninja pactoys
pacboy -S boost:p cmake:p curl:p libzip:p openssl:p toolchain:p
pacboy -S qrencode:p qt5-base:p qt5-tools:p # optional for the GUI
```

To Build
--------

### 1. Configuration

To configure with gridcoinresearchd:

```bash
mkdir build && cd build
cmake .. -DBUILD_SHARED_LIBS=OFF
```

To configure with GUI:

```bash
mkdir build && cd build
cmake .. -DENABLE_GUI=ON -DBUILD_SHARED_LIBS=OFF
```

> [!NOTE]
> See also: [CMake Build Options](cmake-options.md)
### 2. Compile

```bash
cmake --build . # use "-j N" here for N parallel jobs
```

### 3. Test

```bash
cmake .. -DENABLE_TESTS=ON
cmake --build .
ctest .
```
3 changes: 2 additions & 1 deletion doc/build-windows.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
WINDOWS BUILD NOTES
====================

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

Expand Down
4 changes: 4 additions & 0 deletions doc/cmake-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ ccmake .

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

* Build a static binary:

`cmake .. -DSTATIC_LIBS=ON -DSTATIC_RUNTIME=ON`

* Build tests and docs, run `lupdate`:

`cmake .. -DENABLE_DOCS=ON -DENABLE_TESTS=ON -DLUPDATE=ON`
Expand Down

0 comments on commit 4856ee1

Please sign in to comment.