Skip to content

Commit

Permalink
Update to remove wayland build variance and combined with both xcb an…
Browse files Browse the repository at this point in the history
…d wayland qpas

Signed-off-by: Steve Pham <[email protected]>
  • Loading branch information
spham-amzn committed Dec 12, 2024
1 parent b22a0b8 commit f7e8554
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 122 deletions.
14 changes: 11 additions & 3 deletions package-system/Qt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# This docker file uses ubuntu 20.04 as the base image to install the dependencies to build Qt from source
#

FROM public.ecr.aws/ubuntu/ubuntu:20.04_stable
FROM amd64/ubuntu:20.04

WORKDIR /data/workspace

# Initilize apt cache
RUN apt-get clean && apt-get update
RUN apt-get clean && apt-get update && apt-get upgrade

# Setup time zone and locale data (necessary for SSL and HTTPS packages)
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata locales keyboard-configuration
Expand Down Expand Up @@ -41,10 +41,18 @@ RUN apt-get install -y qtbase5-dev \
libgbm-dev \
libxext-dev \
libfontconfig1-dev \
libtiff-dev
libtiff-dev \
libwayland-dev \
libwayland-egl1-mesa \
libwayland-server0 \
libgles2-mesa-dev

# Prepare a target folder within the container to install the build artifacts tp
RUN mkdir -p /data/workspace/qt

RUN git clone --single-branch --recursive --branch v5.15.1 git://code.qt.io/qt/qtwayland.git && \
ln -s /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/qwayland-server-qt-texture-sharing-unstable-v1.h /data/workspace/qtwayland/src/compositor/qwayland-server-qt-texture-sharing-unstable-v1.h && \
ln -s /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/wayland-qt-texture-sharing-unstable-v1-server-protocol.h /data/workspace/qtwayland/src/compositor/wayland-qt-texture-sharing-unstable-v1-server-protocol.h

# Copy the build script specific to this Docker script in order to execute the build
COPY docker_build_qt_linux.sh /data/workspace/
11 changes: 2 additions & 9 deletions package-system/Qt/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,8 @@ cp docker_build_qt_linux.sh temp/

pushd temp

# Check if we are building the wayland variation
if [ "$EXTRA_ARG" = "wayland" ]
then
DOCKERFILE=Dockerfile.wayland
DOCKER_IMAGE_NAME=qt_linux_3p_wayland
else
DOCKERFILE=Dockerfile
DOCKER_IMAGE_NAME=qt_linux_3p
fi
DOCKERFILE=Dockerfile
DOCKER_IMAGE_NAME=qt_linux_3p

