2022-04-10 21:05:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-12-30 06:54:14 +00:00
|
|
|
if [ "$#" -ne 1 ]; then
|
|
|
|
echo "Syntax: $0 <output directory>"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-04-14 19:11:45 +00:00
|
|
|
# The bundled ffmpeg has a lot of things disabled to reduce code size.
|
|
|
|
# Users may want to use system ffmpeg for additional features
|
|
|
|
: ${BUILD_FFMPEG:=1}
|
|
|
|
|
2023-10-13 11:35:41 +00:00
|
|
|
export MACOSX_DEPLOYMENT_TARGET=11.0
|
2022-12-27 11:10:02 +00:00
|
|
|
|
2022-04-10 21:05:37 +00:00
|
|
|
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
2024-04-06 06:54:17 +00:00
|
|
|
SCRIPTDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
|
2024-03-28 06:33:55 +00:00
|
|
|
INSTALLDIR="$1"
|
|
|
|
if [ "${INSTALLDIR:0:1}" != "/" ]; then
|
|
|
|
INSTALLDIR="$PWD/$INSTALLDIR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
FREETYPE=2.13.2
|
|
|
|
HARFBUZZ=8.3.1
|
2024-06-17 20:44:07 +00:00
|
|
|
SDL=SDL2-2.30.4
|
2023-12-30 06:54:14 +00:00
|
|
|
ZSTD=1.5.5
|
|
|
|
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
2024-03-28 06:33:55 +00:00
|
|
|
LIBPNG=1.6.43
|
|
|
|
LIBJPEG=9f
|
|
|
|
LIBWEBP=1.3.2
|
2023-06-27 05:24:31 +00:00
|
|
|
FFMPEG=6.0
|
2024-02-04 15:33:33 +00:00
|
|
|
MOLTENVK=1.2.8
|
2024-05-21 02:32:19 +00:00
|
|
|
QT=6.7.1
|
2022-04-10 21:05:37 +00:00
|
|
|
|
2024-05-21 02:42:45 +00:00
|
|
|
SHADERC=2024.1
|
|
|
|
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
|
|
|
|
SHADERC_SPIRVHEADERS=5e3ad389ee56fca27c9705d093ae5387ce404df4
|
|
|
|
SHADERC_SPIRVTOOLS=dd4b663e13c07fea4fbb3f70c1c91c86731099f7
|
2024-04-06 06:54:17 +00:00
|
|
|
|
2023-12-30 06:54:14 +00:00
|
|
|
mkdir -p deps-build
|
2022-04-10 21:05:37 +00:00
|
|
|
cd deps-build
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
|
2023-12-30 06:54:14 +00:00
|
|
|
export LDFLAGS="-L$INSTALLDIR/lib $LDFLAGS"
|
|
|
|
export CFLAGS="-I$INSTALLDIR/include $CFLAGS"
|
|
|
|
export CXXFLAGS="-I$INSTALLDIR/include $CXXFLAGS"
|
2024-03-17 20:42:58 +00:00
|
|
|
CMAKE_COMMON=(
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
2024-04-15 00:15:34 +00:00
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="-dead_strip -dead_strip_dylibs"
|
2024-03-17 20:42:58 +00:00
|
|
|
-DCMAKE_PREFIX_PATH="$INSTALLDIR"
|
|
|
|
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR"
|
|
|
|
-DCMAKE_OSX_ARCHITECTURES="x86_64"
|
2024-03-17 20:45:37 +00:00
|
|
|
-DCMAKE_INSTALL_NAME_DIR='$<INSTALL_PREFIX>/lib'
|
2024-03-17 20:42:58 +00:00
|
|
|
)
|
2022-04-10 21:05:37 +00:00
|
|
|
|
|
|
|
cat > SHASUMS <<EOF
|
2024-03-28 06:33:55 +00:00
|
|
|
12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d freetype-$FREETYPE.tar.xz
|
|
|
|
19a54fe9596f7a47c502549fce8e8a10978c697203774008cc173f8360b19a9a harfbuzz-$HARFBUZZ.tar.gz
|
2024-06-17 20:44:07 +00:00
|
|
|
59c89d0ed40d4efb23b7318aa29fe7039dbbc098334b14f17f1e7e561da31a26 $SDL.tar.gz
|
2023-12-30 06:54:14 +00:00
|
|
|
9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4 zstd-$ZSTD.tar.gz
|
|
|
|
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
2024-03-28 06:33:55 +00:00
|
|
|
6a5ca0652392a2d7c9db2ae5b40210843c0bbc081cbd410825ab00cc59f14a6c libpng-$LIBPNG.tar.xz
|
|
|
|
2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562aa09b4 libwebp-$LIBWEBP.tar.gz
|
|
|
|
04705c110cb2469caa79fb71fba3d7bf834914706e9641a4589485c1f832565b jpegsrc.v$LIBJPEG.tar.gz
|
2023-06-27 05:24:31 +00:00
|
|
|
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
2024-02-04 15:33:33 +00:00
|
|
|
85beaf8abfcc54d9da0ff0257ae311abd9e7aa96e53da37e1c37d6bc04ac83cd v$MOLTENVK.tar.gz
|
2024-05-21 02:32:19 +00:00
|
|
|
b7338da1bdccb4d861e714efffaa83f174dfe37e194916bfd7ec82279a6ace19 qtbase-everywhere-src-$QT.tar.xz
|
|
|
|
a733b98f771064d000476b8861f822143982749448ba8abf9f1813edb8dfe79f qtimageformats-everywhere-src-$QT.tar.xz
|
|
|
|
3ed5b80f7228c41dd463b7a57284ed273d224d1c323c0dd78c5209635807cbce qtsvg-everywhere-src-$QT.tar.xz
|
|
|
|
0953cddf6248f3959279a10904892e8a98eb3e463d729a174b6fc47febd99824 qttools-everywhere-src-$QT.tar.xz
|
|
|
|
03d71565872b0e0e7303349071df031ab0f922f6dbdd3a5ec1ade9e188e4fbf4 qttranslations-everywhere-src-$QT.tar.xz
|
2024-05-21 02:42:45 +00:00
|
|
|
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
|
|
|
|
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
|
|
|
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
|
|
|
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
2022-04-10 21:05:37 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
curl -L \
|
2024-05-21 02:45:28 +00:00
|
|
|
-o "freetype-$FREETYPE.tar.xz" "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz/download" \
|
2024-03-28 06:33:55 +00:00
|
|
|
-o "harfbuzz-$HARFBUZZ.tar.gz" "https://github.com/harfbuzz/harfbuzz/archive/refs/tags/$HARFBUZZ.tar.gz" \
|
2022-04-10 21:05:37 +00:00
|
|
|
-O "https://libsdl.org/release/$SDL.tar.gz" \
|
2023-12-30 06:54:14 +00:00
|
|
|
-O "https://github.com/facebook/zstd/releases/download/v$ZSTD/zstd-$ZSTD.tar.gz" \
|
|
|
|
-O "https://github.com/lz4/lz4/archive/$LZ4.tar.gz" \
|
2024-03-28 06:33:55 +00:00
|
|
|
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
|
|
|
|
-O "https://ijg.org/files/jpegsrc.v$LIBJPEG.tar.gz" \
|
|
|
|
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
|
2023-06-27 05:24:31 +00:00
|
|
|
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
|
2024-02-04 15:33:33 +00:00
|
|
|
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
|
2022-05-26 05:30:00 +00:00
|
|
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
2023-07-22 06:09:31 +00:00
|
|
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
2022-06-04 21:17:15 +00:00
|
|
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
2022-05-26 05:30:00 +00:00
|
|
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
|
|
|
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
2024-04-06 06:54:17 +00:00
|
|
|
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
|
|
|
|
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
|
|
|
|
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
|
|
|
|
-o "shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Tools/archive/$SHADERC_SPIRVTOOLS.tar.gz"
|
2022-04-10 21:05:37 +00:00
|
|
|
|
|
|
|
shasum -a 256 --check SHASUMS
|
|
|
|
|
|
|
|
echo "Installing SDL..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "$SDL"
|
2022-04-10 21:05:37 +00:00
|
|
|
tar xf "$SDL.tar.gz"
|
|
|
|
cd "$SDL"
|
2024-03-17 20:42:58 +00:00
|
|
|
cmake -B build "${CMAKE_COMMON[@]}" -DSDL_X11=OFF -DBUILD_SHARED_LIBS=ON
|
2023-09-07 03:12:43 +00:00
|
|
|
make -C build "-j$NPROCS"
|
|
|
|
make -C build install
|
2022-04-10 21:05:37 +00:00
|
|
|
cd ..
|
|
|
|
|
2024-04-14 19:11:45 +00:00
|
|
|
if [ "$BUILD_FFMPEG" -ne 0 ]; then
|
|
|
|
echo "Installing FFmpeg..."
|
|
|
|
rm -fr "ffmpeg-$FFMPEG"
|
|
|
|
tar xf "ffmpeg-$FFMPEG.tar.xz"
|
|
|
|
cd "ffmpeg-$FFMPEG"
|
|
|
|
LDFLAGS="-dead_strip $LDFLAGS" CFLAGS="-Os $CFLAGS" CXXFLAGS="-Os $CXXFLAGS" \
|
|
|
|
./configure --prefix="$INSTALLDIR" \
|
|
|
|
--enable-cross-compile --arch=x86_64 --cc='clang -arch x86_64' --cxx='clang++ -arch x86_64' \
|
|
|
|
--disable-all --disable-autodetect --disable-static --enable-shared \
|
|
|
|
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \
|
|
|
|
--enable-audiotoolbox --enable-videotoolbox \
|
|
|
|
--enable-encoder=ffv1,qtrle,pcm_s16be,pcm_s16le,*_at,*_videotoolbox \
|
|
|
|
--enable-muxer=avi,matroska,mov,mp3,mp4,wav \
|
|
|
|
--enable-protocol=file
|
|
|
|
make "-j$NPROCS"
|
|
|
|
make install
|
|
|
|
cd ..
|
|
|
|
fi
|
2022-05-26 05:30:00 +00:00
|
|
|
|
2023-12-30 06:54:14 +00:00
|
|
|
echo "Installing Zstd..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "zstd-$ZSTD"
|
2023-12-30 06:54:14 +00:00
|
|
|
tar xf "zstd-$ZSTD.tar.gz"
|
|
|
|
cd "zstd-$ZSTD"
|
2024-03-17 20:42:58 +00:00
|
|
|
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DZSTD_BUILD_PROGRAMS=OFF -B build-dir build/cmake
|
2023-12-30 06:54:14 +00:00
|
|
|
make -C build-dir "-j$NPROCS"
|
|
|
|
make -C build-dir install
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Installing LZ4..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "lz4-$LZ4"
|
2023-12-30 06:54:14 +00:00
|
|
|
tar xf "$LZ4.tar.gz"
|
|
|
|
cd "lz4-$LZ4"
|
2024-03-17 20:42:58 +00:00
|
|
|
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DLZ4_BUILD_CLI=OFF -DLZ4_BUILD_LEGACY_LZ4C=OFF -B build-dir build/cmake
|
2023-12-30 06:54:14 +00:00
|
|
|
make -C build-dir "-j$NPROCS"
|
|
|
|
make -C build-dir install
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Installing libpng..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "libpng-$LIBPNG"
|
|
|
|
tar xf "libpng-$LIBPNG.tar.xz"
|
|
|
|
cd "libpng-$LIBPNG"
|
2024-04-14 23:28:54 +00:00
|
|
|
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DPNG_TESTS=OFF -DPNG_FRAMEWORK=OFF -B build
|
2023-12-30 06:54:14 +00:00
|
|
|
make -C build "-j$NPROCS"
|
|
|
|
make -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-03-28 06:33:55 +00:00
|
|
|
echo "Installing libjpeg..."
|
|
|
|
rm -fr "jpeg-$LIBJPEG"
|
|
|
|
tar xf "jpegsrc.v$LIBJPEG.tar.gz"
|
|
|
|
cd "jpeg-$LIBJPEG"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
../configure --prefix="$INSTALLDIR" --disable-static --enable-shared --host="x86_64-apple-darwin" CFLAGS="-arch x86_64"
|
|
|
|
make "-j$NPROCS"
|
|
|
|
make install
|
|
|
|
cd ../..
|
|
|
|
|
2023-12-30 06:54:14 +00:00
|
|
|
echo "Installing WebP..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "libwebp-$LIBWEBP"
|
|
|
|
tar xf "libwebp-$LIBWEBP.tar.gz"
|
|
|
|
cd "libwebp-$LIBWEBP"
|
2024-03-17 20:42:58 +00:00
|
|
|
cmake "${CMAKE_COMMON[@]}" -B build \
|
2023-12-30 06:54:14 +00:00
|
|
|
-DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF \
|
|
|
|
-DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DBUILD_SHARED_LIBS=ON
|
|
|
|
make -C build "-j$NPROCS"
|
|
|
|
make -C build install
|
|
|
|
cd ..
|
|
|
|
|
2024-03-28 06:33:55 +00:00
|
|
|
echo "Building FreeType without HarfBuzz..."
|
|
|
|
rm -fr "freetype-$FREETYPE"
|
|
|
|
tar xf "freetype-$FREETYPE.tar.xz"
|
|
|
|
cd "freetype-$FREETYPE"
|
|
|
|
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build
|
|
|
|
cmake --build build --parallel
|
|
|
|
cmake --install build
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Building HarfBuzz..."
|
|
|
|
rm -fr "harfbuzz-$HARFBUZZ"
|
|
|
|
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
|
|
|
|
cd "harfbuzz-$HARFBUZZ"
|
|
|
|
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -B build
|
|
|
|
cmake --build build --parallel
|
|
|
|
cmake --install build
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo "Building FreeType with HarfBuzz..."
|
|
|
|
rm -fr "freetype-$FREETYPE"
|
|
|
|
tar xf "freetype-$FREETYPE.tar.xz"
|
|
|
|
cd "freetype-$FREETYPE"
|
|
|
|
cmake "${CMAKE_COMMON[@]}" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build
|
|
|
|
cmake --build build --parallel
|
|
|
|
cmake --install build
|
|
|
|
cd ..
|
|
|
|
|
2024-02-04 15:33:33 +00:00
|
|
|
# MoltenVK already builds universal binaries, nothing special to do here.
|
|
|
|
echo "Installing MoltenVK..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "MoltenVK-${MOLTENVK}"
|
2024-02-04 15:33:33 +00:00
|
|
|
tar xf "v$MOLTENVK.tar.gz"
|
|
|
|
cd "MoltenVK-${MOLTENVK}"
|
2024-04-14 21:19:19 +00:00
|
|
|
sed -i '' 's/xcodebuild "$@"/xcodebuild $XCODEBUILD_EXTRA_ARGS "$@"/g' fetchDependencies
|
|
|
|
sed -i '' 's/XCODEBUILD :=/XCODEBUILD ?=/g' Makefile
|
|
|
|
XCODEBUILD_EXTRA_ARGS="VALID_ARCHS=x86_64" ./fetchDependencies --macos
|
|
|
|
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos
|
2024-02-04 15:33:33 +00:00
|
|
|
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
|
|
|
|
cd ..
|
|
|
|
|
2023-01-01 06:04:13 +00:00
|
|
|
echo "Installing Qt Base..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "qtbase-everywhere-src-$QT"
|
2023-01-01 06:04:13 +00:00
|
|
|
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtbase-everywhere-src-$QT"
|
2024-05-21 02:36:25 +00:00
|
|
|
|
2023-12-25 07:20:23 +00:00
|
|
|
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
|
|
|
|
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
|
|
|
|
# We could run macdeployqt twice, but that's even more janky than patching it.
|
2024-05-21 02:36:25 +00:00
|
|
|
|
|
|
|
# https://github.com/qt/qtbase/commit/7b018629c3c3ab23665bf1da00c43c1546042035
|
|
|
|
# The QProcess default wait time of 30s may be too short in e.g. CI environments where processes may be blocked
|
|
|
|
# for a longer time waiting for CPU or IO.
|
|
|
|
|
2023-12-25 07:20:23 +00:00
|
|
|
patch -u src/tools/macdeployqt/shared/shared.cpp <<EOF
|
|
|
|
--- shared.cpp
|
|
|
|
+++ shared.cpp
|
2024-05-21 02:36:25 +00:00
|
|
|
@@ -152,7 +152,7 @@
|
|
|
|
LogDebug() << " inspecting" << binaryPath;
|
|
|
|
QProcess otool;
|
|
|
|
otool.start("otool", QStringList() << "-L" << binaryPath);
|
|
|
|
- otool.waitForFinished();
|
|
|
|
+ otool.waitForFinished(-1);
|
|
|
|
|
|
|
|
if (otool.exitStatus() != QProcess::NormalExit || otool.exitCode() != 0) {
|
|
|
|
LogError() << otool.readAllStandardError();
|
|
|
|
@@ -1122,14 +1122,8 @@
|
2023-12-25 07:20:23 +00:00
|
|
|
addPlugins(QStringLiteral("networkinformation"));
|
|
|
|
}
|
|
|
|
|
|
|
|
- // All image formats (svg if QtSvg is used)
|
|
|
|
- const bool usesSvg = deploymentInfo.containsModule("Svg", libInfix);
|
|
|
|
- addPlugins(QStringLiteral("imageformats"), [usesSvg](const QString &lib) {
|
|
|
|
- if (lib.contains(QStringLiteral("qsvg")) && !usesSvg)
|
|
|
|
- return false;
|
|
|
|
- return true;
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
+ // All image formats
|
|
|
|
+ addPlugins(QStringLiteral("imageformats"));
|
|
|
|
addPlugins(QStringLiteral("iconengines"));
|
|
|
|
|
|
|
|
// Platforminputcontext plugins if QtGui is in use
|
|
|
|
EOF
|
2024-03-28 06:33:55 +00:00
|
|
|
cmake -B build "${CMAKE_COMMON[@]}" -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
|
2023-01-01 06:04:13 +00:00
|
|
|
make -C build "-j$NPROCS"
|
|
|
|
make -C build install
|
|
|
|
cd ..
|
2023-12-30 06:54:14 +00:00
|
|
|
|
2023-01-01 06:04:13 +00:00
|
|
|
echo "Installing Qt SVG..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "qtsvg-everywhere-src-$QT"
|
2023-01-01 06:04:13 +00:00
|
|
|
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtsvg-everywhere-src-$QT"
|
2023-12-30 06:54:14 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-03-17 20:42:58 +00:00
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
|
2023-12-30 06:54:14 +00:00
|
|
|
make "-j$NPROCS"
|
|
|
|
make install
|
|
|
|
cd ../..
|
|
|
|
|
2023-07-22 06:09:31 +00:00
|
|
|
echo "Installing Qt Image Formats..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "qtimageformats-everywhere-src-$QT"
|
2023-07-22 06:09:31 +00:00
|
|
|
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qtimageformats-everywhere-src-$QT"
|
2023-12-30 06:54:14 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-03-28 06:33:55 +00:00
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_system_webp=ON
|
2023-12-30 06:54:14 +00:00
|
|
|
make "-j$NPROCS"
|
|
|
|
make install
|
|
|
|
cd ../..
|
|
|
|
|
2023-01-01 06:04:13 +00:00
|
|
|
echo "Installing Qt Tools..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "qttools-everywhere-src-$QT"
|
2023-01-01 06:04:13 +00:00
|
|
|
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qttools-everywhere-src-$QT"
|
|
|
|
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
|
|
|
|
# Avoid it by not building Linguist, since we only need the tools that come with it
|
|
|
|
patch -u src/linguist/CMakeLists.txt <<EOF
|
2022-05-26 05:30:00 +00:00
|
|
|
--- src/linguist/CMakeLists.txt
|
|
|
|
+++ src/linguist/CMakeLists.txt
|
|
|
|
@@ -14,7 +14,7 @@
|
|
|
|
add_subdirectory(lrelease-pro)
|
|
|
|
add_subdirectory(lupdate)
|
|
|
|
add_subdirectory(lupdate-pro)
|
|
|
|
-if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
|
|
|
|
+if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND TARGET Qt::PrintSupport AND NOT no-png)
|
|
|
|
add_subdirectory(linguist)
|
|
|
|
endif()
|
|
|
|
EOF
|
2023-12-30 06:54:14 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-03-17 20:42:58 +00:00
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
2023-12-30 06:54:14 +00:00
|
|
|
make "-j$NPROCS"
|
2024-03-28 06:33:55 +00:00
|
|
|
make install
|
2023-12-30 06:54:14 +00:00
|
|
|
cd ../..
|
|
|
|
|
2024-04-06 06:54:17 +00:00
|
|
|
echo "Building shaderc..."
|
|
|
|
rm -fr "shaderc-$SHADERC"
|
|
|
|
tar xf "shaderc-$SHADERC.tar.gz"
|
|
|
|
cd "shaderc-$SHADERC"
|
|
|
|
cd third_party
|
|
|
|
tar xf "../../shaderc-glslang-$SHADERC_GLSLANG.tar.gz"
|
|
|
|
mv "glslang-$SHADERC_GLSLANG" "glslang"
|
|
|
|
tar xf "../../shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz"
|
|
|
|
mv "SPIRV-Headers-$SHADERC_SPIRVHEADERS" "spirv-headers"
|
|
|
|
tar xf "../../shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz"
|
|
|
|
mv "SPIRV-Tools-$SHADERC_SPIRVTOOLS" "spirv-tools"
|
|
|
|
cd ..
|
2024-04-12 11:57:10 +00:00
|
|
|
patch -p1 < "$SCRIPTDIR/../common/shaderc-changes.patch"
|
2024-04-06 06:54:17 +00:00
|
|
|
cmake "${CMAKE_COMMON[@]}" "$CMAKE_ARCH_UNIVERSAL" -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON -DSHADERC_SKIP_COPYRIGHT_CHECK=ON -B build
|
|
|
|
make -C build "-j$NPROCS"
|
|
|
|
make -C build install
|
|
|
|
cd ..
|
|
|
|
|
2023-01-01 06:04:13 +00:00
|
|
|
echo "Installing Qt Translations..."
|
2024-03-28 06:33:55 +00:00
|
|
|
rm -fr "qttranslations-everywhere-src-$QT"
|
2023-01-01 06:04:13 +00:00
|
|
|
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
|
|
|
|
cd "qttranslations-everywhere-src-$QT"
|
2023-12-30 06:54:14 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-03-17 20:42:58 +00:00
|
|
|
"$INSTALLDIR/bin/qt-configure-module" .. -- "${CMAKE_COMMON[@]}"
|
2023-12-30 06:54:14 +00:00
|
|
|
make "-j$NPROCS"
|
|
|
|
make install
|
|
|
|
cd ../..
|
2022-04-10 21:05:37 +00:00
|
|
|
|
|
|
|
echo "Cleaning up..."
|
|
|
|
cd ..
|
2023-12-30 06:54:14 +00:00
|
|
|
rm -rf deps-build
|