From ecb958e59851186630e946d7973d91f8d524ea17 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 11 Sep 2019 14:35:18 -0700 Subject: Support building Windows msi file * Update Makefile to build msi * Add podman.wxs to define podman.msi * Version information provided by Makefile * Add podman.bat wrapper for podman-remote-windows.exe to ensure environment * Add wix xml schemas for reference Signed-off-by: Jhon Honce --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 840bfced7..b4f8020f2 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ GINKGOTIMEOUT ?= -timeout=90m RELEASE_VERSION ?= $(shell hack/get_release_info.sh VERSION) RELEASE_NUMBER ?= $(shell hack/get_release_info.sh NUMBER) +RELEASE_NUMERIC = $(shell echo $(RELEASE_NUMBER) |sed -e 's/^v\(.*\)/\1/') RELEASE_DIST ?= $(shell hack/get_release_info.sh DIST) RELEASE_DIST_VER ?= $(shell hack/get_release_info.sh DIST_VER) RELEASE_ARCH ?= $(shell hack/get_release_info.sh ARCH) @@ -164,6 +165,10 @@ podman: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman podman-remote: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman on remote environment $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS) remoteclient" -o bin/$@ $(PROJECT)/cmd/podman +.PHONY: podman.msi +podman.msi: podman-remote-windows ## Will always rebuild exe as there is no podman-remote-windows.exe target to verify timestamp + wixl -D VERSION=$(RELEASE_NUMERIC) -o bin/podman-$(RELEASE_NUMBER).msi contrib/msi/podman.wxs + podman-remote-%: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build podman for a specific GOOS $(eval BINSFX := $(shell test "$*" != "windows" || echo ".exe")) CGO_ENABLED=0 GOOS=$* $(GO_BUILD) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "remoteclient containers_image_openpgp exclude_graphdriver_devicemapper" -o bin/$@$(BINSFX) $(PROJECT)/cmd/podman -- cgit v1.2.3-54-g00ecf