Skip to content
Snippets Groups Projects
Commit 10920f1c authored by calrama's avatar calrama
Browse files

[windows] Comprehensive changes

- Qt5: Compile from source, upgrade to version 5.15.2
- ninja: upgrade to version 1.10.2
- cmake: upgrade to version 3.21.2
- llvm: add version 12.0.1, needed for vcpkg-tool
- vcpkg-tool: add/compile version 2021-08-12
- vcpkg: rebase on version 2021.05.12
- xtensor: dropped
- enabled long paths, needed for cleaning up Qt5 build tree
parent a089c879
Branches
No related tags found
No related merge requests found
Pipeline #40328 passed
**/*.dll
......@@ -5,16 +5,21 @@ LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
RUN mkdir $PSHome/profile.d | out-null
ADD powershell/Profile.ps1 /Windows/System32/WindowsPowerShell/v1.0/Profile.ps1
ADD powershell/00-Must-Run.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/00-Must-Run.ps1
RUN Set-ItemProperty -Path 'HKLM:/SYSTEM/CurrentControlSet/Control/FileSystem' -Name LongPathsEnabled -Type DWord -Value 1
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
$env:chocolateyUseWindowsCompression = 'true'; \
Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
Must-Run choco install -y dotnetfx --version 4.7.2.20180712; \
Must-Run choco install -y cmake --version 3.19.4 --installargs "ADD_CMAKE_TO_PATH=System"; \
Must-Run choco install -y kitware-ninja --version 1.8.2.8127911; \
Must-Run choco install -y cmake --version 3.21.2 --installargs "ADD_CMAKE_TO_PATH=System"; \
Must-Run choco install -y ninja --version 1.10.2; \
Must-Run choco install -y llvm --version 12.0.1; \
Must-Run choco install -y \
git \
curl \
......@@ -23,40 +28,37 @@ RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tl
$env:PATH = "\"$([Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::User));$([Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine))\""; \
Must-Run choco install -y visualstudio2017buildtools; \
Must-Run choco install -y visualstudio2017-workload-vctools; \
Start-Process "\"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe\"" -NoNewWindow -Wait -ArgumentList 'modify --installPath \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools\" --quiet --norestart --remove Microsoft.VisualStudio.Component.VC.CMake.Project --add Microsoft.VisualStudio.Component.VC.Tools.14.16 --add Microsoft.VisualStudio.Component.VC.ATL'
Start-Process "\"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe\"" -NoNewWindow -Wait -ArgumentList 'modify --installPath \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools\" --quiet --norestart --remove Microsoft.VisualStudio.Component.VC.CMake.Project --add Microsoft.VisualStudio.Component.VC.Tools.14.16 --add Microsoft.VisualStudio.Component.VC.ATL --add Microsoft.VisualStudio.Component.VC.ATLMFC'
ADD powershell/10-VSDevEnv.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/10-VSDevEnv.ps1
ADD powershell/20-MSVC-15.9.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/20-MSVC-15.9.ps1
COPY qtifwsilent.qs C:/qtifwsilent.qs
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
(New-Object Net.WebClient).DownloadFile('https://download.qt.io/official_releases/qt/5.12/5.12.10/qt-opensource-windows-x86-5.12.10.exe', 'C:/qt.exe'); \
$env:QT_INSTALL_DIR = 'C:/ProgramData/Qt'; \
Add-Content "\"/Windows/System32/drivers/etc/hosts\"" "\"`r`n127.0.0.1 iapi.qt.io`r`n::1 iapi.qt.io\""; \
Start-Process C:/qt.exe -NoNewWindow -Wait -ArgumentList '--verbose --script C:/qtifwsilent.qs'; \
Remove-Item -Force C:/qtifwsilent.qs; \
Remove-Item -Force C:/qt.exe; \
[Environment]::SetEnvironmentVariable('Qt5_DIR', 'C:/ProgramData/Qt/5.12.10/msvc2017_64', [EnvironmentVariableTarget]::Machine)
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
(New-Object Net.WebClient).DownloadFile('https://www.baslerweb.com/fp-1551786641/media/downloads/software/pylon_software/Basler_pylon_5.2.0.13457.exe', 'C:/Basler_pylon_5.2.0.13457.exe'); \
Start-Process C:/Basler_pylon_5.2.0.13457.exe -NoNewWindow -Wait -ArgumentList '/quiet /install=SDKs /targetpath=C:/ProgramData/Pylon5'; \
Remove-Item -Force C:/Basler_pylon_5.2.0.13457.exe; \
[Environment]::SetEnvironmentVariable('Pylon5_DIR', 'C:/ProgramData/Pylon5/Development', [EnvironmentVariableTarget]::Machine);
RUN $vcpkg_tool__dir = 'C:/ProgramData/vcpkg-tool'; \
Must-Run git clone -b 2021-08-12 --single-branch https://git.imp.fu-berlin.de/bioroboticslab/auto/vcpkg-tool.git $vcpkg_tool__dir; \
cd $vcpkg_tool__dir; \
cmake -S '.' -B build -DCMAKE_C_COMPILER='/Program Files/LLVM/bin/clang.exe' -DCMAKE_CXX_COMPILER='/Program Files/LLVM/bin/clang++.exe' -G Ninja -DCMAKE_BUILD_TYPE=Release; \
ninja -C build; \
[Environment]::SetEnvironmentVariable('VCPKG_DISABLE_METRICS', '1', [EnvironmentVariableTarget]::Machine)
RUN $vcpkg_dir = 'C:/ProgramData/vcpkg'; \
Must-Run git clone -b bioroboticslab --single-branch https://git.imp.fu-berlin.de/bioroboticslab/auto/vcpkg.git $vcpkg_dir; \
cd $vcpkg_dir; \
Must-Run git checkout 722e189e492fc1b769d2ebb1e9c65005bd2d699c; \
./scripts/bootstrap.ps1 -disableMetrics; \
$vcpkg_target_triplet = 'x64-windows-14.16'; \
Must-Run git checkout f6fb58f044b59f1bf87e7f4c4f244a0b3920ca1e; \
cp 'C:/ProgramData/vcpkg-tool/build/vcpkg.exe' .; \
$vcpkg_default_triplet = 'x64-windows-14.16'; \
[Environment]::SetEnvironmentVariable('VCPKG_DIR', "\"$vcpkg_dir\"", [EnvironmentVariableTarget]::Machine); \
[Environment]::SetEnvironmentVariable('VCPKG_TARGET_TRIPLET', "\"$vcpkg_target_triplet\"", [EnvironmentVariableTarget]::Machine); \
[Environment]::SetEnvironmentVariable('VCPKG_DEFAULT_TRIPLET', "\"$vcpkg_default_triplet\"", [EnvironmentVariableTarget]::Machine); \
[Environment]::SetEnvironmentVariable('CMAKE_TOOLCHAIN_FILE', "\"$vcpkg_dir/scripts/buildsystems/vcpkg.cmake\"", [EnvironmentVariableTarget]::Machine); \
[Environment]::SetEnvironmentVariable('VCPKG_INSTALL_DIR', "\"$vcpkg_dir/installed/$vcpkg_target_triplet\"", [EnvironmentVariableTarget]::Machine);
[Environment]::SetEnvironmentVariable('VCPKG_INSTALL_DIR', "\"$vcpkg_dir/installed/$vcpkg_default_triplet\"", [EnvironmentVariableTarget]::Machine);
ADD powershell/30-Vcpkg-CMake.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/30-Vcpkg-CMake.ps1
RUN cd $env:VCPKG_DIR; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
libjpeg-turbo \
libwebp \
tiff \
......@@ -64,8 +66,7 @@ RUN cd $env:VCPKG_DIR; \
"\"hdf5[cpp]\"" \
opengl \
protobuf \
"\"xtensor[xsimd,tbb]\"" \
; \
"\"qt5[core, 3d, webchannel, websockets, extras, xmlpatterns, sensors, serialport, speech, svg, tools, virtualkeyboard, networkauth, quickcontrols, quickcontrols2, script, scxml, activeqt, charts, datavis3d, declarative, gamepad, graphicaleffects, imageformats, location, multimedia, mqtt, webglplugin, webview, serialbus, translations, remoteobjects, connectivity]\""; \
Remove-Item -Force -Recurse ./downloads; \
Remove-Item -Force -Recurse ./buildtrees; \
Remove-Item -Force -Recurse ./packages;
......@@ -7,7 +7,7 @@ function Vcpkg-CMake {
if ($args[0] -eq "--build") {
Must-Run "/Program Files/CMake/bin/cmake.exe" $args
} else {
Must-Run "/Program Files/CMake/bin/cmake.exe" '-DCMAKE_TOOLCHAIN_FILE=${venv:CMAKE_TOOLCHAIN_FILE}' "-DVCPKG_TARGET_TRIPLET=${env:VCPKG_TARGET_TRIPLET}" $args
Must-Run "/Program Files/CMake/bin/cmake.exe" '-DCMAKE_TOOLCHAIN_FILE=${venv:CMAKE_TOOLCHAIN_FILE}' "-DVCPKG_TARGET_TRIPLET=${env:VCPKG_DEFAULT_TRIPLET}" $args
}
}
......
......@@ -6,16 +6,16 @@ LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
(New-Object Net.WebClient).DownloadFile('https://developer.download.nvidia.com/compute/cuda/10.1/Prod/network_installers/cuda_10.1.243_win10_network.exe', 'C:/cuda_10.1.243_win10_network.exe'); \
(New-Object Net.WebClient).DownloadFile('https://developer.download.nvidia.com/compute/redist/cudnn/v7.6.1/cudnn-10.1-windows10-x64-v7.6.1.34.zip', 'C:/cudnn-10.1-windows10-x64-v7.6.1.34.zip'); \
(New-Object Net.WebClient).DownloadFile('https://developer.download.nvidia.com/compute/redist/cudnn/v7.6.5/cudnn-10.1-windows10-x64-v7.6.5.32.zip', 'C:/cudnn-10.1-windows10-x64-v7.6.5.32.zip'); \
Start-Process C:/cuda_10.1.243_win10_network.exe -NoNewWindow -Wait -ArgumentList '-s nvcc_10.1 cublas_10.1 cublas_dev_10.1 cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 cusparse_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1'; \
Remove-Item -Force C:/cuda_10.1.243_win10_network.exe; \
7z x C:/cudnn-10.1-windows10-x64-v7.6.1.34.zip; \
7z x C:/cudnn-10.1-windows10-x64-v7.6.5.32.zip; \
Copy-Item -Force -Recurse "./cuda/*" "$([Environment]::GetEnvironmentVariable('CUDA_PATH', [EnvironmentVariableTarget]::Machine))"; \
Remove-Item -Force -Recurse "./cuda"; \
Remove-Item -Force C:/cudnn-10.1-windows10-x64-v7.6.1.34.zip
Remove-Item -Force C:/cudnn-10.1-windows10-x64-v7.6.5.32.zip
RUN cd $env:VCPKG_DIR; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
"\"ffmpeg[nvcodec,avresample]\"" \
"\"opencv4[cuda,ffmpeg,opengl,contrib,ipp,dnn]\""; \
Remove-Item -Force -Recurse ./downloads; \
......@@ -27,14 +27,14 @@ 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; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
"\"mxnet[cpp,opencv,cuda,cudnn]\""; \
Remove-Item -Force -Recurse ./downloads; \
Remove-Item -Force -Recurse ./buildtrees; \
Remove-Item -Force -Recurse ./packages;
RUN cd $env:VCPKG_DIR; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
boost-program-options \
boost-property-tree \
boost-circular-buffer \
......
......@@ -5,7 +5,7 @@ LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
RUN cd $env:VCPKG_DIR; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
"\"ffmpeg[avresample]\"" \
"\"opencv4[ffmpeg,opengl,contrib,ipp,dnn]\""; \
Remove-Item -Force -Recurse ./downloads; \
......@@ -16,14 +16,14 @@ COPY opengl32.dll C:/Windows/System32/opengl32.dll
COPY glu32.dll C:/Windows/System32/glu32.dll
COPY ddraw.dll C:/Windows/System32/ddraw.dll
RUN cd $env:VCPKG_DIR; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
"\"mxnet[cpp,opencv]\""; \
Remove-Item -Force -Recurse ./downloads; \
Remove-Item -Force -Recurse ./buildtrees; \
Remove-Item -Force -Recurse ./packages;
RUN cd $env:VCPKG_DIR; \
Must-Run ./vcpkg install --triplet "$env:VCPKG_TARGET_TRIPLET" \
Must-Run ./vcpkg install \
boost-program-options \
boost-property-tree \
boost-circular-buffer \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment