Created
February 17, 2016 20:58
-
-
Save ratijas/2d4224fcc3fe80a3b7e7 to your computer and use it in GitHub Desktop.
decoding .ogg music files with XLD
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/sh | |
# copyright 2016 Ratijas & Mac-J studio | |
# WTF Public Licence | |
# sadly, XLD still does not support .ogg files decoding out of the box. | |
# there's instruction with outdated download link: https://hydrogenaud.io/index.php/topic,81239.0.html, | |
# so here we'll recreate all necessary steps needed to patch up your XLD installation. | |
# we will need git, svn and Xcode (with command line tools) | |
# REWRITE following line if your XLD.app is not at /Applications | |
XLD=/Applications/XLD.app | |
# exit on any error | |
set -e | |
# get a copy of project's fork with XLDVorbisDecoder | |
rm -rf xld >/dev/null 2>&1 || true | |
git clone https://github.com/zwaldowski/xld.git | |
cd xld | |
# at this point `cd XLDVorbisDecoder && xcodebuild` should fail with error: | |
# ld: warning: directory not found for option '-F~/xld/XLDVorbisDecoder/../xld_frameworks' | |
# ld: framework not found Ogg | |
# | |
# so, let's bring Ogg.framework, and Vorbis.framework as well. | |
# i managed to found them here: https://github.com/VDrift/vdrift-mac/tree/master/Frameworks | |
# but git does not support downloading only particular directory, | |
# that's why we will use svn instead. | |
mkdir xld_frameworks | |
cd xld_frameworks | |
svn checkout https://github.com/VDrift/vdrift-mac/trunk/Frameworks/Vorbis.framework | |
svn checkout https://github.com/VDrift/vdrift-mac/trunk/Frameworks/Ogg.framework | |
# note: if this is your first time using svn with Github, it may ask you to manually | |
# verify certificate fingerprint. last time checked, it was: | |
# a0:c4:a7:46:00:ed:a7:2d:c0:be:cb:9a:8c:b6:07:ca:58:ee:74:5e | |
# if matches, answer with 'p' and <enter>. | |
cd .. | |
cd XLDVorbisDecoder | |
xcodebuild | |
# this time you should see ** BUILD SUCCEEDED ** | |
# install bundle | |
cp -r build/Release/XLDVorbisDecoder.bundle "$XLD"/Contents/PlugIns/ | |
# now, you may try to run XLD, and if you're lucky, you'll see message like this in console: | |
# 18.02.16 3:52:12,170 XLD[38126]: Error loading $XLD/Contents/PlugIns/XLDVorbisDecoder.bundle/Contents/MacOS/XLDVorbisDecoder: dlopen($XLD/Contents/PlugIns/XLDVorbisDecoder.bundle/Contents/MacOS/XLDVorbisDecoder, 265): Library not loaded: @executable_path/../Frameworks/Vorbis.framework/Versions/1.3/Vorbis | |
# Referenced from: $XLD/Contents/PlugIns/XLDVorbisDecoder.bundle/Contents/MacOS/XLDVorbisDecoder | |
# Reason: image not found | |
# | |
# so, let's fix libraries versions | |
cd .. | |
cd xld_frameworks | |
cp -r Ogg.framework/Versions/1.3 "$XLD"/Contents/Frameworks/Ogg.framework/Versions/1.3 | |
cp -r Vorbis.framework/Versions/1.3 "$XLD"/Contents/Frameworks/Vorbis.framework/Versions/1.3 | |
killall XLD >/dev/null 2>&1 || true | |
open "$XLD" | |
echo "now your XLD should be familiar with decoding .ogg files!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Sappharad - your build here works perfectly in XLD 32bit, there is a 64bit beta now - I tried to build it again with 64bit support but I ran into lots of build errors and I had no idea how to swap out openSSL for Apple's Base64 decoder - would you be able to attempt to do a build with 64bit support?