-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
make it compile and work under Linux #151
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ ifeq ($(CONFIG),Debug) | |
|
||
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -fPIC -g -ggdb -O0 -w $(CFLAGS) | ||
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=gnu++14 $(CXXFLAGS) | ||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lz -ludev -lbfd $(LDFLAGS) | ||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lz -ludev -lbfd $(LDFLAGS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. x11 is still needed |
||
|
||
CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) | ||
endif | ||
|
@@ -104,7 +104,7 @@ ifeq ($(CONFIG),Release) | |
|
||
JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH) -fPIC -O3 -w $(CFLAGS) | ||
JUCE_CXXFLAGS += $(JUCE_CFLAGS) -std=gnu++14 $(CXXFLAGS) | ||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lz -ludev -lbfd $(LDFLAGS) | ||
JUCE_LDFLAGS += $(TARGET_ARCH) -L$(JUCE_BINDIR) -L$(JUCE_LIBDIR) $(shell pkg-config --libs alsa x11 freetype2 libcurl) -fvisibility=hidden -lrt -ldl -lpthread -lz -ludev -lbfd $(LDFLAGS) | ||
|
||
CLEANCMD = rm -rf $(JUCE_OUTDIR)/$(TARGET) $(JUCE_OBJDIR) | ||
endif | ||
|
@@ -333,13 +333,12 @@ OBJECTS_SHARED_CODE := \ | |
all : VST VST3 Standalone | ||
|
||
VST : $(JUCE_OUTDIR)/$(JUCE_TARGET_VST) | ||
VST3 : $(JUCE_OUTDIR)/$(JUCE_TARGET_VST3) | ||
Standalone : $(JUCE_OUTDIR)/$(JUCE_TARGET_STANDALONE_PLUGIN) | ||
|
||
|
||
$(JUCE_OUTDIR)/$(JUCE_TARGET_VST) : $(OBJECTS_VST) $(RESOURCES) $(JUCE_OUTDIR)/$(JUCE_TARGET_SHARED_CODE) | ||
@command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } | ||
@pkg-config --print-errors alsa freetype2 libcurl | ||
@pkg-config --print-errors alsa x11 freetype2 libcurl | ||
@echo Linking "Ctrlr - VST" | ||
-$(V_AT)mkdir -p $(JUCE_BINDIR) | ||
-$(V_AT)mkdir -p $(JUCE_LIBDIR) | ||
|
@@ -348,21 +347,9 @@ $(JUCE_OUTDIR)/$(JUCE_TARGET_VST) : $(OBJECTS_VST) $(RESOURCES) $(JUCE_OUTDIR)/$ | |
-$(V_AT)mkdir -p $(JUCE_VSTDESTDIR) | ||
-$(V_AT)cp -R $(JUCE_COPYCMD_VST) | ||
|
||
$(JUCE_OUTDIR)/$(JUCE_TARGET_VST3) : $(OBJECTS_VST3) $(RESOURCES) $(JUCE_OUTDIR)/$(JUCE_TARGET_SHARED_CODE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these parts in the Makefile gives errors, Is VST3 Relevant for Linux at all? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I'd think this is a bug in Projucer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Why would VST3 not be "relevant" for Linux? |
||
@command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } | ||
@pkg-config --print-errors alsa freetype2 libcurl | ||
@echo Linking "Ctrlr - VST3" | ||
-$(V_AT)mkdir -p $(JUCE_BINDIR) | ||
-$(V_AT)mkdir -p $(JUCE_LIBDIR) | ||
-$(V_AT)mkdir -p $(JUCE_OUTDIR) | ||
-$(V_AT)mkdir -p $(JUCE_OUTDIR)/$(JUCE_VST3DIR)/$(JUCE_VST3SUBDIR) | ||
$(V_AT)$(CXX) -o $(JUCE_OUTDIR)/$(JUCE_TARGET_VST3) $(OBJECTS_VST3) $(JUCE_OUTDIR)/$(JUCE_TARGET_SHARED_CODE) $(JUCE_LDFLAGS) $(JUCE_LDFLAGS_VST3) $(RESOURCES) $(TARGET_ARCH) | ||
-$(V_AT)mkdir -p $(JUCE_VST3DESTDIR) | ||
-$(V_AT)cp -R $(JUCE_COPYCMD_VST3) | ||
|
||
$(JUCE_OUTDIR)/$(JUCE_TARGET_STANDALONE_PLUGIN) : $(OBJECTS_STANDALONE_PLUGIN) $(RESOURCES) $(JUCE_OUTDIR)/$(JUCE_TARGET_SHARED_CODE) | ||
@command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } | ||
@pkg-config --print-errors alsa freetype2 libcurl | ||
@pkg-config --print-errors alsa x11 freetype2 libcurl | ||
@echo Linking "Ctrlr - Standalone Plugin" | ||
-$(V_AT)mkdir -p $(JUCE_BINDIR) | ||
-$(V_AT)mkdir -p $(JUCE_LIBDIR) | ||
|
@@ -371,7 +358,7 @@ $(JUCE_OUTDIR)/$(JUCE_TARGET_STANDALONE_PLUGIN) : $(OBJECTS_STANDALONE_PLUGIN) $ | |
|
||
$(JUCE_OUTDIR)/$(JUCE_TARGET_SHARED_CODE) : $(OBJECTS_SHARED_CODE) $(RESOURCES) | ||
@command -v pkg-config >/dev/null 2>&1 || { echo >&2 "pkg-config not installed. Please, install it."; exit 1; } | ||
@pkg-config --print-errors alsa freetype2 libcurl | ||
@pkg-config --print-errors alsa x11 freetype2 libcurl | ||
@echo Linking "Ctrlr - Shared Code" | ||
-$(V_AT)mkdir -p $(JUCE_BINDIR) | ||
-$(V_AT)mkdir -p $(JUCE_LIBDIR) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ echo "CTRLR[linux]: Building for $HOSTTYPE, JOBS $MAXJOBS" | |
if [ "$1" == "-f" ]; then | ||
echo "CTRLR[linux]: Compile PCH" | ||
echo "stadfx.h" | ||
g++ -w -std=c++14 -D "LINUX=1" -D "NDEBUG=1" \ | ||
-D "JUCE_FORCE_DEBUG=0" -D "CTRLR_NIGHTLY=1" \ | ||
g++ -w -std=c++14 -D "LINUX=1" -D "NDEBUG=0" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. application does nut run in release mode. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Debug settings should not be changed in this patch. |
||
-D "JUCE_FORCE_DEBUG=1" -D "CTRLR_NIGHTLY=1" \ | ||
-D "JucePlugin_Build_Standalone" -D "LUA_USE_LINUX" \ | ||
-D "_LINUX=1" -D "JUCER_LINUX_MAKE_CC96CACF=1" \ | ||
-I /usr/include -I /usr/include/freetype2 \ | ||
|
@@ -22,8 +22,8 @@ if [ "$1" == "-f" ]; then | |
-march=native -Os -fpermissive \ | ||
-o "../../Source/Core/stdafx.h.gch" -c "../../Source/Core/stdafx.h" | ||
echo "stdafx_luabind.h" | ||
g++ -w -std=c++14 -D "LINUX=1" -D "NDEBUG=1" \ | ||
-D "JUCE_FORCE_DEBUG=0" -D "CTRLR_NIGHTLY=1" \ | ||
g++ -w -std=c++14 -D "LINUX=1" -D "NDEBUG=0" \ | ||
-D "JUCE_FORCE_DEBUG=1" -D "CTRLR_NIGHTLY=1" \ | ||
-D "JucePlugin_Build_Standalone" -D "LUA_USE_LINUX" \ | ||
-D "_LINUX=1" -D "JUCER_LINUX_MAKE_CC96CACF=1" \ | ||
-I /usr/include -I /usr/include/freetype2 \ | ||
|
@@ -46,7 +46,7 @@ fi | |
echo "CTRLR[linux]: Build now" | ||
echo | ||
#make -j$JOBS CONFIG=Release ARCH=$HOSTTYPE BINDIR=$BUILDDIR LIBDIR=$BUILDDIR OBJDIR=$BUILDDIR | ||
make CONFIG=Release -j$MAXJOBS | ||
make CONFIG=Debug -j$MAXJOBS | ||
if [ $? -ne 0 ]; then | ||
echo -e "CTRLR[linux]: build failed\n" | ||
exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A patch that fixes a particular issue should not contain anything else, especitally debug or non-debug. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef __CTRLR_REVISION__ | ||
#define __CTRLR_REVISION__ | ||
|
||
static const char *ctrlrRevision = "5.6.0"; | ||
static const char *ctrlrRevisionDate = "Wed, Jan 27, 2021 3:40:04 PM"; | ||
|
||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the version change necessary? Are you shure, that you want to step by two ? |
||
#ifndef __CTRLR_REVISION__ | ||
#define __CTRLR_REVISION__ | ||
static const char *ctrlrRevision = "5.6.2"; | ||
static const char *ctrlrRevisionDate = "Di 2. Feb 16:43:27 CET 2021"; | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
#include "CtrlrProcessor.h" | ||
#include "CtrlrLog.h" | ||
|
||
CtrlrMIDIDevice::CtrlrMIDIDevice(CtrlrMIDIDeviceManager &_owner, const int idx, const String name, const bool type) | ||
CtrlrMIDIDevice::CtrlrMIDIDevice(CtrlrMIDIDeviceManager &_owner, const int idx, const String name, const String identifier, const bool type) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The identifier is needed to open the port |
||
: deviceTree(Ids::midiDev), | ||
owner(_owner), | ||
outJucePtr(nullptr), | ||
|
@@ -19,6 +19,7 @@ CtrlrMIDIDevice::CtrlrMIDIDevice(CtrlrMIDIDeviceManager &_owner, const int idx, | |
|
||
setProperty (Ids::midiDevState, STP); | ||
setProperty (Ids::name, name); | ||
setProperty (Ids::midiDevId, identifier ); | ||
setProperty (Ids::midiDevIndex, idx); | ||
setProperty (Ids::midiDevType, type); | ||
|
||
|
@@ -51,7 +52,7 @@ bool CtrlrMIDIDevice::openDevice() | |
|
||
const ScopedLock sl(deviceLock); | ||
|
||
outJucePtr = MidiOutput::openDevice (getProperty(Ids::midiDevIndex).toString()).release(); | ||
outJucePtr = MidiOutput::openDevice (getProperty(Ids::midiDevId).toString()).release(); | ||
if (outJucePtr == NULL) | ||
{ | ||
_ERR("CtrlrMIDIDevice::openDevice failed to open device \""+getName()+"\""); | ||
|
@@ -72,7 +73,7 @@ bool CtrlrMIDIDevice::openDevice() | |
return (true); | ||
} | ||
|
||
inJucePtr = MidiInput::openDevice (getProperty(Ids::midiDevIndex).toString(), this).release(); | ||
inJucePtr = MidiInput::openDevice (getProperty(Ids::midiDevId).toString(), this).release(); | ||
|
||
if (inJucePtr == NULL) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,32 +272,32 @@ const StringArray CtrlrMIDIDeviceManager::getManagedDevices(const CtrlrMIDIDevic | |
|
||
void CtrlrMIDIDeviceManager::refreshDevices() | ||
{ | ||
// inDevs.clear(); | ||
// outDevs.clear(); | ||
inDevs.clear(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not clearing this way? |
||
outDevs.clear(); | ||
|
||
StringArray in = MidiInput::getDevices(); | ||
StringArray out = MidiOutput::getDevices(); | ||
juce::Array<juce::MidiDeviceInfo> in = MidiInput::getAvailableDevices(); | ||
juce::Array<juce::MidiDeviceInfo> out = MidiOutput::getAvailableDevices(); | ||
|
||
for (int i=0; i<inDevs.size(); i++) | ||
/*for (int i=0; i<inDevs.size(); i++) | ||
{ | ||
while ( (i != inDevs.size()) && !in.contains( inDevs[i]->getName() ) ) | ||
inDevs.remove(i); | ||
in.removeString( inDevs[i]->getName() ); | ||
} | ||
}*/ | ||
for (int i=0; i<in.size(); i++) | ||
{ | ||
inDevs.add (new CtrlrMIDIDevice (*this, i, in[i], inputDevice)); | ||
inDevs.add (new CtrlrMIDIDevice (*this, i, in[i].name, in[i].identifier, inputDevice)); | ||
} | ||
|
||
for (int i=0; i<outDevs.size(); i++) | ||
/*for (int i=0; i<outDevs.size(); i++) | ||
{ | ||
while ( (i != outDevs.size()) && !out.contains( outDevs[i]->getName() ) ) | ||
outDevs.remove(i); | ||
out.removeString ( outDevs[i]->getName() ); | ||
} | ||
}*/ | ||
for (int i=0; i<out.size(); i++) | ||
{ | ||
outDevs.add (new CtrlrMIDIDevice (*this, i, out[i], outputDevice)); | ||
outDevs.add (new CtrlrMIDIDevice (*this, i, out[i].name, out[i].identifier, outputDevice)); | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be ok to ignore generated files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only Windows related and should be removed from the patch