Skip to content

Commit

Permalink
Qt 6.7.0. Use patched aqtinstall.
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Apr 11, 2024
1 parent a6fcd69 commit c2b4299
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"context": "../builders",
"cacheFrom": "type=registry,ref=ghcr.io/rectalogic/mediafx:buildcache",
"args": {
"QT_VER": "6.6.2"
"QT_VER": "6.7.0"
}
},
"init": true,
Expand All @@ -23,7 +23,7 @@
"ms-azuretools.vscode-docker"
],
"settings": {
"cmake.installPrefix": "/usr/local/Qt/6.6.2/gcc_64",
"cmake.installPrefix": "/usr/local/Qt/${containerEnv:QT_VER}/gcc_64",
"cmake.buildDirectory": "${workspaceFolder}/build/Linux/vscode",
"cmake.configureSettings": {
"CMAKE_BUILD_TYPE": "Debug"
Expand Down
2 changes: 1 addition & 1 deletion builders/Darwin/install-qt6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ INSTALLDIR=${QTDIR%/*/*}
"qtvenv/bin/python" -m aqt install-tool mac desktop tools_qtcreator_gui qt.tools.qtcreator_gui -O "${QTDIR}/bin" || exit 1
"qtvenv/bin/python" -m aqt install-src mac ${QT_VER} --archives qtbase qtdeclarative qtmultimedia qtquicktimeline -O "${INSTALLDIR}" || exit 1
"qtvenv/bin/python" -m aqt install-doc mac ${QT_VER} --modules qtmultimedia --archives qtquick qtmultimedia -O "${INSTALLDIR}" || exit 1
find "${INSTALLDIR}/Docs/Qt-${QT_VER}" -type f -and -not -name '*.index' -delete || exit
find "${INSTALLDIR}/Docs/Qt-${QT_VER}" -type f -and -not -name '*.index' -delete || exit 1
)
48 changes: 35 additions & 13 deletions builders/Linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
# Copyright (C) 2023 Andrew Wason
# SPDX-License-Identifier: GPL-3.0-or-later

# syntax = docker/dockerfile:1.2
# syntax = docker/dockerfile:1.4

ARG UBUNTU=noble

# linux arm64 not supported by Qt https://doc.qt.io/qt-6/supported-platforms.html
FROM --platform=linux/amd64 ubuntu:${UBUNTU} as qt
FROM ubuntu:${UBUNTU} as qt

ARG QT_VER
ENV container docker
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=en_US.UTF-8
ENV LC_ALL=C.UTF-8
RUN apt-get -y update \
&& apt-get -y install python3 python3-pip python3-venv
RUN apt-get -y update && apt-get -y install python3 python3-pip python3-venv git curl

COPY aqtinstall-requirements.txt /tmp/aqtinstall-requirements.txt
RUN python3 -m venv venv && venv/bin/pip3 install --requirement /tmp/aqtinstall-requirements.txt \
&& venv/bin/python3 -m aqt install-qt linux desktop ${QT_VER} --modules qtmultimedia qtquick3d qtshadertools qtquicktimeline qtwebengine qtwebchannel qtpositioning debug_info --archives qtbase icu qttools qtdeclarative qtmultimedia qtquick3d qtquicktimeline --outputdir /usr/local/Qt \
ARG TARGETPLATFORM
RUN <<EOF
if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then
ARCH=gcc_arm64
HOST=linux_arm64
else
ARCH=gcc_64
HOST=linux
fi
python3 -m venv venv && venv/bin/pip3 install --requirement /tmp/aqtinstall-requirements.txt \
&& venv/bin/python3 -m aqt install-qt ${HOST} desktop ${QT_VER} --modules qtmultimedia qtquick3d qtshadertools qtquicktimeline qtwebengine qtwebchannel qtpositioning debug_info --archives qtbase icu qttools qtdeclarative qtmultimedia qtquick3d qtquicktimeline --outputdir /usr/local/Qt \
&& venv/bin/python3 -m aqt install-doc linux ${QT_VER} --modules qtmultimedia --archives qtquick qtmultimedia --outputdir /usr/local/Qt \
&& find /usr/local/Qt/Docs/Qt-${QT_VER} -type f -and -not -name '*.index' -delete
&& find /usr/local/Qt/Docs/Qt-${QT_VER} -type f -and -not -name '*.index' -delete \
&& curl -o iwyu-mapgen-qt.py https://raw.githubusercontent.com/include-what-you-use/include-what-you-use/clang_17/mapgen/iwyu-mapgen-qt.py \
&& python3 iwyu-mapgen-qt.py /usr/local/Qt/${QT_VER}/${ARCH}/include > "/usr/local/Qt/${QT_VER}/qt.imp"
EOF


FROM --platform=linux/amd64 ubuntu:jammy as jammy
FROM ubuntu:jammy as jammy


FROM --platform=linux/amd64 ubuntu:noble as noble
FROM ubuntu:noble as noble
RUN apt-get -y update && apt-get -y install \
clang-format \
clang-tidy \
clazy \
iwyu


FROM --platform=linux/amd64 ${UBUNTU} as mediafx
FROM ${UBUNTU} as mediafx
LABEL maintainer=rectalogic
ARG QT_VER

Expand Down Expand Up @@ -91,8 +101,20 @@ RUN apt-get -y update && apt-get -y install \
xz-utils

COPY --from=qt /usr/local/Qt /usr/local/Qt/
ENV QTDIR /usr/local/Qt/${QT_VER}/gcc_64
ENV PATH /usr/local/Qt/${QT_VER}/gcc_64/bin:$PATH

ARG TARGETPLATFORM
RUN <<EOF
if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then
QTDIR=/usr/local/Qt/${QT_VER}/gcc_arm64
else
QTDIR=/usr/local/Qt/${QT_VER}/gcc_64
fi
mkdir -p /entrypoint
echo QTDIR=${QTDIR} >> /entrypoint/environment
echo PATH=${QTDIR}/bin:$PATH >> /entrypoint/environment
chmod +x /entrypoint/environment
EOF

ENV QT_VER=${QT_VER}

RUN ldconfig
Expand Down
2 changes: 1 addition & 1 deletion builders/Linux/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ MOUNT="$(cd "${BASH_SOURCE%/*}/../.."; pwd)"

# opengl or vulkan
TARGET=${TARGET:-opengl}
docker run ${DOCKER_OPTS} -e QSG_RHI_BACKEND=${TARGET} --platform linux/amd64 --rm --init \
docker run ${DOCKER_OPTS} -e QSG_RHI_BACKEND=${TARGET} --rm --init \
--mount="type=bind,src=${MOUNT},dst=/mediafx,consistency=cached" ghcr.io/rectalogic/mediafx:${UBUNTU:-noble}-$(git branch --show-current) "$@"
2 changes: 2 additions & 0 deletions builders/Linux/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ if [ ! -z "$NEW_UID" -a "$NEW_UID" != "0" -a "$OLD_UID" != "$NEW_UID" ]; then
usermod -u "$NEW_UID" -o mediafx
fi

export $(cat /entrypoint/environment)

mkdir -p /mediafx/build/Linux && chown -R mediafx /mediafx/build/Linux
exec gosu mediafx /entrypoint/xvfb.sh "$@"
6 changes: 1 addition & 5 deletions builders/Linux/iwyu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,4 @@ source "$CURRENT/../versions"
BUILD_TYPE=${BUILD_TYPE:-Debug}
MEDIAFX_BUILD=${BUILD_ROOT}/${BUILD_TYPE}
mkdir -p "${MEDIAFX_BUILD}"
if [ ! -f "${MEDIAFX_BUILD}/qt${QT_VER}.imp" ]; then
curl -o "${MEDIAFX_BUILD}/iwyu-mapgen-qt.py" https://raw.githubusercontent.com/include-what-you-use/include-what-you-use/clang_13/mapgen/iwyu-mapgen-qt.py
python3 "${MEDIAFX_BUILD}/iwyu-mapgen-qt.py" ${QTDIR}/include > "${MEDIAFX_BUILD}/qt${QT_VER}.imp"
fi
CC="clang" CXX="clang++" cmake -S "${SOURCE_ROOT}" -B "$MEDIAFX_BUILD" -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="/usr/bin/iwyu;-Xiwyu;--mapping_file=${MEDIAFX_BUILD}/qt${QT_VER}.imp;-Xiwyu;--mapping_file=/mediafx/builders/Linux/iwyu.imp;-Xiwyu;--cxx17ns;-Xiwyu;--no_comments" --install-prefix ${QTDIR} && exec cmake --build "${MEDIAFX_BUILD}" --parallel 4
CC="clang" CXX="clang++" cmake -S "${SOURCE_ROOT}" -B "$MEDIAFX_BUILD" -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="/usr/bin/iwyu;-Xiwyu;--mapping_file=/usr/local/Qt/${QT_VER}/qt.imp;-Xiwyu;--mapping_file=/mediafx/builders/Linux/iwyu.imp;-Xiwyu;--cxx17ns;-Xiwyu;--no_comments" --install-prefix ${QTDIR} && exec cmake --build "${MEDIAFX_BUILD}" --parallel 4
2 changes: 1 addition & 1 deletion builders/aqtinstall-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aqtinstall==3.1.12
git+https://github.com/rectalogic/aqtinstall.git@65501b1
beautifulsoup4==4.12.3
Brotli==1.1.0
bs4==0.0.2
Expand Down
2 changes: 1 addition & 1 deletion builders/versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export QT_VER=6.6.2
export QT_VER=6.7.0
export SOURCE_ROOT="${BASH_SOURCE%/*}/.."
BUILD_ROOT="${BASH_SOURCE%/*}/../build/$(uname)"
mkdir -p "${BUILD_ROOT}"
Expand Down
3 changes: 3 additions & 0 deletions src/MediaFX/doc/modules.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
\l{MediaFX} QML types
\generatelist{qmltypesbymodule MediaFX}

\l{MediaFX} QML value types
\generatelist{qmlvaluetypesbymodule MediaFX}

\l{MediaFX.Transition} qml types
\generatelist{qmltypesbymodule MediaFX.Transition}
*/
2 changes: 1 addition & 1 deletion src/MediaFX/media_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <QList>
#include <QObject>
#include <QtCore>
#include <QtQml>
#include <QtQmlIntegration>
#include <chrono>
#include <memory>
Expand All @@ -25,6 +24,7 @@ class AudioRenderer;
class MediaClip;
class OutputFormat;
class QQuickView;
class QQmlEngine;
class QVideoSink;
using namespace std::chrono;

Expand Down
1 change: 1 addition & 0 deletions src/MediaFX/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <QCoreApplication>
#include <QDebug>
#include <QEvent>
#include <QGuiApplication>
#include <QMessageLogContext>
#include <QObject>
#include <QQmlEngine>
Expand Down
15 changes: 5 additions & 10 deletions tests/qml/sequence.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ MediaSequence {
id: sequence

mediaTransitions: [
T.CrossFade {
},
T.CrossFade {},
T.Wipe {
direction: T.Wipe.Direction.Down
blindsEffect: 0.05
Expand All @@ -25,10 +24,8 @@ MediaSequence {
direction: T.Wipe.Direction.Left
blindsEffect: 0.05
},
T.PageCurl {
},
Demo3DTransition {
}
T.PageCurl {},
Demo3DTransition {}
]

Component.onCompleted: {
Expand All @@ -55,12 +52,10 @@ MediaSequence {
MediaClip {
endTime: 3000
source: Qt.resolvedUrl("../fixtures/assets/edjustforyou-320x180-15fps-5.2s-44100.nut")
audioRenderer: AudioRenderer {
}
audioRenderer: AudioRenderer {}
}
MediaClip {
source: Qt.resolvedUrl("../fixtures/assets/edquestions-320x180-15fps-2.4s-44100.nut")
audioRenderer: AudioRenderer {
}
audioRenderer: AudioRenderer {}
}
}

0 comments on commit c2b4299

Please sign in to comment.