Browse Source

Fix bug in resolving paths in system::unarchiveFolder().

Create .tar.zst plugins in `make dist` for plugins.
Link to libstdc++ statically for plugins.
Remove -lstdc++fs since we replaced it with ghc::filesystem.
tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
d6b382f36d
3 changed files with 8 additions and 5 deletions
  1. +2
    -2
      Makefile
  2. +5
    -2
      plugin.mk
  3. +1
    -1
      src/system.cpp

+ 2
- 2
Makefile View File

@@ -33,7 +33,7 @@ build/dep/osdialog/osdialog_gtk3.c.o: FLAGS += $(shell pkg-config --cflags gtk+-
FLAGS += -fno-gnu-unique FLAGS += -fno-gnu-unique


LDFLAGS += -Wl,--whole-archive LDFLAGS += -Wl,--whole-archive
LDFLAGS += dep/lib/libGLEW.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/libarchive.a dep/lib/libzstd.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/librtmidi.a dep/lib/librtaudio.a -lstdc++fs
LDFLAGS += dep/lib/libGLEW.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/libarchive.a dep/lib/libzstd.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/librtmidi.a dep/lib/librtaudio.a
LDFLAGS += -Wl,--no-whole-archive LDFLAGS += -Wl,--no-whole-archive
LDFLAGS += -lpthread -lGL -ldl -lX11 -lasound -ljack LDFLAGS += -lpthread -lGL -ldl -lX11 -lasound -ljack
LDFLAGS += $(shell pkg-config --libs gtk+-3.0) LDFLAGS += $(shell pkg-config --libs gtk+-3.0)
@@ -65,7 +65,7 @@ ifdef ARCH_WIN
LDFLAGS += -Wl,--export-all-symbols LDFLAGS += -Wl,--export-all-symbols
LDFLAGS += -Wl,--out-implib,$(TARGET).a LDFLAGS += -Wl,--out-implib,$(TARGET).a
LDFLAGS += -Wl,-Bstatic -Wl,--whole-archive LDFLAGS += -Wl,-Bstatic -Wl,--whole-archive
LDFLAGS += dep/lib/libglew32.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/libarchive.a dep/lib/libzstd.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/librtaudio.a dep/lib/librtmidi.a -lstdc++fs
LDFLAGS += dep/lib/libglew32.a dep/lib/libglfw3.a dep/lib/libjansson.a dep/lib/libspeexdsp.a dep/lib/libsamplerate.a dep/lib/libarchive.a dep/lib/libzstd.a dep/lib/libcurl.a dep/lib/libssl.a dep/lib/libcrypto.a dep/lib/librtaudio.a dep/lib/librtmidi.a
LDFLAGS += -Wl,-Bdynamic -Wl,--no-whole-archive LDFLAGS += -Wl,-Bdynamic -Wl,--no-whole-archive
LDFLAGS += -lpthread -lopengl32 -lgdi32 -lws2_32 -lcomdlg32 -lole32 -ldsound -lwinmm -lksuser -lshlwapi -lmfplat -lmfuuid -lwmcodecdspuuid -ldbghelp LDFLAGS += -lpthread -lopengl32 -lgdi32 -lws2_32 -lcomdlg32 -lole32 -ldsound -lwinmm -lksuser -lshlwapi -lmfplat -lmfuuid -lwmcodecdspuuid -ldbghelp




+ 5
- 2
plugin.mk View File

@@ -20,6 +20,9 @@ FLAGS += -I$(RACK_DIR)/include -I$(RACK_DIR)/dep/include
LDFLAGS += -shared LDFLAGS += -shared
LDFLAGS += -L$(RACK_DIR) -lRack LDFLAGS += -L$(RACK_DIR) -lRack


# Since the compiler we're using could have a newer version than the minimum supported libstdc++ version, link it statically.
LDFLAGS += -static-libstdc++

include $(RACK_DIR)/arch.mk include $(RACK_DIR)/arch.mk


ifdef ARCH_LIN ifdef ARCH_LIN
@@ -71,10 +74,10 @@ else
cp -r --parents $(DISTRIBUTABLES) dist/"$(SLUG)"/ cp -r --parents $(DISTRIBUTABLES) dist/"$(SLUG)"/
endif endif
@# Create ZIP package @# Create ZIP package
cd dist && zip -q -9 -r "$(SLUG)"-"$(VERSION)"-$(ARCH).zip "$(SLUG)"
cd dist && ZSTD_CLEVEL=19 tar -cf "$(SLUG)"-"$(VERSION)"-$(ARCH).vcvplugin --zstd "$(SLUG)"


install: dist install: dist
cp dist/"$(SLUG)"-"$(VERSION)"-$(ARCH).zip $(RACK_USER_DIR)/plugins-v2/
cp dist/"$(SLUG)"-"$(VERSION)"-$(ARCH).vcvplugin $(RACK_USER_DIR)/plugins-v2/


.PHONY: clean dist .PHONY: clean dist
.DEFAULT_GOAL := all .DEFAULT_GOAL := all

+ 1
- 1
src/system.cpp View File

@@ -415,7 +415,7 @@ void unarchiveToFolder(const std::string& archivePath, const std::string& folder
std::string entryPath = archive_entry_pathname(entry); std::string entryPath = archive_entry_pathname(entry);
if (!fs::u8path(entryPath).is_relative()) if (!fs::u8path(entryPath).is_relative())
throw Exception(string::f("Unarchiver does not support absolute tar paths: %s", entryPath.c_str())); throw Exception(string::f("Unarchiver does not support absolute tar paths: %s", entryPath.c_str()));
entryPath = fs::relative(fs::u8path(entryPath), fs::u8path(folderPath)).generic_u8string();
entryPath = (fs::u8path(folderPath) / fs::u8path(entryPath)).generic_u8string();
#if defined ARCH_WIN #if defined ARCH_WIN
archive_entry_copy_pathname_w(entry, string::U8toU16(entryPath).c_str()); archive_entry_copy_pathname_w(entry, string::U8toU16(entryPath).c_str());
#else #else


Loading…
Cancel
Save