From aadd65e16dbfb9e3fcde513e56f02408bd4a77e7 Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <moritz@ucworks.org>
Date: Tue, 18 Sep 2018 20:58:35 +0200
Subject: [PATCH] Add required host DLLs

---
 .gitlab-ci.yml     | 4 ++++
 windows/Dockerfile | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dc1f85a..0b538d8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,6 +22,10 @@ build windows:
   tags: [ windows, shell ]
   before_script:
     - echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" "${CI_REGISTRY}" --password-stdin
+    - Copy-Item 'C:/Windows/System32/opengl32.dll' 'windows/opengl32.dll'
+    - Copy-Item 'C:/Windows/System32/glu32.dll' 'windows/glu32.dll'
+    - Copy-Item 'C:/Windows/System32/ddraw.dll' 'windows/ddraw.dll'
+    - Copy-Item 'C:/Windows/System32/nvcuda.dll' 'windows/nvcuda.dll'
   script:
     - docker build --isolation process --memory 12G --pull -t "${CI_REGISTRY}/$(${CI_PROJECT_PATH}.toLower()):windows" windows
     - docker push "${CI_REGISTRY}/$(${CI_PROJECT_PATH}.toLower()):windows"
diff --git a/windows/Dockerfile b/windows/Dockerfile
index dffcf3a..7dc910a 100644
--- a/windows/Dockerfile
+++ b/windows/Dockerfile
@@ -58,6 +58,10 @@ RUN $vcpkg_dir = 'C:/vcpkg'; \
     ./scripts/bootstrap.ps1; \
     [Environment]::SetEnvironmentVariable('VCPKG_DIR', "\"$vcpkg_dir\"", [EnvironmentVariableTarget]::Machine);
 
+COPY opengl32.dll C:/Windows/System32/opengl32.dll
+COPY glu32.dll C:/Windows/System32/glu32.dll
+COPY ddraw.dll C:/Windows/System32/ddraw.dll
+COPY nvcuda.dll C:/Windows/System32/nvcuda.dll
 RUN cd $Env:VCPKG_DIR; \
     $vcpkg_triplet = 'x64-windows-14.13'; \
     ./vcpkg install \
-- 
GitLab