Skip to content

Commit

Permalink
VST3 on Linux packages and installs (surge-synthesizer#646)
Browse files Browse the repository at this point in the history
VST3 on Linux requires a mac-like bundle, as described in
the VST3 documentation vst3sdk/doc/vstinterfaces/vst3loc.html.
These changes move VST3 from a raw dll to a bundle using the
same techniques we use on macOS. Since we bake the images
and so on into the bundle, the bundle contains only the DLL.

With this change, bitwig studio will load our VST3, but it
crashes if you open the UI and gives corrupted parameter names.
But we are able to begin to debug.

Addresses part of surge-synthesizer#514

Former-commit-id: 2f4e1b3d64624c7b9c046af41ad004986be98b49 [formerly 47fe976]
Former-commit-id: 19718ab93becd95200eac7b81fcaa914c6fa8883
Former-commit-id: 96557f18f5c1814dbde4dcab427c909b1fa5cc04
  • Loading branch information
baconpaul authored Feb 22, 2019
1 parent ca7bae5 commit b897218
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ run_install()

if [ ! -z "$OPTION_vst3" ]; then
echo "Installing VST3"
# No dest plugin name here since we are a bundle
rsync -r --delete $OPTION_vst3_src_path \
$OPTION_vst3_dest_path/$OPTION_dest_plugin_name
$OPTION_vst3_dest_path
fi

if [ ! -z "$OPTION_headless" ]; then
Expand Down Expand Up @@ -237,7 +238,7 @@ fi
if [ -z "$OPTION_debug" ]; then
OPTION_config="config=release_x64"
OPTION_vst2_src_path="target/vst2/Release/Surge.so"
OPTION_vst3_src_path="target/vst3/Release/Surge.so"
OPTION_vst3_src_path="products/Surge.vst3"
OPTION_headless_src_path="target/headless/Release/Surge"
OPTION_dest_plugin_name="Surge.so"
OPTION_dest_headless_name="Surge-Headless"
Expand Down
1 change: 1 addition & 0 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ elseif (os.istarget("windows")) then
targetextension ".vst3"

elseif (os.istarget("linux")) then
postbuildcommands { "./scripts/linux/package-vst3.sh" }

files
{
Expand Down
17 changes: 17 additions & 0 deletions scripts/linux/package-vst3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

OUTPUT_DIR=products
BUNDLE_NAME="Surge.vst3"
BUNDLE_DIR="$OUTPUT_DIR/$BUNDLE_NAME"

echo "Creating Linux VST3 Bundle..."

# create basic bundle structure

if test -d "$BUNDLE_DIR"; then
rm -rf "$BUNDLE_DIR"
fi

VST_SO_DIR="$BUNDLE_DIR/Contents/x86_64-linux"
mkdir -p "$VST_SO_DIR"
cp target/vst3/Release/Surge.so "$VST_SO_DIR"

0 comments on commit b897218

Please sign in to comment.