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 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!" |
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?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@melgu The instructions are outdated and don't work with the latest version of XLD anyway.
I pulled the latest source code for the current version of XLD from sourceforge, the source actually still includes the Ogg decoder plug-in but the code for it hasn't been touched since the version this script pulls so that part doesn't matter. Here's a summary of what's wrong:
That's what's needed right now to build a working copy of the Ogg Decoder plug-in. But I suspect that this will only work for another year or so.
The bigger problem now is that High Sierra 10.13.4 was released today and it officially started warning that support for 32-bit apps is going to go away soon. I'm guessing macOS 10.14 this Fall might make it optional like Rosetta was in 10.6, and they'll probably remove it completely in late 2019. XLD's developer will need to eventually remove PPC support and add 64-bit Intel instead for it to continue working.
For anyone who wants it, here's the copy I just built that works against the current version of XLD as of this post along with the changes I made:
https://github.com/Sappharad/xld/releases/tag/20170729
I have no idea if it will actually work for anyone else, but I used it successfully. You don't need the source code, GitHub just packs that up automatically when you create a release.