Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Unify Qt submodule builds for macos/win/linux. #232

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions qtox/build_qtbase_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ parse_arch --dep "qtbase" --supported "linux-x86_64" "$@"
export CXXFLAGS="-DQT_MESSAGELOGCONTEXT"
export OBJCXXFLAGS="$CXXFLAGS"

mkdir -p qtbase/_build
pushd qtbase/_build
../configure -prefix "$DEP_PREFIX/qt" \
mkdir -p _build
pushd _build
../configure \
-prefix "$QT_PREFIX" \
-appstore-compliant \
-release \
"-$LIB_TYPE" \
Expand Down
9 changes: 4 additions & 5 deletions qtox/build_qtbase_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ source "$SCRIPT_DIR/download/version_qt.sh"

parse_arch --dep "qtbase" --supported "macos-arm64 macos-x86_64" "$@"

"$SCRIPT_DIR/download/download_qtbase.sh"

export CXXFLAGS="-DQT_MESSAGELOGCONTEXT"
export OBJCXXFLAGS="$CXXFLAGS"

Expand All @@ -28,9 +30,7 @@ else
QT_FORCE_DEBUG_INFO="-no-force-debug-info"
fi

tar Jxf <(curl -L "https://download.qt.io/archive/qt/$(echo "$QT_VERSION" | grep -o '...')/$QT_VERSION/submodules/qtbase-everywhere-src-$QT_VERSION.tar.xz")
rm -rf qtbase && mv "qtbase-everywhere-src-$QT_VERSION" qtbase && cd qtbase
rm -rf _build && mkdir _build && cd _build
mkdir _build && pushd _build
../configure \
--prefix="$QT_PREFIX" \
-appstore-compliant \
Expand Down Expand Up @@ -61,5 +61,4 @@ rm -rf _build && mkdir _build && cd _build
cat config.summary
cmake --build .
cmake --install .
cd ../..
rm -rf qtbase
popd
5 changes: 3 additions & 2 deletions qtox/build_qtbase_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ parse_arch --dep "qt" --supported "win32 win64" "$@"
CROSS_COMPILE="$MINGW_ARCH-w64-mingw32-"
"${CROSS_COMPILE}gcc" --version

mkdir qtbase/_build && pushd qtbase/_build
../configure -prefix "$DEP_PREFIX" \
mkdir _build && pushd _build
../configure \
-prefix "$QT_PREFIX" \
-appstore-compliant \
-release \
-shared \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ readonly SCRIPT_DIR="$(dirname "$(realpath "$0")")"

source "$SCRIPT_DIR/build_utils.sh"

parse_arch --dep "qt" --supported "win32 win64" "$@"
parse_arch --dep "qtimageformats" --supported "linux-x86_64 macos-arm64 macos-x86_64 win32 win64" "$@"

"$SCRIPT_DIR/download/download_qtimageformats.sh"

mkdir qtimageformats/_build && pushd qtimageformats/_build
"$DEP_PREFIX/bin/qt-configure-module" .. \
mkdir _build && pushd _build
"$QT_PREFIX/bin/qt-configure-module" .. \
-- \
-DCMAKE_CXX_FLAGS="-DQT_MESSAGELOGCONTEXT" \
-Wno-dev
Expand Down
28 changes: 0 additions & 28 deletions qtox/build_qtimageformats_linux.sh

This file was deleted.

28 changes: 0 additions & 28 deletions qtox/build_qtimageformats_macos.sh

This file was deleted.

23 changes: 23 additions & 0 deletions qtox/build_qtremoteobjects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright © 2024-2025 The TokTok team

set -euxo pipefail

readonly SCRIPT_DIR="$(dirname "$(realpath "$0")")"

source "$SCRIPT_DIR/build_utils.sh"

parse_arch --dep "qtremoteobjects" --supported "linux-x86_64 macos-arm64 macos-x86_64 win32 win64" "$@"

"$SCRIPT_DIR/download/download_qtremoteobjects.sh"

mkdir _build && pushd _build
"$QT_PREFIX/bin/qt-configure-module" .. \
-- \
-DCMAKE_CXX_FLAGS="-DQT_MESSAGELOGCONTEXT" \
-Wno-dev
cmake --build .
cmake --install .
popd
10 changes: 4 additions & 6 deletions qtox/build_qtsvg_linux.sh → qtox/build_qtsvg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ readonly SCRIPT_DIR="$(dirname "$(realpath "$0")")"

source "$SCRIPT_DIR/build_utils.sh"

parse_arch --dep "qtsvg" --supported "linux-x86_64" "$@"
parse_arch --dep "qtsvg" --supported "linux-x86_64 macos-arm64 macos-x86_64 win32 win64" "$@"

"$SCRIPT_DIR/download/download_qtsvg.sh"

export CXXFLAGS="-DQT_MESSAGELOGCONTEXT"
export OBJCXXFLAGS="$CXXFLAGS"

mkdir qtsvg/_build && pushd qtsvg/_build
"$DEP_PREFIX/qt/bin/qt-configure-module" .. \
mkdir _build && pushd _build
"$QT_PREFIX/bin/qt-configure-module" .. \
-- \
-DCMAKE_CXX_FLAGS="-DQT_MESSAGELOGCONTEXT" \
-Wno-dev
cmake --build .
cmake --install .
Expand Down
28 changes: 0 additions & 28 deletions qtox/build_qtsvg_macos.sh

This file was deleted.

25 changes: 0 additions & 25 deletions qtox/build_qtsvg_windows.sh

This file was deleted.

6 changes: 3 additions & 3 deletions qtox/build_qttools_windows.sh → qtox/build_qttools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ readonly SCRIPT_DIR="$(dirname "$(realpath "$0")")"

source "$SCRIPT_DIR/build_utils.sh"

parse_arch --dep "qt" --supported "win32 win64" "$@"
parse_arch --dep "qttools" --supported "linux-x86_64 macos-arm64 macos-x86_64 win32 win64" "$@"

"$SCRIPT_DIR/download/download_qttools.sh"

mkdir qttools/_build && pushd qttools/_build
"$DEP_PREFIX/bin/qt-configure-module" .. \
mkdir _build && pushd _build
"$QT_PREFIX/bin/qt-configure-module" .. \
-no-feature-assistant \
-no-feature-designer \
-no-feature-kmap2qmap \
Expand Down
35 changes: 0 additions & 35 deletions qtox/build_qttools_linux.sh

This file was deleted.

38 changes: 0 additions & 38 deletions qtox/build_qttools_macos.sh

This file was deleted.

4 changes: 2 additions & 2 deletions qtox/build_qtwayland_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ parse_arch --dep "qtwayland" --supported "linux-x86_64" "$@"
export CXXFLAGS="-DQT_MESSAGELOGCONTEXT"
export OBJCXXFLAGS="$CXXFLAGS"

mkdir qtwayland/_build && pushd qtwayland/_build
"$DEP_PREFIX/qt/bin/qt-configure-module" .. \
mkdir _build && pushd _build
"$QT_PREFIX/bin/qt-configure-module" .. \
-- \
-Wno-dev
cmake --build .
Expand Down
2 changes: 1 addition & 1 deletion qtox/docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-3.0-or-later.
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright © 2024-2025 The TokTok team

FROM alpine:3.20
Expand Down
Loading
Loading