#!/bin/bash set -e export MACOSX_DEPLOYMENT_TARGET=11.0 INSTALLDIR="$HOME/deps" NPROCS="$(getconf _NPROCESSORS_ONLN)" SDL=SDL2-2.28.5 PNG=1.6.37 JPG=9e FFMPEG=6.0 QT=6.6.0 mkdir deps-build cd deps-build export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH" export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS" export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS" export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS" cat > SHASUMS < #import int main() { return 0; }" HAVE_FRAMEWORK_COREHAPTICS) - if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS) + if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS AND FALSE) # Only enable MFI if we also have CoreHaptics to ensure rumble works set(SDL_JOYSTICK_MFI 1) set(SDL_FRAMEWORK_GAMECONTROLLER 1) EOF cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSDL_X11=OFF make -C build "-j$NPROCS" make -C build install cd .. echo "Installing libpng..." tar xf "libpng-$PNG.tar.xz" cd "libpng-$PNG" ./configure --prefix "$INSTALLDIR" --disable-dependency-tracking make "-j$NPROCS" make install cd .. echo "Installing FFmpeg..." tar xf "ffmpeg-$FFMPEG.tar.xz" cd "ffmpeg-$FFMPEG" ./configure --prefix="$INSTALLDIR" --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 .. echo "Installing Qt Base..." tar xf "qtbase-everywhere-src-$QT.tar.xz" cd "qtbase-everywhere-src-$QT" # 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. patch -u src/tools/macdeployqt/shared/shared.cpp <