diff --git a/doc/README.md b/doc/README.md index eaa6ad72bd..f6eab9e075 100644 --- a/doc/README.md +++ b/doc/README.md @@ -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) diff --git a/doc/build-msys2.md b/doc/build-msys2.md new file mode 100644 index 0000000000..d4c885a233 --- /dev/null +++ b/doc/build-msys2.md @@ -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 . +``` diff --git a/doc/build-windows.md b/doc/build-windows.md index 5f58bf1603..06e13b6943 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -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. diff --git a/doc/cmake-options.md b/doc/cmake-options.md index 95cd8c4163..b38031aad7 100644 --- a/doc/cmake-options.md +++ b/doc/cmake-options.md @@ -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`