Skip to content

OSX Build HOWTO

janosvitok edited this page May 18, 2015 · 20 revisions

QLC+ Installation from sources on Mac OSX using Qt4

Development environment

You need to download and install two components before you can compile QLC+ from sources on a Mac OSX:

Apple XCode development tools (just the Mac version will do, no need for iPhone stuff). Some recent versions might need to install Command Line Tools after base packet is installed (XCode->Preferences->Downloads)
Digia Qt Framework
NOTE: Qt 4.6.3 has some issues with its QFontDialog in OS X so you shouldn't use it any longer. Qt 4.8.x is nowadays the preferred Qt version. Note also that Qt no longer supports Leopard (10.5.x) and older Mac OS X versions.

Dependencies/Ports

QLC+ and some plugins require additional external packages including: libusb, libftdi, protobuf, cppunit, libcrypt, libmicrohttpd, uuid, OLA, libmad, libsndfile, portaudio, fftw3 and liblo

These dependencies are easily available through macports.

Download macports package from macports.org and install it.
Then, launch the terminal and type:
sudo port selfupdate
sudo port install libftdi0 pkgconfig libmad libsndfile portaudio liblo fftw-3 ola

OLA build: in case OLA fails to install via macports, you might want to compile it from sources. To do so, just download the latest version, extract it and type:
./configure --prefix=/opt/local
make
sudo make install

Ports & Helpers (Optional)

If you intend on doing a lot of development, cleaning often and recompiling everything, you might want to install ccache, which speeds up consequent compilations (after the first caching run) IMMENSELY.
sudo port install ccache
sudo ln -s /opt/local/bin/ccache /opt/local/bin/gcc
sudo ln -s /opt/local/bin/ccache /opt/local/bin/g++
sudo ln -s /opt/local/bin/ccache /opt/local/bin/cc
sudo ln -s /opt/local/bin/ccache /opt/local/bin/c++

Also, colordiff is a nice tool for seeing your changes (svn diff) in color:
sudo port install colordiff less

You might want to make an alias for qmake so that you only need to write "qmake" instead of "qmake -spec macx-g++" Edit ~/.profile and put this somewhere:
alias qmake="qmake -spec macx-g++"

Getting the sources from GIT

Open the terminal window (under Applications/Utilities in Finder) and write one of the following commands:

If you wish to get the latest released QLC+ version:
http://www.qlcplus.org/downloads.html/

If you wish to get the very latest bleeding edge (but only if your intention is to do development or are just curious):
git clone git://github.com/mcallegari/qlcplus.git

You might be asked to accept an SSL site certificate. After you have accepted it, the sources will be downloaded to a directory called qlcplus under your home directory (where the terminal usually starts at). It can take a while, depending on your internet connection speed.

Compiling

After the sources have been cloned from the GIT repository, issue these commands to start building QLC+:

cd qlcplus
qmake -spec macx-g++
make

You should see the terminal window fill up with compiler calls. Go grab a cup of your preferred beverage, as this can take anything from about a minute to several minutes, depending on your system performance. If you see any errors, please report it in the QLC+ forum (development forum).

Finally, make says something like "Nothing to be done for 'first'. That's it, you're done!

Installation

When QLC+ has been successfully compiled, you can install it into your home directory as QLC+.app by issuing the following command to the terminal:
make install

Don't worry; everything is installed inside this one application bundle in your home directory. Go to Finder and navigate to your home directory. You should see the QLC+ logo there and if you dare click it, QLC+ launcher should open. You can move the application bundle manually under Applications if you wish. Have fun! :)

Package creation

If you wish to create a distributable .dmg package, that doesn't require the presence of Qt SDK, XCode or macports, type the following commands after installation to your terminal window:
./create-dmg.sh

This creates an Apple .dmg package to the same directory you're currently in. If you haven't compiled and installed QLC+ prior to this step, the created package will not work, as it assumes that QLC+ has been installed to ~/QLC+.app/.