From e012ab6fdbf2430428c87eef21f1e260c55bc988 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 2 Oct 2024 19:51:25 +1300 Subject: [PATCH] doc/README: add MSYS2 build example for windows --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index e881e1f..2a803f4 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,21 @@ $env:CGO_CXXFLAGS = '-Wno-ignored-attributes -D_Bool=bool' # Clang 18 recommenda 4. Run `go build -ldflags "-s -w -H windowsgui"` +### Windows (MSYS2) + +*Tested with MSYS2 UCRT64* + +For dynamic builds: + +```bash +pacman -S mingw-w64-ucrt-x86_64-{go,gcc,qt5-base,pkg-config} +GOROOT=/ucrt64/lib/go go build -ldflags "-s -w -H windowsgui" +``` + +Static builds are also available by installing the `mingw-w64-ucrt-x86_64-qt5-static` package and building with `--tags=windowsqtstatic`. + +The MSYS2 Qt packages in MSYS2 link against `libicu`, whereas the Fsu0413 Qt packages do not. When using MSYS2, your distribution size including `.dll` files will be larger. + ### Windows (Docker) *Tested with MXE Qt 5.15 / MXE GCC 5 under cross-compilation*