diff --git a/Makefile b/Makefile index 840bfced7f2c..b4f8020f2bdc 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 diff --git a/contrib/msi/podman.bat b/contrib/msi/podman.bat new file mode 100644 index 000000000000..091c1c4c472a --- /dev/null +++ b/contrib/msi/podman.bat @@ -0,0 +1,43 @@ +@echo off +setlocal enableextensions + +title Podman + +:: If remote-host is given on command line -- use it +setlocal enabledelayedexpansion +for %%a in (%*) do ( + echo "%%a" |find "--remote-host" >NUL + if !errorlevel! == 0 ( + goto run_podman + ) +) + +:: If PODMAN_VARLINK_BRIDGE is set -- use it +if defined PODMAN_VARLINK_BRIDGE ( + goto run_podman +) + +:: If the configuration file exists -- use it +set config_home=%USERPROFILE%\AppData\podman +set config_file=%config_home%\podman-remote.conf +if exist "%config_file%" ( + goto run_podman +) + +:: Get connection information from user and build configuration file +md "%config_home%" +set /p host="Please enter the remote hosts name or IP address: " +set /p user="Please enter the remote user name: " +( + echo [connections] + echo [connections."%host%"] + echo destination = "%host%" + echo username = "%user%" + echo default = true +) >"%config_file%" + +:run_podman +endlocal +podman-remote-windows.exe %* + +:End diff --git a/contrib/msi/podman.wxs b/contrib/msi/podman.wxs new file mode 100644 index 000000000000..165bb42b678e --- /dev/null +++ b/contrib/msi/podman.wxs @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NOT Installed + + + +