diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index fe6c588..33808ae 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -81,6 +81,14 @@ jobs: with: fetch-depth: 0 + # Set up MSYS2 (needed for static linking of MinGW runtimes) + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + install: mingw-w64-x86_64-gcc + update: false + - name: Install Wails run: go install github.com/wailsapp/wails/v2/cmd/wails@latest @@ -91,6 +99,8 @@ jobs: run: wails build -platform windows/amd64 -ldflags="-extldflags=-static" env: CGO_ENABLED: 1 + CC: gcc + CGO_LDFLAGS: '-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic' - name: Upload Windows GUI artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df72752..4ba2ac5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -392,6 +392,14 @@ jobs: with: fetch-depth: 0 + # Set up MSYS2 on Windows (needed for static linking of MinGW runtimes) + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + install: mingw-w64-x86_64-gcc + update: false + # Install Wails (version from wails.json) - name: Install Wails run: go install github.com/wailsapp/wails/v2/cmd/wails@latest @@ -405,6 +413,8 @@ jobs: run: wails build -platform windows/amd64 -ldflags="-extldflags=-static" env: CGO_ENABLED: 1 + CC: gcc + CGO_LDFLAGS: '-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic' # Upload Windows artifact - name: Upload Windows GUI artifact