Add support for Windows 32-bit (windows-386) architecture (related to #674)
Adds build support for 32-bit Windows (windows-386) for pulse-host-agent. Changes: - Add windows-386 build to Dockerfile host-agent build section - Add windows-386 binary copy and symlink to Dockerfile - Add windows-386 build to build-release.sh - Add windows-386 zip package to release artifacts - Include windows-386 binary in standalone binary copies This enables pulse-host-agent to run on 32-bit Windows systems, which are still relevant in legacy/industrial monitoring environments through late 2025.
This commit is contained in:
parent
188944019a
commit
23ce2c6d11
2 changed files with 17 additions and 2 deletions
10
Dockerfile
10
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/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue