diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index 7aad0fe..9881d51 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -88,6 +88,7 @@ jobs: msystem: MINGW64 install: mingw-w64-x86_64-gcc update: false + path-type: inherit - name: Install Wails run: go install github.com/wailsapp/wails/v2/cmd/wails@latest @@ -96,11 +97,12 @@ jobs: run: npm install -g bun - name: Build Windows GUI - run: wails build -platform windows/amd64 -ldflags="-extldflags=-static" + shell: msys2 {0} + run: wails build -platform windows/amd64 -ldflags="-linkmode external -extldflags=-static" env: CGO_ENABLED: 1 CC: gcc - CGO_LDFLAGS: '-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic' + CGO_LDFLAGS: '-static-libgcc -static-libstdc++' - name: Verify no MinGW runtime DLL dependencies uses: ./.github/actions/verify-windows-gui-dlls diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffb1714..985a203 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -399,6 +399,7 @@ jobs: msystem: MINGW64 install: mingw-w64-x86_64-gcc update: false + path-type: inherit # Install Wails (version from wails.json) - name: Install Wails @@ -410,11 +411,12 @@ jobs: # Build Windows GUI using Wails config - name: Build Windows GUI - run: wails build -platform windows/amd64 -ldflags="-extldflags=-static" + shell: msys2 {0} + run: wails build -platform windows/amd64 -ldflags="-linkmode external -extldflags=-static" env: CGO_ENABLED: 1 CC: gcc - CGO_LDFLAGS: '-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic' + CGO_LDFLAGS: '-static-libgcc -static-libstdc++' # Verify the built exe doesn't dynamically depend on MinGW runtime DLLs - name: Verify no MinGW runtime DLL dependencies