Skip to content

Windows Build (Qt5 & qmake)

Massimo Callegari edited this page Aug 14, 2023 · 1 revision

Prepare the build system (MSYS2)

Download the MSYS2 64bit installer from here: https://msys2.github.io/ (for 32bit systems like XP, use i686 installer).

Follow the instructions of that page otherwise install it using all the defaults (c:\msys64 or c:\msys32 for 32bit system), then open the MSYS2 shell and type:
update-core
Close the MSYS2 shell and open it again.
Now install the packages required to build QLC+, by typing:
pacman -Su
pacman -S make automake autoconf libtool mingw32/mingw-w64-i686-gcc mingw32/mingw-w64-i686-pkg-config mingw32/mingw-w64-i686-tools git
pacman -S mingw32/mingw-w64-i686-qt5 mingw32/mingw-w64-i686-libmad mingw32/mingw-w64-i686-libsndfile mingw32/mingw-w64-i686-flac mingw32/mingw-w64-i686-fftw

Now close the MSYS2 Shell. From now on we'll use the 'MinGW-w64 Win32 Shell'. So open it.

Acquire the QLC+ sources

These instructions suppose you have a folder called "Qt" in C:. If it doesn't exist, create it and 'cd' into it.

If you wish to get the latest released QLC+ version download the source tarball from here:
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), download the GitHub client or use the command line: git clone https://github.com/mcallegari/qlcplus.git

This will create a directory called qlcplus which will contain the latest sources from GIT repository. After you have made the initial clone and later wish to keep living on the bleeding egde, you can just update the sources (instead of making a new clone every time):

cd /c/Qt/qlcplus
git pull

Debug or release mode

If you are a developer and want to contribute to QLC+, the default settings will build a debug version of the program. Please note that a debug version is bigger than a release one and might have worse performances. If what you need is a production build, then you need to edit the variables.pri file and change the following lines, adding a += of the build you need and -= of the one you don't need:

CONFIG += release # Enable this when making a release
CONFIG -= debug # Disable this when making a release

DMX USB Support

To compile the DMX USB plugin, you need to:

Download the latest SDK from FTDI Driver page.
Install the package contents for example to C:\Qt\D2XXSDK
Edit /plugins/dmxusb/src/src.pro to point to the directory you picked:

FTD2XXDIR = C:/Qt/D2XXSDK

Since the SDK provided by ftdichip.com is not compatible with the MSYS2 system, it is necessary to manually create a compatible libftd2xx.a file that will be used at build time:
cd /c/Qt/D2XXSDK/i386
gendef.exe - ftd2xx.dll > ftd2xx.def
dlltool -k --input-def ftd2xx.def --dllname ftd2xx.dll --output-lib libftd2xx.a

If you don't need the DMX USB plugin and would like to disable building it completely, edit /plugins/plugins.pro and put a hash (#) on the line that says SUBDIRS += dmxusb:

#SUBDIRS += dmxusb

Velleman SDK

To compile the Velleman Output plugin, you need to:

Download the modified Velleman DLL
Extract the package contents for example to C:\Qt\K8062D
Edit /plugins/velleman/src/src.pro to point to the directory you picked:

K8062DDIR = C:/Qt/K8062D

To use the DLL during build time, it is necessary to manually create a compatible K8062D.a:
cd /c/Qt/K8062D
gendef.exe - K8062D.dll > K8062D.def
dlltool -k --input-def K8062D.def --dllname K8062D.dll --output-lib K8062D.a

If you don't need the Velleman Output plugin and would like to disable building it completely, edit /plugins/plugins.pro and put a hash (#) on the line that says SUBDIRS += velleman:

#SUBDIRS += velleman

Build QLC+

Now compile QLC+ by typing:
cd /c/Qt/qlcplus
qmake
make
make install

It will install QLC+ and all the required DLLs in C:\qlcplus.