Skip to content

Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.

C
2.9 KB
Raw Blame
#!/bin/sh
# Builds the simulator harness (sim/main.m): AudioEffects.x generated by logos with the internal generator as
# the tweak builds it, its settings, libraries and engine, Shared/Player's SpeedPitch.x, which keeps Spotify's
# outputs apart and tells the effects which is the music's, and the third-party C (vendor/audio, made here
# first), in an app whose main executable is the harness, so the rebinding of Spotify's audio imports takes as
# it does in Spotify.
#   THEOS=$HOME/theos ./build-sim.sh
set -e
cd "$(dirname "$0")"
SRC=../../tweak/Sources
FX=$SRC/Shared/AudioEffects
VENDOR=../../vendor/audio
OUT=build/sim
make -s -C "$VENDOR" PLATFORM=sim -j8
rm -rf "$OUT"
mkdir -p "$OUT/gen" "$OUT/AudioEffectsHarness.app"
"$THEOS/bin/logos.pl" -c generator=internal "$FX/AudioEffects.x" > "$OUT/gen/AudioEffects.m"
"$THEOS/bin/logos.pl" -c generator=internal "$SRC/Shared/Player/SpeedPitch.x" > "$OUT/gen/SpeedPitch.m"
SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)
xcrun -sdk iphonesimulator clang -target arm64-apple-ios17.0-simulator -fobjc-arc -g -O1 -isysroot "$SDK" -Wno-deprecated-declarations \
    -I"$SRC" -I"$FX" -I"$SRC/Shared/Player" -isystem "$VENDOR/libbs2b" -isystem "$VENDOR/wdl/eel2" \
    sim/main.m ../scene.m "$OUT/gen/AudioEffects.m" "$OUT/gen/SpeedPitch.m" "$SRC/Shared/Player/SGTimePitch.m" "$FX/AudioEffectsSettings.m" "$FX/AudioEffectsFiles.m" "$FX/AudioEffectsPresets.m" "$FX/AutoEq.m" "$FX"/SGDSPEngine.m "$FX"/SGDSPFilters.m \
    "$FX"/SGDSPConvolver.m "$FX"/SGDSPTone.m "$FX"/SGDSPDynamics.m "$FX"/SGDSPCrossfeed.m "$FX"/SGDSPReverb.m "$FX"/SGDSPLiveprog.m \
    "$SRC/Core/SGRebind.m" "$SRC/Core/SGLog.m" "$SRC/Core/SGPrefs.m" "$SRC/Core/SGUIMode.m" "$SRC/Core/SGFlagForce.m" "$VENDOR/build/sim/libsgaudio.a" \
    -framework UIKit -framework AudioToolbox -framework AVFoundation -framework Accelerate -framework Foundation \
    -o "$OUT/AudioEffectsHarness.app/AudioEffectsHarness"
cat > "$OUT/AudioEffectsHarness.app/Info.plist" <<'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
<key>CFBundleExecutable</key><string>AudioEffectsHarness</string>
<key>CFBundleIdentifier</key><string>com.vojta.audioeffectsharness</string>
<key>CFBundleName</key><string>AudioEffectsHarness</string>
<key>CFBundleVersion</key><string>1</string>
<key>CFBundleShortVersionString</key><string>1.0</string>
<key>UILaunchScreen</key><dict/>
<key>UIApplicationSceneManifest</key><dict>
  <key>UIApplicationSupportsMultipleScenes</key><false/>
  <key>UISceneConfigurations</key><dict>
    <key>UIWindowSceneSessionRoleApplication</key><array><dict>
      <key>UISceneConfigurationName</key><string>Default</string>
      <key>UISceneDelegateClassName</key><string>SGRHarnessScene</string>
    </dict></array>
  </dict>
</dict>
</dict></plist>
PLIST
echo "built $OUT/AudioEffectsHarness.app"