From 912e870329b8b5fe02eb36bdd942c808450e2e35 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Fri, 26 Apr 2024 21:03:49 +0200 Subject: [PATCH] fix --- Dockerfile.windows | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Dockerfile.windows b/Dockerfile.windows index 9c969c25..a561ed2d 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -2,28 +2,37 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference='SilentlyContinue'; $VerbosePreference = 'Continue';"] -RUN $env:starter_path = Get-Location +# RUN $env:starter_path = Get-Location # download and install vs build tools needed by vcpkg RUN Invoke-WebRequest "https://aka.ms/vs/17/release/vs_buildtools.exe" \ -OutFile "$env:TEMP\vs_buildtools.exe" -UseBasicParsing RUN Start-Process -FilePath "$env:TEMP\vs_buildtools.exe" \ -ArgumentList "--wait", "--nocache", "--norestart", "--noUpdateInstaller", \ - "--add", "Microsoft.VisualStudio.Workload.VCTools", \ + "--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", \ + "--add", "Microsoft.Component.MSBuild", \ + "--add", "Microsoft.VisualStudio.Component.Windows11SDK.22621", \ "--includeRecommended" \ -Wait +# install git from choco +RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \ + choco install git -y --no-progress + # install vcpkg # RUN $env:VCPKG_INSTALL_DIR="c:\\vcpkg" # RUN $env:VCPKG_DEFAULT_TRIPLET="x64-windows" -RUN git clone https://github.com/microsoft/vcpkg c:\vcpkg && \ - cd c:\vcpkg && \ - bootstrap-vcpkg.bat -disableMetrics && \ - .\vcpkg install cgal boost-program-options boost-timer boost-test --triplet x64-windows +RUN git clone https://github.com/microsoft/vcpkg c:\vcpkg; \ + Start-Process -FilePath "c:\vcpkg\bootstrap-vcpkg.bat -ArgumentList "-disableMetrics" -Wait; \ + c:\vcpkg\vcpkg install cgal boost-program-options boost-timer boost-test --triplet x64-windows # build sfcgal -RUN cd $env:starter_path && \ - cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake" +# RUN cd $env:starter_path; \ +# cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake" +RUN cmake -S . -B build \ + -DCMAKE_BUILD_TYPE=Release \ + -DSFCGAL_BUILD_TESTS=OFF \ + -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake" # Restore default shell for Windows containers. SHELL ["cmd.exe", "/s", "/c"]