git: bump to 2.36.0
[kiss-trunc88.git] / qaac / build
blobc441f626beb45f9d3a83ac432213809a978a2b2f
1 #!/bin/sh -e
3 extract_filename() {
4 if [ "$(head -c 2 "$1" | tr -d '\0')" = "MZ" ]; then
5 LC_ALL=C objdump -p "$f" 2>/dev/null | grep 'The Export Tables' -A 10 | awk '$1 == "Name" { print $3 }'
6 fi
9 mv win64 iTunes64Setup.exe ||:
10 7z e -y iTunes64Setup.exe iTunes64.msi
11 7z x -y iTunes64.msi
12 for f in fil*; do
13 filename=$(extract_filename "$f")
14 if [ -n "$filename" ]; then
15 echo "$filename"
16 mv "$f" "$filename"
18 done
20 mkdir -p "$1/usr/lib/qaac"
21 mkdir -p "$1/usr/bin"
23 unzip "qaac_$2.zip"
25 for f in qaac64.exe refalac64.exe; do
26 cp "qaac_$2/x64/$f" "$1/usr/lib/qaac/"
27 done
29 for f in libsoxconvolver64.dll libsoxr64.dll; do
30 cp "qaac_$2/x64/$f" "$1/usr/lib/qaac/"
31 chmod 644 "$1/usr/lib/qaac/$f"
32 done
34 #for f in ASL.dll CoreAudioToolbox.dll CoreFoundation.dll "$(find . -name 'icudt*.dll' -printf '%f')" libdispatch.dll libicuin.dll libicuuc.dll objc.dll; do
35 for f in ASL.dll CoreAudioToolbox.dll CoreFoundation.dll "$(find . -name 'icudt*.dll' -print0)" libdispatch.dll libicuin.dll libicuuc.dll objc.dll; do
36 cp "$f" "$1/usr/lib/qaac/"
37 done
39 unzip flac_dll-1.3.4-x64.zip -d flac/
40 cp flac/libFLAC_dynamic.dll "$1/usr/lib/qaac/"
42 unzip wavpack-5.4.0-dll.zip -d wavpack/
43 cp wavpack/x64/wavpackdll.dll "$1/usr/lib/qaac/"
45 unzip libsndfile-1.0.31-win64.zip
46 cp libsndfile-1.0.31-win64/bin/sndfile.dll "$1/usr/lib/qaac/"
48 cp wrapper.sh "$1/usr/lib/qaac/"
49 ln -s ../lib/qaac/wrapper.sh "$1/usr/bin/qaac"
50 ln -s ../lib/qaac/wrapper.sh "$1/usr/bin/refalac"