# Build the Docker Image
echo "Building the docker build script"
Expand Down
4 changes: 2 additions & 2 deletions package-system/Qt/build_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"Linux": {
"Linux": {
"package_version": "5.15.2-rev9",
"package_version": "5.15.2-rev10",
"patch_file": "qt-linux.patch",
"depends_on_packages": [
["OpenSSL-1.1.1t-rev1-linux", "63aea898b7afe8faccd0c7261e62d2f8b7b870f678a4520d5be81e5815542b39", ""],
Expand All @@ -67,7 +67,7 @@
]
},
"Linux-aarch64": {
"package_version": "5.15.2-rev9",
"package_version": "5.15.2-rev10",
"patch_file": "qt-linux.patch",
"depends_on_packages": [
["OpenSSL-1.1.1t-rev1-linux-aarch64", "f32721bec9c82d1bd7fb244d78d5dc4e2a47e7b808bb36027236ad377e241ea5", ""],
Expand Down
162 changes: 62 additions & 100 deletions package-system/Qt/docker_build_qt_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,81 +44,45 @@ INSTALL_PATH=/data/workspace/qt
[[ -d $BUILD_PATH ]] || mkdir $BUILD_PATH
cd $BUILD_PATH

if [ "$ENABLE_QT_WAYLAND" -eq 1 ]
then
echo Configuring Qt for wayland ...

../src/configure -prefix ${INSTALL_PATH} \
-opensource \
-nomake examples \
-nomake tests \
-confirm-license \
-no-icu \
-dbus \
-no-separate-debug-info \
-release \
-force-debug-info \
-qt-libpng \
-qt-libjpeg \
-no-feature-vnc \
-no-feature-linuxfb \
--tiff=system \
-qt-zlib \
-v \
-no-cups \
-no-glib \
-no-feature-renameat2 \
-no-feature-getentropy \
-no-feature-statx \
-no-egl \
-feature-wayland-server \
-qpa wayland \
-I $TIFF_INCDIR \
-I $ZLIB_INCDIR \
-I $OPENSSL_INCDIR \
-L $TIFF_LIBDIR \
-L $ZLIB_LIBDIR \
-L $OPENSSL_LIBDIR \
-c++std c++1z \
-fontconfig
else
echo Configuring Qt for xcb ...

../src/configure -prefix ${INSTALL_PATH} \
-opensource \
-nomake examples \
-nomake tests \
-confirm-license \
-no-icu \
-dbus \
-no-separate-debug-info \
-release \
-force-debug-info \
-qt-libpng \
-qt-libjpeg \
-no-feature-vnc \
-no-feature-linuxfb \
--tiff=system \
-qt-zlib \
-v \
-no-cups \
-no-glib \
-no-feature-renameat2 \
-no-feature-getentropy \
-no-feature-statx \
-no-egl \
-qpa xcb \
-xcb-xlib \
-openssl \
-I $TIFF_INCDIR \
-I $ZLIB_INCDIR \
-I $OPENSSL_INCDIR \
-L $TIFF_LIBDIR \
-L $ZLIB_LIBDIR \
-L $OPENSSL_LIBDIR \
-c++std c++1z \
-fontconfig
fi
echo Configuring Qt ...

../src/configure -prefix ${INSTALL_PATH} \
-opensource \
-nomake examples \
-nomake tests \
-confirm-license \
-no-icu \
-dbus \
-no-separate-debug-info \
-release \
-force-debug-info \
-qt-libpng \
-qt-libjpeg \
-no-feature-vnc \
-no-feature-linuxfb \
--tiff=system \
-qt-zlib \
-v \
-no-cups \
-no-glib \
-no-feature-renameat2 \
-no-feature-getentropy \
-no-feature-statx \
-feature-wayland-server \
-no-egl \
-qpa xcb \
-qpa wayland \
-xcb-xlib \
-openssl \
-I $TIFF_INCDIR \
-I $ZLIB_INCDIR \
-I $OPENSSL_INCDIR \
-L $TIFF_LIBDIR \
-L $ZLIB_LIBDIR \
-L $OPENSSL_LIBDIR \
-c++std c++1z \
-fontconfig

if [ $? -ne 0 ]
then
echo "Failed to configure Qt"
Expand Down Expand Up @@ -156,34 +120,32 @@ for qtlib in "${qtarray[@]}"; do
echo $qtlib installed.
done

if [ "$ENABLE_QT_WAYLAND" -eq 1 ]
cd /data/workspace/qtwayland

/data/workspace/build/qtbase/bin/qmake
if [ $? -ne 0 ]
then
echo "qmake failed for qtwayland"
exit 1
fi
make
if [ $? -ne 0 ]
then
cd /data/workspace/qtwayland
echo "make failed for qtwayland"
exit 1
fi

/data/workspace/build/qtbase/bin/qmake
if [ $? -ne 0 ]
then
echo "qmake failed for qtwayland"
exit 1
fi
make
if [ $? -ne 0 ]
then
echo "make failed for qtwayland"
exit 1
fi
make install
if [ $? -ne 0 ]
then
echo "make install failed for qtwayland"
exit 1
fi

make install
if [ $? -ne 0 ]
then
echo "make install failed for qtwayland"
exit 1
fi
rm ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/qwayland-server-qt-texture-sharing-unstable-v1.h
cp /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/qwayland-server-qt-texture-sharing-unstable-v1.h ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/
rm ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/wayland-qt-texture-sharing-unstable-v1-server-protocol.h
cp /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/wayland-qt-texture-sharing-unstable-v1-server-protocol.h ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/

rm ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/qwayland-server-qt-texture-sharing-unstable-v1.h
cp /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/qwayland-server-qt-texture-sharing-unstable-v1.h ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/
rm ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/wayland-qt-texture-sharing-unstable-v1-server-protocol.h
cp /data/workspace/qtwayland/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/wayland-qt-texture-sharing-unstable-v1-server-protocol.h ${INSTALL_PATH}/include/QtWaylandCompositor/5.15.1/QtWaylandCompositor/private/
fi

echo Qt installed successfully!
6 changes: 2 additions & 4 deletions package_build_list_host_linux-aarch64.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"poly2tri-7f0487a-rev1-linux-aarch64": "package-system/poly2tri/build_package_image.py --platform-name linux-aarch64",
"pyside2-5.15.2.1-py3.10-rev7-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/pyside2 --platform-name Linux-aarch64 --clean",
"python-3.10.13-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/python --platform-name Linux-aarch64 --clean",
"qt-5.15.2-rev9-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux-aarch64 --clean",
"qt-wayland-5.15.2-rev9-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --build-config-file build_config_wayland.json --platform-name Linux-aarch64 --package-root ../../package-system/Qt/temp --clean",
"qt-5.15.2-rev10-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux-aarch64 --clean",
"sdformat-13.5.0-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/sdformat --platform-name Linux-aarch64 --clean",
"SPIRVCross-1.3.275.0-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/SPIRVCross --platform-name Linux-aarch64 --clean",
"SQLite-3.37.2-rev1-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/sqlite --platform-name Linux-aarch64 --clean",
Expand Down Expand Up @@ -76,8 +75,7 @@
"poly2tri-7f0487a-rev1-linux-aarch64": "package-system/poly2tri-linux-aarch64",
"pyside2-5.15.2.1-py3.10-rev7-linux-aarch64": "package-system/pyside2/temp/pyside2-linux-aarch64",
"python-3.10.13-rev2-linux-aarch64": "package-system/python/temp/python-linux-aarch64",
"qt-5.15.2-rev9-linux-aarch64": "package-system/Qt/temp/qt-linux-aarch64",
"qt-wayland-5.15.2-rev9-linux-aarch64": "package-system/Qt/temp/qt-wayland-linux-aarch64",
"qt-5.15.2-rev10-linux-aarch64": "package-system/Qt/temp/qt-linux-aarch64",
"sdformat-13.5.0-rev2-linux-aarch64": "package-system/sdformat/temp/sdformat-linux-aarch64",
"SPIRVCross-1.3.275.0-rev1-linux-aarch64": "package-system/SPIRVCross/temp/SPIRVCross-linux-aarch64",
"SQLite-3.37.2-rev1-linux-aarch64": "package-system/sqlite/temp/SQLite-linux-aarch64",
Expand Down
6 changes: 2 additions & 4 deletions package_build_list_host_linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"python-3.10.13-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/python --platform-name Linux --clean",
"python-3.10.13-rev2-linux-aarch64": "Scripts/extras/pull_and_build_from_git.py ../../package-system/python --platform-name Linux-aarch64 --clean",
"mikkelsen-1.0.0.4-linux": "package-system/mikkelsen/build_package_image.py",
"qt-5.15.2-rev9-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux --package-root ../../package-system/Qt/temp --clean",
"qt-wayland-5.15.2-rev9-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --build-config-file build_config_wayland.json --platform-name Linux --package-root ../../package-system/Qt/temp --clean",
"qt-5.15.2-rev10-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/Qt --platform-name Linux --package-root ../../package-system/Qt/temp --clean",
"zlib-1.2.11-rev5-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/zlib --platform-name Linux --package-root ../../package-system --clean",
"lz4-1.9.4-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/lz4 --platform-name Linux --package-root ../../package-system/lz4/temp --clean",
"expat-2.4.2-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/expat --platform-name Linux --package-root ../../package-system/expat/temp --clean",
Expand Down Expand Up @@ -98,8 +97,7 @@
"unwind-1.2.1-linux": "package-system/unwind-linux",
"SQLite-3.37.2-rev1-linux": "package-system/SQLite-linux",
"xxhash-0.7.4-rev1-multiplatform": "package-system/xxhash-multiplatform",
"qt-5.15.2-rev9-linux": "package-system/Qt/temp/qt-linux",
"qt-wayland-5.15.2-rev9-linux": "package-system/Qt/temp/qt-wayland-linux",
"qt-5.15.2-rev10-linux": "package-system/Qt/temp/qt-linux",
"zlib-1.2.11-rev5-linux": "package-system/zlib-linux",
"lz4-1.9.4-rev2-linux": "package-system/lz4/temp/lz4-linux",
"expat-2.4.2-rev2-linux": "package-system/expat/temp/expat-linux",
Expand Down

0 comments on commit f7e8554

Please sign in to comment.