|
| 1 | +FROM mcr.microsoft.com/windows/servercore:ltsc2019 |
| 2 | + |
| 3 | +# Install Chocolatey |
| 4 | +RUN powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command \ |
| 5 | + "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" \ |
| 6 | + && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" |
| 7 | + |
| 8 | +# Install Chocolatey Packages |
| 9 | +# Note: Funq doesn't work with Python3 or x64, thus we need Python2 x86. |
| 10 | +ENV PYTHONIOENCODING "UTF-8" |
| 11 | +RUN choco install -y 7zip ccache vcredist2017 \ |
| 12 | + && choco install -y git --params "/GitAndUnixToolsOnPath /NoAutoCrlf" \ |
| 13 | + && choco install --forcex86 -y python2 |
| 14 | + |
| 15 | +# Install Python Packages |
| 16 | +RUN pip install future "flake8==3.7.7" |
| 17 | + |
| 18 | +# Install MinGW |
| 19 | +ARG MINGW_URL="https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_mingw/qt.tools.win32_mingw810/8.1.0-1-202004170606i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z" |
| 20 | +RUN powershell -Command Invoke-WebRequest $env:MINGW_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 21 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 22 | + && setx PATH "%PATH%;C:\Qt\Tools\mingw810_32\bin" \ |
| 23 | + && del C:\tmp.7z |
| 24 | + |
| 25 | +# Install OpenSSL |
| 26 | +ARG OPENSSL_URL="http://slproweb.com/download/Win32OpenSSL_Light-1_1_1g.exe" |
| 27 | +RUN powershell -Command Invoke-WebRequest $env:OPENSSL_URL -OutFile 'C:/tmp.exe' -UseBasicParsing ; \ |
| 28 | + && C:/tmp.exe /silent /verysilent /suppressmsgboxes /sp- /dir=C:/OpenSSL-Win32 \ |
| 29 | + && del C:\tmp.exe |
| 30 | + |
| 31 | +# Install CMake |
| 32 | +ARG CMAKE_URL="https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_cmake/qt.tools.cmake.win64/3.19.2-202101071154windows64_x64_cmake_tools.7z" |
| 33 | +RUN powershell -Command Invoke-WebRequest $env:CMAKE_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 34 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 35 | + && setx PATH "%PATH%;C:\Qt\Tools\CMake_64\bin" \ |
| 36 | + && del C:\tmp.7z |
| 37 | + |
| 38 | +# Install Qt whatever DLLs |
| 39 | +ARG QT_VERSION="5.15.2" |
| 40 | +ARG QT_URL="https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5152/qt.qt5.5152.win32_mingw81/5.15.2-0-202011130602" |
| 41 | +ARG QT_DLLS_URL="${QT_URL}i686-8.1.0-release-posix-dwarf-rt_v6-rev0-runtime.7z" |
| 42 | +RUN powershell -Command Invoke-WebRequest $env:QT_DLLS_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 43 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 44 | + && del C:\tmp.7z |
| 45 | + |
| 46 | +# Install Qt Tools |
| 47 | +ARG QT_TOOLS_URL="${QT_URL}qttools-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z" |
| 48 | +RUN powershell -Command Invoke-WebRequest $env:QT_TOOLS_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 49 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 50 | + && setx PATH "%PATH%;C:\Qt\%QT_VERSION%\mingw81_32\bin" \ |
| 51 | + && del C:\tmp.7z |
| 52 | + |
| 53 | +# Install Qt Base |
| 54 | +ARG QT_BASE_URL="${QT_URL}qtbase-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z" |
| 55 | +ARG QT_PRI="C:\\Qt\\$QT_VERSION\\mingw81_32\\mkspecs\\qconfig.pri" |
| 56 | +RUN powershell -Command Invoke-WebRequest $env:QT_BASE_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 57 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 58 | + && del C:\tmp.7z \ |
| 59 | + && powershell -Command "((Get-Content -path $env:QT_PRI -Raw) -replace 'Enterprise', 'OpenSource') | Set-Content -Path $env:QT_PRI" \ |
| 60 | + && powershell -Command "((Get-Content -path $env:QT_PRI -Raw) -replace 'licheck.exe', '') | Set-Content -Path $env:QT_PRI" |
| 61 | + |
| 62 | +# Install Qt SVG |
| 63 | +ARG QT_SVG_URL="${QT_URL}qtsvg-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z" |
| 64 | +RUN powershell -Command Invoke-WebRequest $env:QT_SVG_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 65 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 66 | + && del C:\tmp.7z |
| 67 | + |
| 68 | +# Install Qt Declarative |
| 69 | +ARG QT_DECLARATIVE_URL="${QT_URL}qtdeclarative-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z" |
| 70 | +RUN powershell -Command Invoke-WebRequest $env:QT_DECLARATIVE_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 71 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 72 | + && del C:\tmp.7z |
| 73 | + |
| 74 | +# Install Qt Translations |
| 75 | +ARG QT_TRANSLATIONS_URL="${QT_URL}qttranslations-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z" |
| 76 | +RUN powershell -Command Invoke-WebRequest $env:QT_TRANSLATIONS_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \ |
| 77 | + && 7z x C:/tmp.7z -oC:/Qt -bsp1 \ |
| 78 | + && del C:\tmp.7z |
| 79 | + |
| 80 | +# Install Qt Installer Framework |
| 81 | +ARG QT_IFW_VERSION="3.2.2" |
| 82 | +ARG QT_IFW_URL="https://download.qt.io/official_releases/qt-installer-framework/$QT_IFW_VERSION/QtInstallerFramework-win-x86.exe" |
| 83 | +COPY qtifw-installer-noninteractive.qs C:/qtifw-installer-noninteractive.qs |
| 84 | +RUN powershell -Command Invoke-WebRequest $env:QT_IFW_URL -OutFile 'C:/tmp.exe' -UseBasicParsing ; \ |
| 85 | + && C:/tmp.exe --script C:/qtifw-installer-noninteractive.qs --no-force-installations -v \ |
| 86 | + && setx PATH "%PATH%;C:\Qt\QtIFW-%QT_IFW_VERSION%\bin" \ |
| 87 | + && del C:\tmp.exe |
0 commit comments