From 84bfd612764846d8dfc081e6c56a37ad651d681a Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <moritz@ucworks.org>
Date: Sun, 16 Sep 2018 11:30:22 +0200
Subject: [PATCH] Setup VS dev env

---
 windows/Dockerfile  | 3 +++
 windows/VsDevSh.ps1 | 8 ++++++++
 2 files changed, 11 insertions(+)
 create mode 100644 windows/VsDevSh.ps1

diff --git a/windows/Dockerfile b/windows/Dockerfile
index c56a7c5..a4c53bc 100644
--- a/windows/Dockerfile
+++ b/windows/Dockerfile
@@ -62,3 +62,6 @@ RUN python -m pip --no-cache-dir install --no-warn-script-location \
         scipy \
         matplotlib \
         pandas
+
+COPY VsDevSh.ps1 C:/VsDevSh.ps1
+SHELL ["powershell", "-NoProfile", "-ExecutionPolicy Bypass", "-Command", "$ErrorActionPreference = 'Stop';", "C:/VsDevSh.ps1;"]
\ No newline at end of file
diff --git a/windows/VsDevSh.ps1 b/windows/VsDevSh.ps1
new file mode 100644
index 0000000..8a59baf
--- /dev/null
+++ b/windows/VsDevSh.ps1
@@ -0,0 +1,8 @@
+pushd "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/Common7/Tools"
+cmd /c "VsDevCmd.bat&set" |
+foreach {
+  if ($_ -match "=") {
+    $v = $_.split("="); set-item -force -path "ENV:\$($v[0])"  -value "$($v[1])"
+  }
+}
+popd
\ No newline at end of file
-- 
GitLab