Skip to content

Commit a3c775a

Browse files
authored
Merge pull request #7 from LibrePCB/add-windows-image
Add windowsservercore-ltsc2019-qt5.15.0-32bit
2 parents a15c85b + 8529cf1 commit a3c775a

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ Ubuntu 20.04.
7272
In addition, this image contains necessary tools for dynamic linking of
7373
LibrePCB (pkg-config, libquazip5-dev, googletest).
7474

75+
### `windowsservercore-ltsc2019-qt5.15.0-32bit`
76+
77+
Based on Windows Server Core LTSC2019 with Qt5.15.0 and MinGW 8.1 32-bit. This
78+
image is intended for deployment of official binary releases of LibrePCB for
79+
Windows.
80+
7581

7682
## Updating Images
7783

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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 Qt whatever DLLs
32+
ARG QT_VERSION="5.15.0"
33+
ARG QT_URL="https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt5_5150/qt.qt5.5150.win32_mingw81/5.15.0-0-202005150700"
34+
ARG QT_DLLS_URL="${QT_URL}i686-8.1.0-release-posix-dwarf-rt_v6-rev0-runtime.7z"
35+
RUN powershell -Command Invoke-WebRequest $env:QT_DLLS_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \
36+
&& 7z x C:/tmp.7z -oC:/Qt -bsp1 \
37+
&& del C:\tmp.7z
38+
39+
# Install Qt Tools
40+
ARG QT_TOOLS_URL="${QT_URL}qttools-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z"
41+
RUN powershell -Command Invoke-WebRequest $env:QT_TOOLS_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \
42+
&& 7z x C:/tmp.7z -oC:/Qt -bsp1 \
43+
&& setx PATH "%PATH%;C:\Qt\%QT_VERSION%\mingw81_32\bin" \
44+
&& del C:\tmp.7z
45+
46+
# Install Qt Base
47+
ARG QT_BASE_URL="${QT_URL}qtbase-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z"
48+
ARG QT_PRI="C:\\Qt\\$QT_VERSION\\mingw81_32\\mkspecs\\qconfig.pri"
49+
RUN powershell -Command Invoke-WebRequest $env:QT_BASE_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \
50+
&& 7z x C:/tmp.7z -oC:/Qt -bsp1 \
51+
&& del C:\tmp.7z \
52+
&& powershell -Command "((Get-Content -path $env:QT_PRI -Raw) -replace 'Enterprise', 'OpenSource') | Set-Content -Path $env:QT_PRI" \
53+
&& powershell -Command "((Get-Content -path $env:QT_PRI -Raw) -replace 'licheck.exe', '') | Set-Content -Path $env:QT_PRI"
54+
55+
# Install Qt SVG
56+
ARG QT_SVG_URL="${QT_URL}qtsvg-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z"
57+
RUN powershell -Command Invoke-WebRequest $env:QT_SVG_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \
58+
&& 7z x C:/tmp.7z -oC:/Qt -bsp1 \
59+
&& del C:\tmp.7z
60+
61+
# Install Qt Declarative
62+
ARG QT_DECLARATIVE_URL="${QT_URL}qtdeclarative-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z"
63+
RUN powershell -Command Invoke-WebRequest $env:QT_DECLARATIVE_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \
64+
&& 7z x C:/tmp.7z -oC:/Qt -bsp1 \
65+
&& del C:\tmp.7z
66+
67+
# Install Qt Translations
68+
ARG QT_TRANSLATIONS_URL="${QT_URL}qttranslations-Windows-Windows_7-Mingw-Windows-Windows_7-X86.7z"
69+
RUN powershell -Command Invoke-WebRequest $env:QT_TRANSLATIONS_URL -OutFile 'C:/tmp.7z' -UseBasicParsing ; \
70+
&& 7z x C:/tmp.7z -oC:/Qt -bsp1 \
71+
&& del C:\tmp.7z
72+
73+
# Install Qt Installer Framework
74+
ARG QT_IFW_VERSION="3.2.2"
75+
ARG QT_IFW_URL="https://download.qt.io/official_releases/qt-installer-framework/$QT_IFW_VERSION/QtInstallerFramework-win-x86.exe"
76+
COPY qtifw-installer-noninteractive.qs C:/qtifw-installer-noninteractive.qs
77+
RUN powershell -Command Invoke-WebRequest $env:QT_IFW_URL -OutFile 'C:/tmp.exe' -UseBasicParsing ; \
78+
&& C:/tmp.exe --script C:/qtifw-installer-noninteractive.qs --no-force-installations -v \
79+
&& setx PATH "%PATH%;C:\Qt\QtIFW-%QT_IFW_VERSION%\bin" \
80+
&& del C:\tmp.exe
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
function Controller()
2+
{
3+
installer.autoRejectMessageBoxes();
4+
installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
5+
installer.setMessageBoxAutomaticAnswer("stopProcessesForUpdates", QMessageBox.Ignore);
6+
installer.installationFinished.connect(function() {
7+
gui.clickButton(buttons.NextButton);
8+
})
9+
}
10+
11+
12+
Controller.prototype.IntroductionPageCallback = function()
13+
{
14+
gui.clickButton(buttons.NextButton);
15+
}
16+
17+
Controller.prototype.TargetDirectoryPageCallback = function()
18+
{
19+
gui.clickButton(buttons.NextButton);
20+
}
21+
22+
Controller.prototype.ComponentSelectionPageCallback = function()
23+
{
24+
gui.clickButton(buttons.NextButton);
25+
}
26+
27+
Controller.prototype.LicenseAgreementPageCallback = function()
28+
{
29+
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
30+
gui.clickButton(buttons.NextButton);
31+
}
32+
33+
Controller.prototype.StartMenuDirectoryPageCallback = function()
34+
{
35+
gui.clickButton(buttons.NextButton);
36+
}
37+
38+
Controller.prototype.ReadyForInstallationPageCallback = function()
39+
{
40+
gui.clickButton(buttons.NextButton);
41+
}
42+
43+
Controller.prototype.PerformInstallationPageCallback = function()
44+
{
45+
gui.clickButton(buttons.NextButton);
46+
}
47+
48+
Controller.prototype.FinishedPageCallback = function()
49+
{
50+
gui.clickButton(buttons.FinishButton);
51+
}

0 commit comments

Comments
 (0)