From a1910c7facbc9b9b20d85128d242926660c1fbc0 Mon Sep 17 00:00:00 2001 From: such-gitea Date: Mon, 5 Jan 2026 07:26:19 -0800 Subject: [PATCH] Fix windows build --- .gitea/workflows/build.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 77ce9dc..d21d04a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -100,7 +100,7 @@ jobs: files: wownero-lws-linux.zip build-windows: - runs-on: windows-latest + runs-on: windows-latest # Maps to 'linux-beast' steps: - name: Manual Checkout (LAN) env: @@ -111,13 +111,18 @@ jobs: git config --global url."https://github.com/".insteadOf "git@github.com:" git submodule update --init --recursive + - name: Build Windows Dependencies + run: | + # This magic step compiles OpenSSL, Boost, ZMQ, etc. for Windows + cd contrib/depends + make HOST=x86_64-w64-mingw32 -j$(nproc) + - name: Build Windows (Cross-Compile) run: | mkdir build && cd build - cmake .. -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ - -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ - -DCMAKE_BUILD_TYPE=Release + # We use the toolchain file generated by the previous step + # This tells CMake exactly where the Windows OpenSSL/Boost libraries are + cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake -DCMAKE_BUILD_TYPE=Release make -j$(nproc) - name: Package Windows