Make bridge and mac utils public, add to utils lib

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-05-24 02:33:51 +02:00
parent 4ef7357545
commit bfa3c74c84
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 54 additions and 34 deletions

View File

@ -0,0 +1,22 @@
/*
* Carla Plugin Host
* Copyright (C) 2011-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/
#include "CarlaBridgeUtils.cpp"
#ifdef CARLA_OS_MAC
# include "CarlaMacUtils.cpp"
#endif

View File

@ -16,6 +16,7 @@ BUILD_CXX_FLAGS += $(YSFX_FLAGS)
OBJS = \
$(OBJDIR)/CachedPlugins.cpp.o \
$(OBJDIR)/CarlaUtils.cpp.o \
$(OBJDIR)/Information.cpp.o \
$(OBJDIR)/JUCE.cpp.o \
$(OBJDIR)/PipeClient.cpp.o \
@ -27,7 +28,8 @@ TARGETS = $(BINDIR)/libcarla_utils$(LIB_EXT)
# ---------------------------------------------------------------------------------------------------------------------
LIBS = $(MODULEDIR)/lilv.a
LIBS = $(MODULEDIR)/jackbridge.a
LIBS += $(MODULEDIR)/lilv.a
LIBS += $(MODULEDIR)/water.files.a
ifeq ($(HAVE_YSFX),true)
@ -46,6 +48,7 @@ LIBS += $(MODULEDIR)/juce_gui_basics.a
LIBS += $(MODULEDIR)/juce_gui_extra.a
endif
LINK_FLAGS += $(JACKBRIDGE_LIBS)
LINK_FLAGS += $(LILV_LIBS)
LINK_FLAGS += $(WATER_LIBS)
@ -97,16 +100,9 @@ $(BINDIR)/libcarla_utils$(LIB_EXT): $(OBJS) $(LIBS)
ifeq ($(MACOS),true)
ifeq ($(USING_JUCE),true)
$(OBJDIR)/CachedPlugins.cpp.o: CachedPlugins.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++14 -c -o $@
$(OBJDIR)/CachedPlugins.cpp.o: BUILD_CXX_FLAGS += -std=gnu++14
endif
$(OBJDIR)/Windows.cpp.o: Windows.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
$(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
$(OBJDIR)/Windows.cpp.o: BUILD_CXX_FLAGS += -ObjC++
endif
$(OBJDIR)/%.cpp.o: %.cpp

View File

@ -240,7 +240,7 @@ struct BridgeNonRtServerData {
// -------------------------------------------------------------------------------------------------------------------
struct BridgeAudioPool {
struct CARLA_API BridgeAudioPool {
float* data;
std::size_t dataSize;
CarlaString filename;
@ -263,7 +263,7 @@ struct BridgeAudioPool {
// -------------------------------------------------------------------------------------------------------------------
struct BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
struct CARLA_API BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
BridgeRtClientData* data;
CarlaString filename;
bool needsSemDestroy; // client only
@ -303,7 +303,7 @@ struct BridgeRtClientControl : public CarlaRingBufferControl<SmallStackBuffer> {
// -------------------------------------------------------------------------------------------------------------------
struct BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer> {
struct CARLA_API BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer> {
BridgeNonRtClientData* data;
CarlaString filename;
CarlaMutex mutex;
@ -332,7 +332,7 @@ struct BridgeNonRtClientControl : public CarlaRingBufferControl<BigStackBuffer>
// -------------------------------------------------------------------------------------------------------------------
struct BridgeNonRtServerControl : public CarlaRingBufferControl<HugeStackBuffer> {
struct CARLA_API BridgeNonRtServerControl : public CarlaRingBufferControl<HugeStackBuffer> {
BridgeNonRtServerData* data;
CarlaString filename;
CarlaMutex mutex;

View File

@ -1,6 +1,6 @@
/*
* Carla macOS utils
* Copyright (C) 2018-2022 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2018-2023 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -31,27 +31,29 @@ typedef const struct __CFString* CFStringRef;
void* CFBundleGetFunctionPointerForName(CFBundleRef, CFStringRef);
}
// --------------------------------------------------------------------------------------------------------------------
// a few public functions
/*
* ...
*/
CARLA_PLUGIN_EXPORT void initStandaloneApplication();
/*
* ...
*/
CARLA_PLUGIN_EXPORT const char* findBinaryInBundle(const char* const bundleDir);
/*
* ...
*/
CARLA_PLUGIN_EXPORT bool removeFileFromQuarantine(const char* const filename);
// --------------------------------------------------------------------------------------------------------------------
// and now then private stuff
CARLA_BACKEND_START_NAMESPACE
// --------------------------------------------------------------------------------------------------------------------
/*
* ...
*/
void initStandaloneApplication();
/*
* ...
*/
const char* findBinaryInBundle(const char* const bundleDir);
/*
* ...
*/
bool removeFileFromQuarantine(const char* const filename);
// --------------------------------------------------------------------------------------------------------------------
/*
* ...
*/