Make sure libarchive uses libzstd instead of external tools; Cleanup
This commit is contained in:
parent
0c7c99c8fc
commit
570f9f94a9
4 changed files with 15 additions and 17 deletions
4
deps/Makefile
vendored
4
deps/Makefile
vendored
|
@ -125,15 +125,17 @@ DEP_MAKE += MACHINE=$(MACHINE)$(MACHINE_SUFFIX)
|
||||||
$(DEP_PATH)/lib/%.a:
|
$(DEP_PATH)/lib/%.a:
|
||||||
$(DEP_MAKE) -C $(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.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)/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_PATH)/libarchive-3.4.3/.stamp-patched:
|
||||||
$(DEP_MAKE) -C $(DEP_PATH) libarchive-3.4.3
|
$(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 "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/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 $@
|
touch $@
|
||||||
|
|
||||||
# skip libsamplerate tests
|
# skip libsamplerate tests
|
||||||
|
|
|
@ -696,8 +696,10 @@ protected:
|
||||||
context->engine->prepareSave();
|
context->engine->prepareSave();
|
||||||
context->patch->saveAutosave();
|
context->patch->saveAutosave();
|
||||||
context->patch->cleanAutosave();
|
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());
|
return String::asBase64(data.data(), data.size());
|
||||||
|
|
|
@ -40,8 +40,4 @@
|
||||||
// #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
|
// #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
|
||||||
// #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer"
|
// #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer"
|
||||||
|
|
||||||
enum Parameters {
|
|
||||||
kParameterCount
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
|
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
|
||||||
|
|
|
@ -46,20 +46,18 @@
|
||||||
#include "DistrhoPlugin.hpp"
|
#include "DistrhoPlugin.hpp"
|
||||||
#include "../WindowParameters.hpp"
|
#include "../WindowParameters.hpp"
|
||||||
|
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
# include "../src/Rack/dep/glfw/deps/stb_image_write.h"
|
# include "../src/Rack/dep/glfw/deps/stb_image_write.h"
|
||||||
# include "extra/Thread.hpp"
|
# include "extra/Thread.hpp"
|
||||||
# include <GL/osmesa.h>
|
# include <GL/osmesa.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HEADLESS
|
|
||||||
namespace rack {
|
namespace rack {
|
||||||
namespace app {
|
namespace app {
|
||||||
widget::Widget* createMenuBar() { return new widget::Widget; }
|
widget::Widget* createMenuBar() { return new widget::Widget; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace rack {
|
namespace rack {
|
||||||
|
@ -114,7 +112,7 @@ struct WindowParams {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Window::Internal
|
struct Window::Internal
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
: public Thread
|
: public Thread
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -123,7 +121,7 @@ struct Window::Internal
|
||||||
DISTRHO_NAMESPACE::WindowParametersCallback* callback = nullptr;
|
DISTRHO_NAMESPACE::WindowParametersCallback* callback = nullptr;
|
||||||
Context* context = nullptr;
|
Context* context = nullptr;
|
||||||
Window* self = nullptr;
|
Window* self = nullptr;
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
OSMesaContext mesa = nullptr;
|
OSMesaContext mesa = nullptr;
|
||||||
GLubyte* mesaBuffer = nullptr;
|
GLubyte* mesaBuffer = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
@ -143,7 +141,7 @@ struct Window::Internal
|
||||||
|
|
||||||
bool fbDirtyOnSubpixelChange = true;
|
bool fbDirtyOnSubpixelChange = true;
|
||||||
|
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
void run() override {
|
void run() override {
|
||||||
self->run();
|
self->run();
|
||||||
int i=0;
|
int i=0;
|
||||||
|
@ -172,7 +170,7 @@ Window::Window() {
|
||||||
internal->self = this;
|
internal->self = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
static void flipBitmap(uint8_t* pixels, int width, int height, int depth) {
|
static void flipBitmap(uint8_t* pixels, int width, int height, int depth) {
|
||||||
for (int y = 0; y < height / 2; y++) {
|
for (int y = 0; y < height / 2; y++) {
|
||||||
int flipY = height - y - 1;
|
int flipY = height - y - 1;
|
||||||
|
@ -188,7 +186,7 @@ void WindowInit(Window* const window, DISTRHO_NAMESPACE::Plugin* const plugin)
|
||||||
{
|
{
|
||||||
window->internal->plugin = plugin;
|
window->internal->plugin = plugin;
|
||||||
|
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
window->internal->mesa = OSMesaCreateContextExt(OSMESA_RGBA, 24, 8, 0, nullptr);
|
window->internal->mesa = OSMesaCreateContextExt(OSMESA_RGBA, 24, 8, 0, nullptr);
|
||||||
DISTRHO_SAFE_ASSERT_RETURN(window->internal->mesa != 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);
|
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);
|
d_stdout("all good with mesa and GL? %d | %p %p %p", ok, window->internal->mesa, window->vg, window->fbVg);
|
||||||
// window->internal->startThread();
|
// window->internal->startThread();
|
||||||
|
|
||||||
|
@ -320,7 +318,7 @@ Window::~Window() {
|
||||||
internal->fontCache.clear();
|
internal->fontCache.clear();
|
||||||
internal->imageCache.clear();
|
internal->imageCache.clear();
|
||||||
|
|
||||||
#ifndef HEADLESS
|
#ifdef WITH_MESA
|
||||||
// #if defined NANOVG_GL2
|
// #if defined NANOVG_GL2
|
||||||
nvgDeleteGL2(vg);
|
nvgDeleteGL2(vg);
|
||||||
nvgDeleteGL2(fbVg);
|
nvgDeleteGL2(fbVg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue