1. Download the sdplayer 2.00 source code, and extract its files into a directory.
2. Download and install Qt if you don't already have it. It doesn't matter where you install it, but note in particular the path to the qmake program it will include for clang. For me, that was <base Qt directory>/<version number>/clang_64/bin/qmake.
3. Download and install VLC if you don't already have it. If you somehow install this somewhere other than /Applications/VLC.app, change the paths in (5) and (8) below.
4. If you have a relatively recent version of Qt, which I believe means a version starting with 5: in the line "#include <QtGui/QApplication>" in main.cpp, replace "QtGui" with "QtWidgets", and in the line "QT += core gui" in SdPlayer.pro, replace "gui" with "widgets"
5. Add the following section at the bottom of SdPlayer.pro:
macx {
INCLUDEPATH += "/Applications/VLC.app/Contents/MacOS/include"
# path to vlc libraries
LIBS += -L"/Applications/VLC.app/Contents/MacOS/lib"
LIBS += -lvlc
}
6. Run <path to qmake> -makefile -macx -o Makefile SdPlayer.pro
7. Run make clean && make
8. Now the weirdest step. I understand very little of this entire install process, but this one the least. Run otool -L SdPlayer.app/Contents/MacOS/SdPlayer and note the line about libvlc, or try to run ./SdPlayer.app/Contents/MacOS/SdPlayer and note which .dylib file it complains about (for me it is @loader_path/lib/libvlc.5.dylib). Then use that <bad path> to run:
7. Run make clean && make
8. Now the weirdest step. I understand very little of this entire install process, but this one the least. Run otool -L SdPlayer.app/Contents/MacOS/SdPlayer and note the line about libvlc, or try to run ./SdPlayer.app/Contents/MacOS/SdPlayer and note which .dylib file it complains about (for me it is @loader_path/lib/libvlc.5.dylib). Then use that <bad path> to run:
install_name_tool -change <bad path> /Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib SdPlayer.app/Contents/MacOS/SdPlayer
And then you should be able to run sdplayer either from the command line, from Finder, or from Spotlight (once it finds it). Enjoy!
No comments:
Post a Comment