Skip to content

Fix macOS build #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 24 additions & 12 deletions Builds/MacOSX/Ctrlr.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Builds/MacOSX/Info-AU.plist
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<key>manufacturer</key>
<string>inSt</string>
<key>type</key>
<string>CtrlrAU</string>
<string>aumi</string>
<key>subtype</key>
<string>cTrl</string>
<key>version</key>
Expand Down
2 changes: 1 addition & 1 deletion Builds/MacOSX/Info-AUv3_AppExtension.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<key>manufacturer</key>
<string>inSt</string>
<key>type</key>
<string>CtrlrAU</string>
<string>aumi</string>
<key>subtype</key>
<string>cTrl</string>
<key>version</key>
Expand Down
6 changes: 3 additions & 3 deletions Ctrlr.jucer
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pluginIsSynth="1" pluginWantsMidiIn="1" pluginProducesMidiOut="1"
pluginIsMidiEffectPlugin="1" pluginEditorRequiresKeys="1" pluginAUExportPrefix="CtrlrAU"
pluginRTASCategory="" aaxIdentifier="com.instigator.Ctrlr" pluginAAXCategory="2"
companyName="Instigator" pluginAUMainType="CtrlrAU" pluginFormats="buildVST,buildVST3,buildAU,buildAUv3,buildStandalone"
companyName="Instigator" pluginFormats="buildVST,buildVST3,buildAU,buildAUv3,buildStandalone"
pluginCharacteristicsValue="pluginIsSynth,pluginWantsMidiIn,pluginProducesMidiOut,pluginIsMidiEffectPlugin,pluginEditorRequiresKeys"
jucerFormatVersion="1">
<MAINGROUP id="SRLsFb" name="Ctrlr">
Expand Down Expand Up @@ -1060,9 +1060,9 @@
enableGNUExtensions="0" extraCompilerFlags="-w">
<CONFIGURATIONS>
<CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Ctrlr"
headerPath="../../Source&#10;../../Source/Misc&#10;../../Source/Misc/include&#10;../../Source/Misc/lua/include&#10;../../Source/Misc/luabind&#10;../../Source/Misc/libusb/include&#10;../../Source/Misc/boost&#10;../../Source/MIDI&#10;../../Source/Core&#10;../../Source/Native&#10;../../Source/Plugin&#10;../../Source/UIComponents&#10;../../Source/Lua"/>
headerPath="../../Source&#10;../../Source/Misc&#10;../../Source/Misc/include&#10;../../Source/Misc/lua/include&#10;../../Source/Misc/luabind&#10;../../Source/Misc/libusb/include&#10;../../Source/Misc/boost&#10;../../Source/Misc/vst2sdk&#10;../../Source/MIDI&#10;../../Source/Core&#10;../../Source/Native&#10;../../Source/Plugin&#10;../../Source/UIComponents&#10;../../Source/Lua"/>
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Ctrlr"
headerPath="../../Source&#10;../../Source/Misc&#10;../../Source/Misc/include&#10;../../Source/Misc/lua/include&#10;../../Source/Misc/luabind&#10;../../Source/Misc/libusb/include&#10;../../Source/Misc/boost&#10;../../Source/MIDI&#10;../../Source/Core&#10;../../Source/Native&#10;../../Source/Plugin&#10;../../Source/UIComponents&#10;../../Source/Lua"
headerPath="../../Source&#10;../../Source/Misc&#10;../../Source/Misc/include&#10;../../Source/Misc/lua/include&#10;../../Source/Misc/luabind&#10;../../Source/Misc/libusb/include&#10;../../Source/Misc/boost&#10;../../Source/Misc/vst2sdk&#10;../../Source/MIDI&#10;../../Source/Core&#10;../../Source/Native&#10;../../Source/Plugin&#10;../../Source/UIComponents&#10;../../Source/Lua"
enablePluginBinaryCopyStep="0"/>
</CONFIGURATIONS>
<MODULEPATHS>
Expand Down
2 changes: 1 addition & 1 deletion JuceLibraryCode/JucePluginDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
#define JucePlugin_Vst3Category "Instrument|Synth"
#endif
#ifndef JucePlugin_AUMainType
#define JucePlugin_AUMainType CtrlrAU
#define JucePlugin_AUMainType 'aumi'
#endif
#ifndef JucePlugin_AUSubType
#define JucePlugin_AUSubType JucePlugin_PluginCode
Expand Down
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Control any MIDI enabled hardware: synthesizers, drum machines, samplers, effect

Cross Platform
==============
Works on Windows (XP and up, both 64 and 32bit binaries are available), MAC OSX (10.5 and up), Linux (any modern distro should run it).
Works on Windows (XP and up, both 64 and 32bit binaries are available), macOS (10.5 and up), Linux (any modern distro should run it).
Host in your DAW

Each platform has a VST build of Ctrlr so you can host your panels as normal VST plugins, for the OSX a special AU build is available.
Each platform has a VST build of Ctrlr so you can host your panels as normal VST plugins, for macOS a special AU build is available.

Customize
=========
Expand Down Expand Up @@ -71,15 +71,17 @@ The post-commit script takes an argument "clean" if you wish to clean all the in
files before building. If you want to ignore any package errors that it reports (i assume you
know your system better then my script) then just add -f as an option when building.

OSX
===
You need the CoreAudio developer files for the build to work.
macOS
=====
Unzip boost or link your own boost library e.g. from [Homebrew](https://brew.sh):

First you need to build the AU_wrapper library that simplifies the build a lot, it's located in
Builds/Generated/Mac/AU_Wrapper, it will create a .a library and try to put it in /usr/local/lib
if it fails, do that manualy (permission problems)
```
# use packaged boost library
cd Source/Misc/boost && unzip boost.zip
# alternatively, link your own
ln -s /opt/homebrew/Cellar/boost/BOOST_VERSION/include/boost Source/Misc/boost/boost
```

Open the corresponding Xcode project in Builds/Generated/Mac, after that just build it, in case of
errors you are on your own, the amount of changes between Xcode versions and OSX versions is impossible
for me to track, you can post an issue and i'll try to solve it.
Open the Xcode project `Builds/MacOSX/Ctrlr.xcodeproj` and build it.

In case of errors it might help to refresh the project files using Projuicer.
3 changes: 2 additions & 1 deletion Source/Native/CtrlrMac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "stdafx_luabind.h"
static const int zero=0;
#ifdef __APPLE__
#include <memory>
#include "CtrlrPanel/CtrlrPanel.h"
#include "CtrlrMac.h"
#include "CtrlrMacros.h"
Expand Down Expand Up @@ -126,7 +127,7 @@ const Result CtrlrMac::setBundleInfo (CtrlrPanel *sourceInfo, const File &bundle

if (plist.existsAsFile() && plist.hasWriteAccess())
{
ScopedPointer <XmlElement> plistXml (XmlDocument::parse(plist));
std::unique_ptr <XmlElement> plistXml (XmlDocument::parse(plist));
if (plistXml == nullptr)
{
return (Result::fail("MAC native, can't parse Info.plist as a XML document"));
Expand Down