Browse Source

Merge branch 'master' of https://github.com/VCVRack/Rack

tags/v0.4.0^2
Andrew Belt 7 years ago
parent
commit
41098b0d3e
2 changed files with 9 additions and 8 deletions
  1. +2
    -2
      Makefile
  2. +7
    -6
      src/plugin.cpp

+ 2
- 2
Makefile View File

@@ -98,7 +98,7 @@ ifeq ($(ARCH), mac)
cp dep/lib/libcurl.4.dylib $(BUNDLE)/Contents/MacOS/ cp dep/lib/libcurl.4.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libzip.5.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/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 /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 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/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/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 $(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 otool -L $(BUNDLE)/Contents/MacOS/Rack




+ 7
- 6
src/plugin.cpp View File

@@ -213,16 +213,17 @@ static void refreshPurchase(json_t *pluginJ) {


// Download zip // Download zip
std::string pluginsDir = assetLocal("plugins"); std::string pluginsDir = assetLocal("plugins");
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) { if (success) {
// Unzip file // Unzip file
int err = extractZip(filename.c_str(), pluginsDir.c_str());
int err = extractZip(zipPath.c_str(), pluginsDir.c_str());
if (!err) { if (!err) {
// Load plugin
loadPlugin(slug);
// Delete zip // Delete zip
remove(filename.c_str());
remove(zipPath.c_str());
// Load plugin
loadPlugin(pluginPath);
} }
} }




Loading…
Cancel
Save