summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Belt <andrewpbelt@gmail.com>2017-10-13 22:21:20 -0400
committerAndrew Belt <andrewpbelt@gmail.com>2017-10-13 22:21:20 -0400
commit23d347279a448b93a9567ed88e9ff2ffb455eb86 (patch)
treef761a717ecd31c07916e6b318864a9ea5d63ded8
parentf83bc5ea99e57e832bd42ed731665fe008a7d00f (diff)
parent41098b0d3e9b8d34f572f80f1501c56b9d4c1e9d (diff)
Merge branch 'master' of github.com:VCVRack/Rackv0.4.0
-rw-r--r--Makefile6
-rwxr-xr-xdep/Makefile4
-rw-r--r--src/plugin.cpp17
3 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index df755c72..ba4c6d41 100644
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,7 @@ ifeq ($(ARCH), mac)
cp dep/lib/libcurl.4.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libzip.5.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/
- cp dep/lib/librtmidi.dylib $(BUNDLE)/Contents/MacOS/
+ cp dep/lib/librtmidi.4.dylib $(BUNDLE)/Contents/MacOS/
install_name_tool -change /usr/local/lib/libGLEW.2.1.0.dylib @executable_path/libGLEW.2.1.0.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change lib/libglfw.3.dylib @executable_path/libglfw.3.dylib $(BUNDLE)/Contents/MacOS/Rack
@@ -107,7 +107,7 @@ ifeq ($(ARCH), mac)
install_name_tool -change $(PWD)/dep/lib/libcurl.4.dylib @executable_path/libcurl.4.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libzip.5.dylib @executable_path/libzip.5.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libportaudio.2.dylib @executable_path/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/Rack
- install_name_tool -change @rpath/librtmidi.dylib @executable_path/librtmidi.dylib $(BUNDLE)/Contents/MacOS/Rack
+ install_name_tool -change $(PWD)/dep/lib/librtmidi.4.dylib @executable_path/librtmidi.4.dylib $(BUNDLE)/Contents/MacOS/Rack
otool -L $(BUNDLE)/Contents/MacOS/Rack
@@ -126,7 +126,7 @@ ifeq ($(ARCH), win)
cp dep/bin/glfw3.dll dist/Rack/
cp dep/bin/libcurl-4.dll dist/Rack/
cp dep/bin/libjansson-4.dll dist/Rack/
- cp dep/bin/librtmidi.dll dist/Rack/
+ cp dep/bin/librtmidi-4.dll dist/Rack/
cp dep/bin/libsamplerate-0.dll dist/Rack/
cp dep/bin/libzip-5.dll dist/Rack/
cp dep/bin/portaudio_x64.dll dist/Rack/
diff --git a/dep/Makefile b/dep/Makefile
index 96d1be34..184d29e3 100755
--- a/dep/Makefile
+++ b/dep/Makefile
@@ -51,8 +51,8 @@ ifeq ($(ARCH),win)
libsamplerate = bin/libsamplerate-0.dll
libcurl = bin/libcurl-4.dll
libzip = bin/libzip-5.dll
- rtmidi = bin/rtmidi.dll
- portaudio = bin/libportaudio_x64.dll
+ rtmidi = bin/librtmidi-4.dll
+ portaudio = bin/portaudio_x64.dll
endif
diff --git a/src/plugin.cpp b/src/plugin.cpp
index 93ff69c5..3de1457b 100644
--- a/src/plugin.cpp
+++ b/src/plugin.cpp
@@ -213,17 +213,17 @@ static void refreshPurchase(json_t *pluginJ) {
// Download zip
std::string pluginsDir = assetLocal("plugins");
- mkdir(pluginsDir.c_str(), 0755);
- std::string filename = pluginsDir + "/" + slug + ".zip";
- bool success = requestDownload(url, filename, &downloadProgress);
+ std::string pluginPath = pluginsDir + "/" + slug;
+ std::string zipPath = pluginPath + ".zip";
+ bool success = requestDownload(url, zipPath, &downloadProgress);
if (success) {
// Unzip file
- int err = extractZip(filename.c_str(), pluginsDir.c_str());
+ int err = extractZip(zipPath.c_str(), pluginsDir.c_str());
if (!err) {
- // Load plugin
- loadPlugin(slug);
// Delete zip
- remove(filename.c_str());
+ remove(zipPath.c_str());
+ // Load plugin
+ loadPlugin(pluginPath);
}
}
@@ -243,10 +243,13 @@ void pluginInit() {
// Load plugins from global directory
std::string globalPlugins = assetGlobal("plugins");
+ printf("Loading plugins from %s\n", globalPlugins.c_str());
loadPlugins(globalPlugins);
// Load plugins from local directory
std::string localPlugins = assetLocal("plugins");
+ mkdir(localPlugins.c_str(), 0755);
+ printf("Loading plugins from %s\n", localPlugins.c_str());
if (globalPlugins != localPlugins)
loadPlugins(localPlugins);
}