#!/bin/bash # Make sure we have the arguments we need if [[ -z $1 || -z $2 ]]; then echo "Generates a macOS bundle from a compiled dylib file" echo "Example:" echo -e "\t$0 Plugin target/release/plugin.dylib" echo -e "\tCreates a Plugin.vst bundle" else # Make the bundle folder mkdir -p "build/$1.vst/Contents/MacOS" # Create the PkgInfo echo "BNDL????" > "build/$1.vst/Contents/PkgInfo" #build the Info.Plist echo " CFBundleDevelopmentRegion English CFBundleExecutable $1 CFBundleGetInfoString vst CFBundleIconFile CFBundleIdentifier com.unnieversal.$1 CFBundleInfoDictionaryVersion 6.0 CFBundleName $1 CFBundlePackageType BNDL CFBundleVersion 1.0 CFBundleSignature $((RANDOM % 9999)) CSResourcesFileMapped " > "build/$1.vst/Contents/Info.plist" # move the provided library to the correct location cp "$2" "build/$1.vst/Contents/MacOS/$1" echo "Created bundle build/$1.vst" fi