-
-
Notifications
You must be signed in to change notification settings - Fork 367
macOS build Qt5
You need to download and install two components before you can compile QLC+ from sources on macOS:
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)
The Qt5 Framework
Download the latest Qt5 version via online installer: https://download.qt.io/official_releases/online_installers/
Install the framework where you want. In this guide we'll be using this path: /Users/myuser/Qt5.15.2
QLC+ and some plugins require additional external packages including: libusb, libftdi, protobuf, cppunit, libcrypt, libmicrohttpd, uuid, OLA, libmad, libsndfile and fftw3
These dependencies are easily available through macports.
Download macports package from macports.org and install it.
Then, open the macOS terminal application and type:
sudo port selfupdate
sudo port install libftdi0 pkgconfig libmad libsndfile fftw-3 ola
OLA build: in case OLA fails to install via macports, you might want to compile it from sources. To do so, follow the instructions here and at the end type:
./configure --prefix=/opt/local
make
sudo make install
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:
https://github.com/mcallegari/qlcplus/releases/latest/
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 qlc under your home directory (where the terminal usually starts at). It can take a while, depending on your internet connection speed.
QLC+ needs several external dependencies to be compiled with all the plugins support.
If you want to exclude some of them from the build process then just comment them out by placing the character #
at the beginning of the plugin line in the file plugins/plugins.pro
For example:
#unix:SUBDIRS += ola
After the sources have been cloned out from the GIT repository, issue these commands to start building QLC+:
export QTDIR=/Users/myuser/Qt5.15.2/5.15.2/clang_64
cd qlcplus
/Users/myuser/Qt5.15.2/5.15.2/clang_64/bin/qmake
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!
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! :)
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 in the dmg folder of the QLC+ sources tree. This script works also on non-built sources, so you just need to follow the steps above up to "cd qlcplus", right after "export QTDIR..."