Skip to content

Commit 3b0b733

Browse files
authored
Merge pull request #35 from LibrePCB/qt6
Add/update images for Qt6
2 parents c9a8e55 + ff7560c commit 3b0b733

8 files changed

Lines changed: 429 additions & 3 deletions

File tree

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ In addition, this image contains
2626
[`linuxdeployqt`](https://github.com/probonopd/linuxdeployqt) to build the
2727
AppImage.
2828

29+
### `ubuntu-20.04-qt6.6`
30+
31+
Based on Ubuntu 20.04, containing Qt 6.6.x from
32+
[download.qt.io](https://download.qt.io) and OpenCascade OCCT from
33+
[github/Open-Cascade-SAS/OCCT](https://github.com/Open-Cascade-SAS/OCCT).
34+
This image is intended for deployment of official binary releases of LibrePCB,
35+
which should be linked against an old version of `glibc` (for maximum
36+
compatibility) but still using a recent Qt version (to get the latest
37+
features/bugfixes of Qt).
38+
39+
In addition, this image contains
40+
[`linuxdeployqt`](https://github.com/probonopd/linuxdeployqt) to build the
41+
AppImage.
42+
43+
This image will deprecate `ubuntu-18.04-qt5.15.2` once we definitively
44+
switch from Qt5 to Qt6. Currently we provide both Qt5 and Qt6 builds.
45+
2946
### `ubuntu-20.04`
3047

3148
Based on Ubuntu 20.04, containing Qt from the official Ubuntu package
@@ -40,13 +57,19 @@ googletest).
4057

4158
Based on Ubuntu 22.04, containing Qt and OpenCascade OCE from the official
4259
Ubuntu package repository. This image is intended to check if LibrePCB
43-
compiles on a standard Ubuntu 18.04.
60+
compiles on a standard Ubuntu 22.04.
4461

4562
### `windowsservercore-ltsc2019-qt5.15.2-32bit`
4663

4764
Based on Windows Server Core LTSC2019 with Qt5.15.2, MinGW 8.1 32-bit
48-
and OpenCascade OCCT 7.7.0. This image is intended for deployment of official
49-
binary releases of LibrePCB for Windows.
65+
and OpenCascade OCCT 7.7.2. This image is intended for deployment of official
66+
32-bit binary releases of LibrePCB for Windows.
67+
68+
### `windowsservercore-ltsc2019-qt6.6-64bit`
69+
70+
Based on Windows Server Core LTSC2019 with Qt6.6.x, MinGW 11.2.0 64-bit
71+
and OpenCascade OCCT 7.7.2. This image is intended for deployment of official
72+
64-bit binary releases of LibrePCB for Windows.
5073

5174
### `webtools`
5275

ubuntu-20.04-qt6.6/Dockerfile

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
FROM ubuntu:20.04
2+
3+
# Install APT packages
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
6+
bzip2 \
7+
ca-certificates \
8+
clang \
9+
cmake \
10+
curl \
11+
dbus \
12+
doxygen \
13+
file \
14+
g++ \
15+
git \
16+
graphviz \
17+
libc++-dev \
18+
libc++abi-dev \
19+
libcups2 \
20+
libegl1-mesa \
21+
libffi-dev \
22+
libfontconfig1 \
23+
libfreetype6 \
24+
libglu1-mesa-dev \
25+
libodbc1 \
26+
libpq5 \
27+
libxcb-cursor0 \
28+
libxcb-glx0 \
29+
libxcb-icccm4 \
30+
libxcb-icccm4 \
31+
libxcb-image0 \
32+
libxcb-keysyms1 \
33+
libxcb-randr0 \
34+
libxcb-render-util0 \
35+
libxcb-shape0 \
36+
libxcb-shm0 \
37+
libxcb-xfixes0 \
38+
libxcb-xinerama0 \
39+
libxcb1 \
40+
libxkbcommon-x11-0 \
41+
make \
42+
ninja-build \
43+
p7zip-full \
44+
python3 \
45+
python3-pip \
46+
python3-setuptools \
47+
python3-wheel \
48+
software-properties-common \
49+
wget \
50+
xvfb \
51+
zlib1g \
52+
zlib1g-dev \
53+
&& rm -rf /var/lib/apt/lists/*
54+
55+
# Set Python3 as default Python version
56+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 100
57+
RUN update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 100
58+
59+
# Allow installing pip packages system-wide since there's no risk in a container
60+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
61+
62+
# Install OpenCascade
63+
ARG OCC_VERSION="7_7_2"
64+
ARG OCC_URL="https://github.com/Open-Cascade-SAS/OCCT/archive/refs/tags/V$OCC_VERSION.tar.gz"
65+
RUN wget -c "${OCC_URL}" -O /tmp.tar.gz \
66+
&& tar -xzf /tmp.tar.gz -C /opt \
67+
&& rm /tmp.tar.gz \
68+
&& cd "/opt/OCCT-$OCC_VERSION" \
69+
&& cmake . -G "Ninja" \
70+
-DCMAKE_BUILD_TYPE=Release \
71+
-DINSTALL_DIR=/usr \
72+
-DBUILD_LIBRARY_TYPE=Shared \
73+
-DBUILD_MODULE_ApplicationFramework=0 \
74+
-DBUILD_MODULE_DataExchange=1 \
75+
-DBUILD_MODULE_Draw=0 \
76+
-DBUILD_MODULE_FoundationClasses=0 \
77+
-DBUILD_MODULE_ModelingAlgorithms=0 \
78+
-DBUILD_MODULE_ModelingData=0 \
79+
-DBUILD_MODULE_Visualization=0 \
80+
-DUSE_DRACO=0 \
81+
-DUSE_FREEIMAGE=0 \
82+
-DUSE_FREETYPE=0 \
83+
-DUSE_GLES2=0 \
84+
-DUSE_OPENGL=0 \
85+
-DUSE_OPENVR=0 \
86+
-DUSE_RAPIDJSON=0 \
87+
-DUSE_TBB=0 \
88+
-DUSE_TK=0 \
89+
-DUSE_VTK=0 \
90+
&& ninja && ninja install \
91+
&& cd / && rm -rf "/opt/OCCT-$OCC_VERSION"
92+
93+
# Install Qt Tools
94+
ARG QT_VERSION="6.6.2"
95+
ARG QT_BASEURL="https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_662"
96+
ARG QT_URL="$QT_BASEURL/qt.qt6.662.gcc_64/6.6.2-0-202402121133"
97+
ENV QTDIR="/opt/qt/$QT_VERSION/gcc_64" \
98+
PATH="/opt/qt/$QT_VERSION/gcc_64/bin:$PATH" \
99+
LD_LIBRARY_PATH="/opt/qt/$QT_VERSION/gcc_64/lib:$LD_LIBRARY_PATH" \
100+
PKG_CONFIG_PATH="/opt/qt/$QT_VERSION/gcc_64/lib/pkgconfig:$PKG_CONFIG_PATH"
101+
RUN mkdir /opt/qt \
102+
&& wget -c "${QT_URL}qttools-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
103+
&& 7za x /tmp.7z -o/opt/qt \
104+
&& rm /tmp.7z \
105+
# The AppImage deployment tools might read some paths from the Qt libraries,
106+
# but they are wrong so let's create a symlink to make them working anyway:
107+
&& mkdir -p "/home/qt/work" \
108+
&& ln -s "/opt/qt/$QT_VERSION/gcc_64" "/home/qt/work/install"
109+
110+
# Install Qt Base
111+
ARG QT_PRI="/opt/qt/$QT_VERSION/gcc_64/mkspecs/qconfig.pri"
112+
RUN wget -c "${QT_URL}qtbase-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
113+
&& 7za x /tmp.7z -o/opt/qt \
114+
&& sed -i 's/Enterprise/OpenSource/' "$QT_PRI" \
115+
&& sed -i 's/licheck64//' "$QT_PRI" \
116+
# Allow removing unneeded SQL plugins during CI job to fix deployment issue:
117+
# https://forum.qt.io/topic/151452/what-qt-specific-files-exactly-do-i-need-to-add-when-deploying
118+
&& chmod 777 $QTDIR/plugins/sqldrivers \
119+
&& rm /tmp.7z
120+
121+
# Install Qt SVG
122+
RUN wget -c "${QT_URL}qtsvg-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
123+
&& 7za x /tmp.7z -o/opt/qt \
124+
&& rm /tmp.7z
125+
126+
# Install Qt Declarative
127+
RUN wget -c "${QT_URL}qtdeclarative-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
128+
&& 7za x /tmp.7z -o/opt/qt \
129+
&& rm /tmp.7z
130+
131+
# Install Qt Translations
132+
RUN wget -c "${QT_URL}qttranslations-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
133+
&& 7za x /tmp.7z -o/opt/qt \
134+
&& rm /tmp.7z
135+
136+
# Install Qt5 Compat
137+
RUN wget -c "${QT_BASEURL}/qt.qt6.662.qt5compat.gcc_64/6.6.2-0-202402121133qt5compat-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
138+
&& 7za x /tmp.7z -o/opt/qt \
139+
&& rm /tmp.7z
140+
141+
# Install Qt Image Formats Plugin
142+
RUN wget -c "${QT_BASEURL}/qt.qt6.662.addons.qtimageformats.gcc_64/6.6.2-0-202402121133qtimageformats-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64.7z" -O /tmp.7z \
143+
&& 7za x /tmp.7z -o/opt/qt \
144+
&& rm /tmp.7z
145+
146+
# Install libicu
147+
RUN wget -c "${QT_URL}icu-linux-Rhel7.2-x64.7z" -O /tmp.7z \
148+
&& 7za x /tmp.7z -o/opt/qt \
149+
&& rm /tmp.7z
150+
151+
# Install linuxdeployqt
152+
ARG LINUXDEPLOYQT_URL="https://github.com/probonopd/linuxdeployqt/releases/download/10/linuxdeployqt-continuous-x86_64.AppImage"
153+
RUN wget -c "$LINUXDEPLOYQT_URL" -O /linuxdeployqt.AppImage \
154+
&& chmod a+x /linuxdeployqt.AppImage \
155+
&& /linuxdeployqt.AppImage --appimage-extract \
156+
&& chmod -R 755 /squashfs-root \
157+
&& mv /squashfs-root /opt/linuxdeployqt \
158+
&& ln -s /opt/linuxdeployqt/AppRun /usr/local/bin/linuxdeployqt \
159+
&& rm /linuxdeployqt.AppImage
160+
161+
# Install beta appimagetool which should not depend on any system libraries
162+
# anymore, and should therefore run on Ubuntu 22.04 which doesn't provide
163+
# libfuse2 anymore (see https://github.com/LibrePCB/LibrePCB/issues/980).
164+
# However, since there are no official releases yet, the binary is downloaded
165+
# from the nightly build and added to the repository. Download URL:
166+
# https://github.com/probonopd/go-appimage/releases/download/continuous/appimagetool-765-x86_64.AppImage
167+
COPY appimagetool-x86_64.AppImage /appimagetool-x86_64.AppImage
168+
RUN /appimagetool-x86_64.AppImage --appimage-extract \
169+
&& chmod -R 755 /squashfs-root \
170+
&& mv /squashfs-root /opt/appimagetool \
171+
&& ln -s /opt/appimagetool/AppRun /usr/local/bin/appimagetool \
172+
&& rm /appimagetool-x86_64.AppImage
173+
174+
# Install latest OpenSSL to avoid possible issues if servers some day stop
175+
# working with an old OpenSSL library (as already happened in the past).
176+
ARG OPENSSL_VERSION="3.2.1"
177+
RUN wget -c "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -O /tmp.tar.gz \
178+
&& tar -zxf /tmp.tar.gz \
179+
&& cd "./openssl-$OPENSSL_VERSION" \
180+
&& ./config --prefix=/usr --libdir=lib --openssldir=/etc/ssl '-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)' \
181+
&& make -s -j8 \
182+
&& make install \
183+
&& ldconfig \
184+
&& cd .. \
185+
&& rm -rf "./openssl-$OPENSSL_VERSION" \
186+
&& rm /tmp.tar.gz
187+
188+
# LibrePCB's unittests expect that there is a USERNAME environment variable
189+
ENV USERNAME="root"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:a40a596ffb7892c33cef161fcdb545cf7de6a7760ef4cfc577563ab9453dff88
3+
size 8958296

ubuntu-22.04/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
2222
libqt5opengl5-dev \
2323
libqt5sql5-sqlite \
2424
libqt5svg5-dev \
25+
libqt6core5compat6-dev \
26+
libqt6opengl6-dev \
27+
libqt6openglwidgets6 \
28+
libqt6sql6-sqlite \
29+
libqt6svg6-dev \
2530
make \
2631
ninja-build \
2732
openssl \
@@ -30,6 +35,12 @@ RUN apt-get update -q && apt-get -y -q install --no-install-recommends \
3035
python3-setuptools \
3136
python3-wheel \
3237
qt5-image-formats-plugins \
38+
qt6-base-dev \
39+
qt6-declarative-dev \
40+
qt6-image-formats-plugins \
41+
qt6-l10n-tools \
42+
qt6-tools-dev \
43+
qt6-tools-dev-tools \
3344
qtbase5-dev \
3445
qtdeclarative5-dev \
3546
qtquickcontrols2-5-dev \

0 commit comments

Comments
 (0)