diff --git a/Dockerfile.windows b/Dockerfile.windows index 9c969c25..38d588a9 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -2,7 +2,7 @@ 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" \ @@ -13,17 +13,24 @@ RUN Start-Process -FilePath "$env:TEMP\vs_buildtools.exe" \ "--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"]