Created
September 4, 2025 15:30
-
-
Save NotWadeGrimridge/ee22a880c119fb2f825b43f74910c73f to your computer and use it in GitHub Desktop.
Setup qaac on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # go to https://store.rg-adguard.net/ | |
| # paste this in https://apps.microsoft.com/detail/9pktq5699m62 | |
| # find the entry that's named like "AppleInc.iCloud_*_x64_*.appx" | |
| # paste the link below | |
| ITUNES_URL="" | |
| # update these if you like (latest as of 04 sept 2025) | |
| QAAC_URL="https://github.com/nu774/qaac/releases/download/v2.85/qaac_2.85.zip" | |
| FLAC_URL="https://github.com/xiph/flac/releases/download/1.5.0/flac-1.5.0-win.zip" | |
| WAVPACK_URL="https://github.com/dbry/WavPack/releases/download/5.8.1/wavpack-5.8.0-dll.zip" | |
| LIBSNDFILE_URL="https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win64.zip" | |
| # don't change anything below | |
| for cmd in 7z wine winetricks curl; do | |
| if ! command -v "$cmd" &>/dev/null; then | |
| echo "Error: Required command '$cmd' is not installed." >&2 | |
| exit 1 | |
| fi | |
| done | |
| if [ -z "$ITUNES_URL" ]; then | |
| echo "Error: ITUNES_URL is not set. Open the script for instructions." >&2 | |
| exit 1 | |
| fi | |
| echo "Setting up qaac environment..." | |
| TMP_DIR="$HOME/.tmp_qaac" | |
| QAAC_DIR="$HOME/.wine/drive_c/qaac" | |
| mkdir -p "$TMP_DIR" | |
| mkdir -p "$QAAC_DIR" | |
| echo "Downloading qaac..." | |
| QAAC_ZIP="$TMP_DIR/qaac.zip" | |
| curl -fsSL -o "$QAAC_ZIP" -C - "$QAAC_URL" | |
| 7z x -y "$QAAC_ZIP" -o"$TMP_DIR/qaac_extracted" "qaac_*/x64/*" >/dev/null | |
| mv "$TMP_DIR"/qaac_extracted/qaac_*/x64/* "$QAAC_DIR/" | |
| echo "Downloading iTunes dependencies..." | |
| ITUNES_APPX="$TMP_DIR/itunes.appx" | |
| curl -fsSL -o "$ITUNES_APPX" -C - "$ITUNES_URL" | |
| 7z e -y -r "$ITUNES_APPX" \ | |
| -o"$QAAC_DIR" \ | |
| -i'!*ASL.dll' \ | |
| -i'!*CoreAudioToolbox.dll' \ | |
| -i'!*CoreFoundation.dll' \ | |
| -i'!*icudt*.dll' \ | |
| -i'!*libdispatch.dll' \ | |
| -i'!*libicu*.dll' \ | |
| -i'!*objc.dll' >/dev/null | |
| echo "Downloading FLAC libs..." | |
| FLAC_ZIP="$TMP_DIR/flac.zip" | |
| curl -fsSL -o "$FLAC_ZIP" -C - "$FLAC_URL" | |
| 7z x -y "$FLAC_ZIP" -o"$TMP_DIR/flac_extracted" "flac-*-win/Win64/*dll" >/dev/null | |
| mv "$TMP_DIR"/flac_extracted/flac-*-win/Win64/*dll "$QAAC_DIR/" | |
| echo "Downloading WavPack libs..." | |
| WAVPACK_ZIP="$TMP_DIR/wavpack.zip" | |
| curl -fsSL -o "$WAVPACK_ZIP" -C - "$WAVPACK_URL" | |
| 7z x -y "$WAVPACK_ZIP" -o"$TMP_DIR/wavpack_extracted" "x64/wavpackdll.dll" >/dev/null | |
| mv "$TMP_DIR"/wavpack_extracted/x64/wavpackdll.dll "$QAAC_DIR/" | |
| echo "Downloading libsndfile..." | |
| LIBSNDFILE_ZIP="$TMP_DIR/libsndfile.zip" | |
| curl -fsSL -o "$LIBSNDFILE_ZIP" -C - "$LIBSNDFILE_URL" | |
| 7z x -y "$LIBSNDFILE_ZIP" -o"$TMP_DIR/libsndfile_extracted" "libsndfile-*-win64/bin/sndfile.dll" >/dev/null | |
| mv "$TMP_DIR"/libsndfile_extracted/libsndfile-*-win64/bin/sndfile.dll "$QAAC_DIR/" | |
| echo "Downloading VC++ 2022 runtime..." | |
| WINEDEBUG=-all winetricks -q vcrun2022 &>/dev/null | |
| echo "Testing qaac installation..." | |
| echo "\$ WINEDEBUG=-all wine ~/.wine/drive_c/qaac/qaac64.exe --check" | |
| echo "-----" | |
| WINEDEBUG=-all wine ~/.wine/drive_c/qaac/qaac64.exe --check | |
| echo "-----" | |
| read -p "Clean up temporary directory (~/.tmp_qaac)? [Y/n] " -n 1 -r | |
| echo | |
| if [[ ! $REPLY =~ ^[Nn]$ ]]; then | |
| rm -rf "$TMP_DIR" | |
| echo "Temporary directory cleaned up." | |
| fi | |
| echo "Add this alias for quick access:" | |
| echo "alias qaac=\"WINEDEBUG=-all wine ~/.wine/drive_c/qaac/qaac64.exe\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment