diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 885bb3f..5180c51 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,5 +18,5 @@ build windows x64: - docker:dind script: - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin - - docker build --ulimit nofile=5000:5000 -f Dockerfile-windows -t ${CI_REGISTRY_IMAGE}:windows-x64 . + - docker build -f Dockerfile-windows -t ${CI_REGISTRY_IMAGE}:windows-x64 . - docker push ${CI_REGISTRY_IMAGE}:windows-x64 diff --git a/Dockerfile-windows b/Dockerfile-windows index 25179f6..3f3f72a 100644 --- a/Dockerfile-windows +++ b/Dockerfile-windows @@ -1,16 +1,18 @@ FROM debian:trixie COPY windows.sh /tmp/setup.sh COPY windows.reg /tmp/setup.reg +COPY windows-libs.7z /tmp/windows-libs.7z RUN apt-get update --yes \ - && apt-get -y install wget unzip xvfb \ + && apt-get -y install wget unzip p7zip xvfb \ && dpkg --add-architecture i386 \ && mkdir -pm755 /etc/apt/keyrings \ && wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key \ && wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/trixie/winehq-trixie.sources \ && apt-get update \ && apt-get -y install winehq-devel \ - && apt-get clean \ && export WINEDEBUG=-all \ && wine winecfg \ && /tmp/setup.sh \ - && wineserver -k + && rm /tmp/setup.sh \ + && apt-get -y autopurge wget unzip p7zip xvfb \ + && apt-get clean diff --git a/test.bat b/test.bat deleted file mode 100644 index 58df926..0000000 --- a/test.bat +++ /dev/null @@ -1 +0,0 @@ -set 1=hello diff --git a/windows.sh b/windows.sh index 2773b22..c05bc12 100755 --- a/windows.sh +++ b/windows.sh @@ -12,10 +12,6 @@ function min { # Leave wineserver running in the background setsid wineserver -p -f & -# Increase open file limit -echo " --- Trying to increase max. open file limit" -ulimit -n 5120 || (exit 0) - # Install tools echo " --- Installing tools" cd ~/.wine/drive_c/Program\ Files/ @@ -53,6 +49,7 @@ mv llvm-mingw-*-x86_64 llvm # Install registry file echo " -- Updating PATH environment variable" wine regedit 'Z:\tmp\setup.reg' +rm /tmp/setup.reg # Print versions echo " -- Tools installed:" @@ -61,47 +58,12 @@ echo -n " - " ; wine ccache.exe --version | head -1 echo -n " - Ninja " ; wine ninja.exe --version echo -n " - " ; wine clang.exe --version | head -1 -# Download and compile out-of-tree dependencies -echo " --- Installing out-of-tree dependencies" +# Unpack out-of-tree dependencies +echo " --- Unpacking out-of-tree dependencies" cd ~/.wine/drive_c/ +7z x /tmp/windows-libs.7z > /dev/null +rm /tmp/windows-libs.7z -# Download and compile Boost -echo " -- Downloading Boost" -wget -q https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.zip -unzip -q *.zip -rm *.zip -mv boost_* boost-src -cd boost-src/ -echo " -- Bootstrapping Boost (no output due to Wine workarounds)" -xvfb-run wineconsole ./bootstrap.bat clang &> /dev/null -echo " -- Compiling boost" -wine ./b2.exe -j1 --with-context install # Limiting to 2 to avoid "Too many open files" -echo " -- Deleting boost sources" -cd ../ -rm -rf boost-src - -# Download and compile fmt -echo " -- Downloading fmt" -wget -q -Ofmt.zip https://github.com/fmtlib/fmt/archive/refs/tags/10.2.1.zip -unzip -q *.zip -rm *.zip -mv fmt-* fmt-src -cd fmt-src/ -echo " -- Configuring fmt" -mkdir build -cd build/ -wine cmake.exe .. -G Ninja -echo " -- Compiling fmt" -wine ninja.exe install -echo " -- Deleting fmt sources" -cd ../../ -rm -rf fmt-src - -# Download LZ4 -echo " -- Downloading LZ4" -wget -q https://github.com/lz4/lz4/releases/download/v1.9.4/lz4_win64_v1_9_4.zip -mkdir lz4 -pushd lz4/ > /dev/null -unzip -q ../lz4_win64_*.zip -popd > /dev/null -rm *.zip +# Finally +echo " --- Done! Finally killing wineserver" +wineserver -k || exit 0