summaryrefslogtreecommitdiff
path: root/contrib/msi/podman.bat
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2019-09-11 14:35:18 -0700
committerJhon Honce <jhonce@redhat.com>2019-09-11 16:15:52 -0700
commitecb958e59851186630e946d7973d91f8d524ea17 (patch)
treebc476050109b042906b08b9bdb909fc26bee061d /contrib/msi/podman.bat
parent79ebb5f254d6f3498500f823cf1b856fed2e6149 (diff)
downloadpodman-ecb958e59851186630e946d7973d91f8d524ea17.tar.gz
podman-ecb958e59851186630e946d7973d91f8d524ea17.tar.bz2
podman-ecb958e59851186630e946d7973d91f8d524ea17.zip
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 <jhonce@redhat.com>
Diffstat (limited to 'contrib/msi/podman.bat')
-rw-r--r--contrib/msi/podman.bat43
1 files changed, 43 insertions, 0 deletions
diff --git a/contrib/msi/podman.bat b/contrib/msi/podman.bat
new file mode 100644
index 000000000..091c1c4c4
--- /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