diff --git a/Dockerfile b/Dockerfile index 6e11c51..83ffc82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -130,7 +130,11 @@ RUN --mount=type=cache,id=pulse-go-mod,target=/go/pkg/mod \ CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build \ -ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=${VERSION}" \ -trimpath \ - -o pulse-host-agent-windows-arm64.exe ./cmd/pulse-host-agent + -o pulse-host-agent-windows-arm64.exe ./cmd/pulse-host-agent && \ + CGO_ENABLED=0 GOOS=windows GOARCH=386 go build \ + -ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=${VERSION}" \ + -trimpath \ + -o pulse-host-agent-windows-386.exe ./cmd/pulse-host-agent # Build pulse-sensor-proxy for all Linux architectures (for download endpoint) RUN --mount=type=cache,id=pulse-go-mod,target=/go/pkg/mod \ @@ -237,9 +241,11 @@ COPY --from=backend-builder /app/pulse-host-agent-darwin-amd64 /opt/pulse/bin/ COPY --from=backend-builder /app/pulse-host-agent-darwin-arm64 /opt/pulse/bin/ COPY --from=backend-builder /app/pulse-host-agent-windows-amd64.exe /opt/pulse/bin/ COPY --from=backend-builder /app/pulse-host-agent-windows-arm64.exe /opt/pulse/bin/ +COPY --from=backend-builder /app/pulse-host-agent-windows-386.exe /opt/pulse/bin/ # Create symlinks for Windows without .exe extension RUN ln -s pulse-host-agent-windows-amd64.exe /opt/pulse/bin/pulse-host-agent-windows-amd64 && \ - ln -s pulse-host-agent-windows-arm64.exe /opt/pulse/bin/pulse-host-agent-windows-arm64 + ln -s pulse-host-agent-windows-arm64.exe /opt/pulse/bin/pulse-host-agent-windows-arm64 && \ + ln -s pulse-host-agent-windows-386.exe /opt/pulse/bin/pulse-host-agent-windows-386 # Copy multi-arch pulse-sensor-proxy binaries for download endpoint COPY --from=backend-builder /app/pulse-sensor-proxy-linux-amd64 /opt/pulse/bin/ diff --git a/scripts/build-release.sh b/scripts/build-release.sh index abe2eba..7f7bbbf 100755 --- a/scripts/build-release.sh +++ b/scripts/build-release.sh @@ -267,11 +267,19 @@ env GOOS=windows GOARCH=arm64 go build \ -o "$BUILD_DIR/pulse-host-agent-windows-arm64.exe" \ ./cmd/pulse-host-agent +echo "Building host agent for Windows 386..." +env GOOS=windows GOARCH=386 go build \ + -ldflags="-s -w -X github.com/rcourtman/pulse-go-rewrite/internal/hostagent.Version=v${VERSION}" \ + -trimpath \ + -o "$BUILD_DIR/pulse-host-agent-windows-386.exe" \ + ./cmd/pulse-host-agent + # Package standalone host agent binaries tar -czf "$RELEASE_DIR/pulse-host-agent-v${VERSION}-darwin-amd64.tar.gz" -C "$BUILD_DIR" pulse-host-agent-darwin-amd64 tar -czf "$RELEASE_DIR/pulse-host-agent-v${VERSION}-darwin-arm64.tar.gz" -C "$BUILD_DIR" pulse-host-agent-darwin-arm64 zip -j "$RELEASE_DIR/pulse-host-agent-v${VERSION}-windows-amd64.zip" "$BUILD_DIR/pulse-host-agent-windows-amd64.exe" zip -j "$RELEASE_DIR/pulse-host-agent-v${VERSION}-windows-arm64.zip" "$BUILD_DIR/pulse-host-agent-windows-arm64.exe" +zip -j "$RELEASE_DIR/pulse-host-agent-v${VERSION}-windows-386.zip" "$BUILD_DIR/pulse-host-agent-windows-386.exe" # Create universal tarball cd "$universal_dir" @@ -300,6 +308,7 @@ cp "$BUILD_DIR/pulse-host-agent-darwin-amd64" "$RELEASE_DIR/" cp "$BUILD_DIR/pulse-host-agent-darwin-arm64" "$RELEASE_DIR/" cp "$BUILD_DIR/pulse-host-agent-windows-amd64.exe" "$RELEASE_DIR/" cp "$BUILD_DIR/pulse-host-agent-windows-arm64.exe" "$RELEASE_DIR/" +cp "$BUILD_DIR/pulse-host-agent-windows-386.exe" "$RELEASE_DIR/" # Optionally package Helm chart if [ "${SKIP_HELM_PACKAGE:-0}" != "1" ]; then