diff --git a/deps/Makefile b/deps/Makefile index 5b42a3a..61ec497 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -125,15 +125,17 @@ DEP_MAKE += MACHINE=$(MACHINE)$(MACHINE_SUFFIX) $(DEP_PATH)/lib/%.a: $(DEP_MAKE) -C $(DEP_PATH) lib/$*.a -# skip libarchive shared lib +# skip libarchive shared lib and ensure libzstd is enabled $(DEP_PATH)/lib/libarchive.a: $(DEP_PATH)/lib/libzstd.a $(DEP_PATH)/libarchive-3.4.3/.stamp-patched $(DEP_PATH)/lib/libarchive_static.a: $(DEP_PATH)/lib/libzstd.a $(DEP_PATH)/libarchive-3.4.3/.stamp-patched $(DEP_PATH)/libarchive-3.4.3/.stamp-patched: $(DEP_MAKE) -C $(DEP_PATH) libarchive-3.4.3 + sed -i -e "618,625d" $(DEP_PATH)/libarchive-3.4.3/CMakeLists.txt sed -i -e "238,243d" $(DEP_PATH)/libarchive-3.4.3/libarchive/CMakeLists.txt sed -i -e "s/TARGETS archive archive_static/TARGETS archive_static/" $(DEP_PATH)/libarchive-3.4.3/libarchive/CMakeLists.txt + sed -i -e "s/HAVE_LIBZSTD/1/" $(DEP_PATH)/libarchive-3.4.3/libarchive/archive_write_add_filter_zstd.c touch $@ # skip libsamplerate tests diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index fa1a7d9..ca4b7a5 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -696,8 +696,10 @@ protected: context->engine->prepareSave(); context->patch->saveAutosave(); context->patch->cleanAutosave(); - - data = rack::system::archiveDirectory(fAutosavePath, 1); + + try { + data = rack::system::archiveDirectory(fAutosavePath, 1); + } DISTRHO_SAFE_EXCEPTION_RETURN("getState archiveDirectory", String()); } return String::asBase64(data.data(), data.size()); diff --git a/src/DistrhoPluginInfo.h b/src/DistrhoPluginInfo.h index cb8a88e..93dc94b 100644 --- a/src/DistrhoPluginInfo.h +++ b/src/DistrhoPluginInfo.h @@ -40,8 +40,4 @@ // #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin" // #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer" -enum Parameters { - kParameterCount -}; - #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/override/RemoteWindow.cpp b/src/override/RemoteWindow.cpp index 5c95a0c..df0185f 100644 --- a/src/override/RemoteWindow.cpp +++ b/src/override/RemoteWindow.cpp @@ -46,20 +46,18 @@ #include "DistrhoPlugin.hpp" #include "../WindowParameters.hpp" -#ifndef HEADLESS +#ifdef WITH_MESA # include "../src/Rack/dep/glfw/deps/stb_image_write.h" # include "extra/Thread.hpp" # include #endif -#ifdef HEADLESS namespace rack { namespace app { widget::Widget* createMenuBar() { return new widget::Widget; } } } -#endif namespace rack { @@ -114,7 +112,7 @@ struct WindowParams { }; struct Window::Internal -#ifndef HEADLESS +#ifdef WITH_MESA : public Thread #endif { @@ -123,7 +121,7 @@ struct Window::Internal DISTRHO_NAMESPACE::WindowParametersCallback* callback = nullptr; Context* context = nullptr; Window* self = nullptr; -#ifndef HEADLESS +#ifdef WITH_MESA OSMesaContext mesa = nullptr; GLubyte* mesaBuffer = nullptr; #endif @@ -143,7 +141,7 @@ struct Window::Internal bool fbDirtyOnSubpixelChange = true; -#ifndef HEADLESS +#ifdef WITH_MESA void run() override { self->run(); int i=0; @@ -172,7 +170,7 @@ Window::Window() { internal->self = this; } -#ifndef HEADLESS +#ifdef WITH_MESA static void flipBitmap(uint8_t* pixels, int width, int height, int depth) { for (int y = 0; y < height / 2; y++) { int flipY = height - y - 1; @@ -188,7 +186,7 @@ void WindowInit(Window* const window, DISTRHO_NAMESPACE::Plugin* const plugin) { window->internal->plugin = plugin; -#ifndef HEADLESS +#ifdef WITH_MESA window->internal->mesa = OSMesaCreateContextExt(OSMESA_RGBA, 24, 8, 0, nullptr); DISTRHO_SAFE_ASSERT_RETURN(window->internal->mesa != nullptr,); @@ -232,7 +230,7 @@ void WindowInit(Window* const window, DISTRHO_NAMESPACE::Plugin* const plugin) APP->scene->onContextCreate(e); } -#ifndef HEADLESS +#ifdef WITH_MESA d_stdout("all good with mesa and GL? %d | %p %p %p", ok, window->internal->mesa, window->vg, window->fbVg); // window->internal->startThread(); @@ -320,7 +318,7 @@ Window::~Window() { internal->fontCache.clear(); internal->imageCache.clear(); -#ifndef HEADLESS +#ifdef WITH_MESA // #if defined NANOVG_GL2 nvgDeleteGL2(vg); nvgDeleteGL2(fbVg);