forked from damiensellier/CtrlrX
-
Notifications
You must be signed in to change notification settings - Fork 0
guide: Compiling Ctrlr on Windows
UnityConstruct edited this page Feb 9, 2024
·
2 revisions
- This document describes the steps I took to compile Ctrlr with Visual Studio 2019 on Windows 10.
- Disclaimer: I’m primarily a Mac/Apple user, so I’m probably not able to answer typical technical Windows/Visual Studio questions.
- Below is the About
Ctrlrwindow of the compiled version.

The publishing date of this version is: April 8, 2021
My version of Visual Studio 2019 is: 16.9.4 and I installed it for the following 2 workloads:
• Universal Windows Platform development;
• Desktop development with C++.
I did use Windows 10 Pro English running virtual on my iMac with VMWare Fusion. I did use a fresh (but rather old) installment of Windows 10 and before I could install and run Visual Studio 19, I had to do every update available for Windows 10. (My copy of Windows 10 dates back from August 2015 and was originally probable too old.)

- The first thing you have to do of course is download the latest master from the
Ctrlr Github[https://github.com/RomanKubiak/ctrlr]. First step you have to after downloading is unzippingboost.zip - You will find this file in
..\ctrlr-master\Source\Misc\boost\ - Just unzip it and do nothing further.
- If the compiler complains you need to run shell scripts, otherwise you're lucky and may skip this part and continue with the section
Using the Projucer app! - I refer to this comment of
Roman Kubiak: [https://github.com/RomanKubiak/ctrlr/commit/c1f67d2f4033cb9f5dd20a123854fcddcd99b81d] - This means that part of compiling
Ctrlris first running so called shell scripts (files with extension .sh). - These scripts only run in a Unix-like environment and from the terminal.
-
Cygwin64does provide this functionality for Windows, so first thing I had to do was installingCygwin64: [https://cygwin.com] - In the
Ctrlrfolder I found 2 .sh files. I decided to run both, because both seem to address the “final” issue.
- Open
Cygwin64 Terminal. Typecd(without the quotes) and drag yourCtrlrfolder into the terminal window and hitENTER. This way you set the terminal to theCtrlrdirectory. - Next type ‘bash’, again without the quotes, and drag the script file ‘remove_finals_from_JUCE.sh (located in the scripts folder) into the terminal window and hit
ENTER. A long list of files scrolls by. - The window looks like this:

- Do the same with the script file
remove_final.shfound in theJUCEdirectory. - I’m not sure if this is really needed, but it seemed not doing any harm.
- Projucer is needed as an intermediate step to load the
Ctrlrproject properly intoVisual Studio. - So after you have downloaded and installed
JUCEgo to theJUCEfolder, where you’ll findProjucer.exe. - Start the program.
- Before you export to Visual Studio make sure you set the right
global paths. -
Path to JUCEis the path to theJucefolder in yourctrlr-masterfolder. -
Path to JUCE Modulesis the path to the modules folder inside theJucefolder of thectrlr-masterfolder.

- Now choose
File>Open... and pick the file:\ctrlr-master\Ctrlr.jucer - This file contains all the (source) files you need to build Ctrlr. Click on the export button of Projucer.
-
Visual Studiowill start and the Ctrlr project is loaded.
- First step in building is to build the
Ctrlr_SharedCode. - Before you can do the actual building you have to adjust some settings in
Visual Studio. - The first one is the set the
Preferred Build Tool Architectureto64-bit (x64).

- Choose option
Propertiesand in thePropertieswindowchoose Advancedand set thearchitecture:

- The second setting has to do with the so called
C/C++ Output File. - Before you set this, make sure you have selected the
Ctrlr_SharedCodeitem in theSolution Explorerside pane, because the setting will affect this item.

- Now go again to
Project>Properties(the same menu option when setting theBuild Architecture, see above) and chooseC/C++> Output Files>Program Database file Name, and choose (or in case of not showing the text, type):<inherit from parent or project defaults>

- This has to be done because of the problem discussed here.
- Click
OKand set the build toReleaseandx64, you may choose otherwise:

- Next start the actual building:

- After a few minutes and many warnings, mostly of type
C4459, if all is well the build succeeds. Next task is building theCtrlr_StandalonePluginproject.
- In fact the procedure for building this plugin is pretty much the same as for the
Ctrlr_SharedCodeproject. - First you select in the
Solution ExplorertheCtrlr_StandalonePluginitem and then make sure that firstly thePreferred Build Tool Architecture is set to 64-bit (x64)as explained in the build forCtrlr_SharedCodesection above and secondly theProgram Database File Name for the C/C++ Output Fileis set to<inherit from parent or project defaults> - After this settings you can build the plugin, which takes a rather long time, so be patient.
- If again all is well, the build succeeds.
- You will find the generated
Ctrlr-x64.exein:..\ctrlr-master\Builds\VisualStudio2019\x64\Release\Standalone Plugin\ - So this is the build for
CTRLR 64-bit. Building for32-bitdoes succeed only in Debug mode, but this build gives problems when running on a computer withoutVisual Studioinstalled or the proper redistributableVC_redist.x86for the32-bitarchitecture installed. - (See my post further down in this thread about running the application without an installment of
Visual Studio.)
- I did test the application on my laptop with
Windows 7, using a simpleUSB MIDIinterface. - The interface was connected to my
Kurzweil K2500R. - The panel for this instrument loaded OK and the
K2500Rresponded as expected to the various sysex messages send from this panel. - I will test this build further and keep you of course posted about my findings.