Browse Source

Specify Fundamental (VCV Free) plugin version and download it in dist target. Refactor getFundamentalPackagePath() to not use regex.

tags/v2.6.2
Andrew Belt 1 month ago
parent
commit
4552a7168f
3 changed files with 10 additions and 5 deletions
  1. +1
    -0
      .gitignore
  2. +7
    -3
      Makefile
  3. +2
    -2
      src/plugin.cpp

+ 1
- 0
.gitignore View File

@@ -11,6 +11,7 @@
*.res
*.d
*.dSYM
*.vcvplugin
/build
/Rack
/dep


+ 7
- 3
Makefile View File

@@ -175,10 +175,14 @@ DIST_HTML := $(patsubst %.md, build/%.html, $(DIST_MD))
DIST_RES := res cacert.pem Core.json template.vcv LICENSE-GPLv3.txt $(DIST_HTML) translations
DIST_SDK_DIR := Rack-SDK
DIST_SDK = Rack-SDK-$(VERSION)-$(ARCH_NAME).zip
FUNDAMENTAL_VERSION ?= 2.6.1
FUNDAMENTAL_FILENAME := Fundamental-$(FUNDAMENTAL_VERSION)-$(ARCH_NAME).vcvplugin


dist: $(TARGET) $(STANDALONE_TARGET) $(DIST_HTML)
mkdir -p dist
# Download Fundamental package if not already downloaded
[ -f "$(FUNDAMENTAL_FILENAME)" ] || curl -o "$(FUNDAMENTAL_FILENAME)" "https://api.vcvrack.com/download?slug=Fundamental&version=$(FUNDAMENTAL_VERSION)&arch=$(ARCH_NAME)"
ifdef ARCH_LIN
mkdir -p dist/"$(DIST_DIR)"
cp $(TARGET) dist/"$(DIST_DIR)"/
@@ -190,7 +194,7 @@ ifdef ARCH_LIN
ldd dist/"$(DIST_DIR)"/$(STANDALONE_TARGET)
# Copy resources
cp -R $(DIST_RES) dist/"$(DIST_DIR)"/
cp plugins/Fundamental/dist/Fundamental-*.vcvplugin dist/"$(DIST_DIR)"/
cp "$(FUNDAMENTAL_FILENAME)" dist/"$(DIST_DIR)"/
endif
ifdef ARCH_MAC
mkdir -p dist/"$(DIST_BUNDLE)"
@@ -210,7 +214,7 @@ ifdef ARCH_MAC
$(SED) 's/{VERSION}/$(VERSION)/g' dist/"$(DIST_BUNDLE)"/Contents/Info.plist
cp -R icon.icns dist/"$(DIST_BUNDLE)"/Contents/Resources/
cp -R $(DIST_RES) dist/"$(DIST_BUNDLE)"/Contents/Resources/
cp plugins/Fundamental/dist/Fundamental-*.vcvplugin dist/"$(DIST_BUNDLE)"/Contents/Resources/
cp "$(FUNDAMENTAL_FILENAME)" dist/"$(DIST_BUNDLE)"/Contents/Resources/
endif
ifdef ARCH_WIN
mkdir -p dist/"$(DIST_DIR)"
@@ -223,7 +227,7 @@ ifdef ARCH_WIN
cp /mingw64/bin/libwinpthread-1.dll dist/"$(DIST_DIR)"/
cp /mingw64/bin/libstdc++-6.dll dist/"$(DIST_DIR)"/
cp /mingw64/bin/libgcc_s_seh-1.dll dist/"$(DIST_DIR)"/
cp plugins/Fundamental/dist/Fundamental-*.vcvplugin dist/"$(DIST_DIR)"/
cp "$(FUNDAMENTAL_FILENAME)" dist/"$(DIST_DIR)"/
endif




+ 2
- 2
src/plugin.cpp View File

@@ -250,9 +250,9 @@ static void extractPackages(std::string path) {
}

static std::string getFundamentalPackagePath() {
std::regex r("Fundamental-.*-" + APP_OS + "-" + APP_CPU + "\\.vcvplugin");
for (const std::string& path : system::getEntries(asset::systemDir)) {
if (std::regex_match(system::getFilename(path), r))
std::string filename = system::getFilename(path);
if (string::startsWith(filename, "Fundamental-") && string::endsWith(filename, APP_OS + "-" + APP_CPU + ".vcvplugin"))
return path;
}
return "";


Loading…
Cancel
Save