Skip to content

Commit

Permalink
refactor to use shared mediafx-build.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Jan 14, 2024
1 parent 957ef9c commit d9b31f4
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.21)

project(mediaFX VERSION 1.0.0 LANGUAGES CXX)

find_package(Qt6 REQUIRED COMPONENTS Core Gui Multimedia Qml Quick ShaderTools QUIET OPTIONAL_COMPONENTS Quick3D WebEngineQuick)
find_package(Qt6 6.6 REQUIRED COMPONENTS Core Gui Multimedia Qml Quick ShaderTools QUIET OPTIONAL_COMPONENTS Quick3D WebEngineQuick)

qt_standard_project_setup()
qt_policy(SET QTP0001 NEW)
Expand Down
5 changes: 5 additions & 0 deletions builders/Darwin/env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) 2024 Andrew Wason
# SPDX-License-Identifier: GPL-3.0-or-later

export QTDIR=${BUILD_ROOT}/installed/${QT_VER}/macos
export PATH=${QTDIR}/bin:$PATH
13 changes: 7 additions & 6 deletions builders/Darwin/install-qt6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ set -u

CURRENT=${BASH_SOURCE%/*}
source "$CURRENT/../versions"
INSTALLDIR=${QTDIR%/*/*}
(
mkdir -p "${BUILD_ROOT:?}" && cd "$BUILD_ROOT"
python3 -m venv --clear "build/qtvenv" || exit 1
"build/qtvenv/bin/pip" install --upgrade --upgrade-strategy eager aqtinstall || exit 1
"build/qtvenv/bin/python" -m aqt install-qt mac desktop ${QT_VER} --modules qtmultimedia qtquick3d qtshadertools qtquicktimeline qtquickeffectmaker -O "$BUILD_ROOT/installed" || exit 1
"build/qtvenv/bin/python" -m aqt install-tool mac desktop tools_qtcreator_gui qt.tools.qtcreator_gui -O "$BUILD_ROOT/installed/${QT_VER}/macos/bin" || exit 1
"build/qtvenv/bin/python" -m aqt install-src mac desktop ${QT_VER} --archives qtbase qtdeclarative qtmultimedia qtquicktimeline -O "$BUILD_ROOT/installed" || exit 1
cd "$BUILD_ROOT"
python3 -m venv --clear "qtvenv" || exit 1
"qtvenv/bin/pip" install --upgrade --upgrade-strategy eager aqtinstall || exit 1
"qtvenv/bin/python" -m aqt install-qt mac desktop ${QT_VER} --modules qtmultimedia qtquick3d qtshadertools qtquicktimeline qtquickeffectmaker -O "${INSTALLDIR}" || exit 1
"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
)
21 changes: 0 additions & 21 deletions builders/Darwin/mediafx-build.sh

This file was deleted.

4 changes: 2 additions & 2 deletions builders/Linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN apt-get -y update \
fontconfig fonts-liberation

COPY --from=build /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
ENV QT_VER=${QT_VER}

Expand All @@ -51,4 +51,4 @@ WORKDIR /mediafx/build/Linux
COPY entrypoint.sh xvfb.sh /entrypoint/

ENTRYPOINT ["/entrypoint/entrypoint.sh"]
CMD ["/mediafx/builders/Linux/mediafx-build.sh"]
CMD ["/mediafx/builders/mediafx-build.sh"]
2 changes: 1 addition & 1 deletion builders/Linux/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2023 Andrew Wason
# SPDX-License-Identifier: GPL-3.0-or-later

MOUNT="$(dirname $(dirname "$(cd "${BASH_SOURCE%/*}"; pwd)"))"
MOUNT="$(cd "${BASH_SOURCE%/*/*/*}"; pwd)"

# opengl or vulkan
TARGET=${TARGET:-opengl}
Expand Down
6 changes: 6 additions & 0 deletions builders/Linux/env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (C) 2024 Andrew Wason
# SPDX-License-Identifier: GPL-3.0-or-later

export GALLIUM_DRIVER=softpipe
export LIBGL_ALWAYS_SOFTWARE=1
export DRI_NO_MSAA=1
17 changes: 0 additions & 17 deletions builders/Linux/mediafx-build.sh

This file was deleted.

15 changes: 15 additions & 0 deletions builders/mediafx-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Copyright (C) 2023 Andrew Wason
# SPDX-License-Identifier: GPL-3.0-or-later

CURRENT=${BASH_SOURCE%/*}
source "$CURRENT/versions"

BUILD_TYPE=${BUILD_TYPE:-Release}
MEDIAFX_BUILD="${BUILD_ROOT}/${BUILD_TYPE}"
mkdir -p "$MEDIAFX_BUILD"
cd "$MEDIAFX_BUILD"
(cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE --install-prefix "${QTDIR}" ../../.. && cmake --build . && cmake --install .) || exit 1
if [[ -v MEDIAFX_TEST ]]; then
make test CTEST_OUTPUT_ON_FAILURE=1 ARGS="${MEDIAFX_TEST}" || exit 1
fi
1 change: 1 addition & 0 deletions builders/versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export QT_VER=6.6.1
BUILD_ROOT="${BASH_SOURCE%/*}/../build/$(uname)"
mkdir -p "${BUILD_ROOT}"
export BUILD_ROOT=$(cd "${BUILD_ROOT}"; pwd)
source "${BASH_SOURCE%/*}/$(uname)/env"

0 comments on commit d9b31f4

Please sign in to comment.