mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-12 05:10:51 +02:00
+60
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
# Package post-install hook for Linux .deb/.rpm builds. The app package installs
|
||||
# Prism under /opt, then this copies the bundled native Linux VST3 bundles into
|
||||
# the global VST3 scan path used by Linux DAWs.
|
||||
|
||||
set -eu
|
||||
|
||||
DEST_DIR="${PRISM_VST3_DEST_DIR:-/usr/lib/vst3}"
|
||||
|
||||
find_source_dir() {
|
||||
if [ -n "${PRISM_VST3_SOURCE_DIR:-}" ] && [ -d "$PRISM_VST3_SOURCE_DIR" ]; then
|
||||
printf '%s\n' "$PRISM_VST3_SOURCE_DIR"
|
||||
return 0
|
||||
fi
|
||||
|
||||
for dir in \
|
||||
/opt/Prism/resources/plugins/VST3 \
|
||||
/opt/prism/resources/plugins/VST3
|
||||
do
|
||||
if [ -d "$dir" ]; then
|
||||
printf '%s\n' "$dir"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
install_plugin() {
|
||||
plugin_name="$1"
|
||||
source_plugin="$SOURCE_DIR/$plugin_name"
|
||||
dest_plugin="$DEST_DIR/$plugin_name"
|
||||
|
||||
if [ ! -d "$source_plugin" ]; then
|
||||
echo "Prism VST3 install: missing bundled plugin: $source_plugin" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
rm -rf "$dest_plugin"
|
||||
cp -a "$source_plugin" "$DEST_DIR/"
|
||||
}
|
||||
|
||||
SOURCE_DIR="$(find_source_dir || true)"
|
||||
if [ -z "$SOURCE_DIR" ]; then
|
||||
echo "Prism VST3 install: bundled VST3 directory not found; skipping plugin install." >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
|
||||
install_plugin "Prism Spectrum.vst3"
|
||||
install_plugin "Prism Oscilloscope.vst3"
|
||||
install_plugin "Prism VU Meter.vst3"
|
||||
install_plugin "Prism Loudness Meter.vst3"
|
||||
install_plugin "Prism Vectorscope.vst3"
|
||||
install_plugin "Prism Spectrogram.vst3"
|
||||
install_plugin "Prism Waveform.vst3"
|
||||
|
||||
chmod -R a+rX "$DEST_DIR"/Prism*.vst3 2>/dev/null || true
|
||||
echo "Prism VST3 plugins installed to $DEST_DIR"
|
||||
Executable
+105
@@ -0,0 +1,105 @@
|
||||
#!/bin/sh
|
||||
# Helper bundled in the Linux tarball under resources/plugins/. By default it
|
||||
# installs Prism's native Linux VST3 bundles to the current user's VST3 folder.
|
||||
|
||||
set -eu
|
||||
|
||||
usage() {
|
||||
cat <<'EOF'
|
||||
Usage: install-vst3.sh [--system] [--dest PATH] [--source PATH]
|
||||
|
||||
Installs the bundled Prism VST3 plugins.
|
||||
|
||||
Options:
|
||||
--system Install to /usr/lib/vst3 instead of $HOME/.vst3.
|
||||
--dest PATH Install to a custom VST3 directory.
|
||||
--source PATH Read Prism *.vst3 bundles from a custom source directory.
|
||||
-h, --help Show this help.
|
||||
EOF
|
||||
}
|
||||
|
||||
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
SOURCE_DIR="${PRISM_VST3_SOURCE_DIR:-}"
|
||||
DEST_DIR="${PRISM_VST3_DEST_DIR:-$HOME/.vst3}"
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
--system)
|
||||
DEST_DIR="/usr/lib/vst3"
|
||||
;;
|
||||
--dest)
|
||||
shift
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "install-vst3.sh: --dest requires a path" >&2
|
||||
exit 2
|
||||
fi
|
||||
DEST_DIR="$1"
|
||||
;;
|
||||
--source)
|
||||
shift
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "install-vst3.sh: --source requires a path" >&2
|
||||
exit 2
|
||||
fi
|
||||
SOURCE_DIR="$1"
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "install-vst3.sh: unknown option: $1" >&2
|
||||
usage >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "$SOURCE_DIR" ]; then
|
||||
if [ -d "$SCRIPT_DIR/VST3" ]; then
|
||||
SOURCE_DIR="$SCRIPT_DIR/VST3"
|
||||
elif [ -d "$SCRIPT_DIR/plugins/VST3" ]; then
|
||||
SOURCE_DIR="$SCRIPT_DIR/plugins/VST3"
|
||||
else
|
||||
SOURCE_DIR="$SCRIPT_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
echo "install-vst3.sh: source directory not found: $SOURCE_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install_plugin() {
|
||||
plugin_name="$1"
|
||||
source_plugin="$SOURCE_DIR/$plugin_name"
|
||||
dest_plugin="$DEST_DIR/$plugin_name"
|
||||
|
||||
if [ ! -d "$source_plugin" ]; then
|
||||
echo "install-vst3.sh: missing bundled plugin: $source_plugin" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
rm -rf "$dest_plugin"
|
||||
cp -a "$source_plugin" "$DEST_DIR/"
|
||||
}
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
|
||||
install_plugin "Prism Spectrum.vst3"
|
||||
install_plugin "Prism Oscilloscope.vst3"
|
||||
install_plugin "Prism VU Meter.vst3"
|
||||
install_plugin "Prism Loudness Meter.vst3"
|
||||
install_plugin "Prism Vectorscope.vst3"
|
||||
install_plugin "Prism Spectrogram.vst3"
|
||||
install_plugin "Prism Waveform.vst3"
|
||||
|
||||
chmod -R u+rwX,go+rX "$DEST_DIR"/Prism*.vst3 2>/dev/null || true
|
||||
|
||||
cat <<EOF
|
||||
Prism VST3 plugins installed to:
|
||||
$DEST_DIR
|
||||
|
||||
Rescan VST3 plugins in your DAW if they do not appear immediately.
|
||||
EOF
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# Package removal hook for Linux .deb/.rpm builds. Remove only Prism's known
|
||||
# VST3 bundles from the global VST3 scan path.
|
||||
|
||||
set -eu
|
||||
|
||||
DEST_DIR="${PRISM_VST3_DEST_DIR:-/usr/lib/vst3}"
|
||||
|
||||
remove_plugin() {
|
||||
rm -rf "$DEST_DIR/$1"
|
||||
}
|
||||
|
||||
remove_plugin "Prism Spectrum.vst3"
|
||||
remove_plugin "Prism Oscilloscope.vst3"
|
||||
remove_plugin "Prism VU Meter.vst3"
|
||||
remove_plugin "Prism Loudness Meter.vst3"
|
||||
remove_plugin "Prism Vectorscope.vst3"
|
||||
remove_plugin "Prism Spectrogram.vst3"
|
||||
remove_plugin "Prism Waveform.vst3"
|
||||
|
||||
echo "Prism VST3 plugins removed from $DEST_DIR"
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Postinstall: after the macOS Installer drops Prism.app into /Applications, copy
|
||||
# the bundled VST3 / AU plugins out of the app's Resources into the system
|
||||
# Audio Plug-Ins folders so DAWs find them.
|
||||
#
|
||||
# Standard pkg postinstall args:
|
||||
# $1 = full path to the installer package
|
||||
# $2 = full path of the installed destination (e.g. /Applications)
|
||||
# $3 = mountpoint of the target volume (typically /)
|
||||
# $4 = root directory of the system being installed onto
|
||||
#
|
||||
# Runs as root, so writes to /Library/Audio/Plug-Ins/* succeed.
|
||||
|
||||
set -eu
|
||||
|
||||
APP_PATH="${2:-/Applications}/Prism.app"
|
||||
[ -d "$APP_PATH" ] || APP_PATH="/Applications/Prism.app"
|
||||
|
||||
PLUGINS_SRC="$APP_PATH/Contents/Resources/plugins"
|
||||
VST3_DEST="/Library/Audio/Plug-Ins/VST3"
|
||||
AU_DEST="/Library/Audio/Plug-Ins/Components"
|
||||
|
||||
mkdir -p "$VST3_DEST" "$AU_DEST"
|
||||
|
||||
if [ -d "$PLUGINS_SRC/VST3" ]; then
|
||||
cp -R "$PLUGINS_SRC/VST3/"*.vst3 "$VST3_DEST/" 2>/dev/null || true
|
||||
fi
|
||||
if [ -d "$PLUGINS_SRC/AU" ]; then
|
||||
cp -R "$PLUGINS_SRC/AU/"*.component "$AU_DEST/" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,91 @@
|
||||
; Custom NSIS include for electron-builder.
|
||||
;
|
||||
; Wizard installer (oneClick=false, perMachine=true) with an optional VST3
|
||||
; install step. After the directory page, we add a custom page with a checkbox:
|
||||
;
|
||||
; [x] Install Prism VST3 plugins (recommended)
|
||||
;
|
||||
; If checked, customInstall xcopies the bundled .vst3 bundles from
|
||||
; $INSTDIR\resources\plugins\VST3\ into $COMMONFILES64\VST3\. The whole
|
||||
; installer already runs elevated (perMachine=true → UAC at launch), so writes
|
||||
; to Common Files succeed without a second elevation. On uninstall, the bundles
|
||||
; are removed unconditionally (harmless if the user opted out at install time).
|
||||
|
||||
!ifndef BUILD_UNINSTALLER
|
||||
!include "nsDialogs.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
|
||||
Var PRISM_VST_CHECKBOX
|
||||
Var PRISM_VST_STATE
|
||||
|
||||
!macro customInit
|
||||
; Silent installs skip the options page, so default to installing plugins.
|
||||
StrCpy $PRISM_VST_STATE ${BST_CHECKED}
|
||||
!macroend
|
||||
|
||||
; NOTE on parse order: this file is `!include`d before electron-builder's main
|
||||
; installer template, so MUI references live inside inserted macro bodies.
|
||||
!macro customPageAfterChangeDir
|
||||
Page custom prismVstOptionsPage prismVstOptionsPageLeave
|
||||
|
||||
Function prismVstOptionsPage
|
||||
!insertmacro MUI_HEADER_TEXT "VST3 Plugins" "Choose whether to install the Prism scope plugins."
|
||||
|
||||
nsDialogs::Create 1018
|
||||
Pop $0
|
||||
${If} $0 == error
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
${NSD_CreateCheckBox} 0 0u 100% 12u "Install Prism VST3 plugins (recommended)"
|
||||
Pop $PRISM_VST_CHECKBOX
|
||||
${NSD_Check} $PRISM_VST_CHECKBOX
|
||||
|
||||
${NSD_CreateLabel} 0 22u 100% 80u "Installs the seven Prism scope plugins (Spectrum, Oscilloscope, Vectorscope, Spectrogram, VU Meter, Loudness Meter, Waveform) to:$\r$\n$\r$\n $COMMONFILES64\VST3$\r$\n$\r$\nDAWs (FL Studio, Ableton, Logic, Reaper, etc.) will find them on the next plugin rescan.$\r$\n$\r$\nUncheck to install only the Prism desktop app. You can re-run this installer at any time to add the plugins later."
|
||||
Pop $0
|
||||
|
||||
nsDialogs::Show
|
||||
FunctionEnd
|
||||
|
||||
Function prismVstOptionsPageLeave
|
||||
${NSD_GetState} $PRISM_VST_CHECKBOX $PRISM_VST_STATE
|
||||
FunctionEnd
|
||||
!macroend
|
||||
|
||||
!macro customInstall
|
||||
${If} $PRISM_VST_STATE == ${BST_CHECKED}
|
||||
DetailPrint "Installing Prism VST3 plugins to $COMMONFILES64\VST3"
|
||||
|
||||
${IfNot} ${FileExists} "$INSTDIR\resources\plugins\VST3\*.vst3"
|
||||
DetailPrint "ERROR: bundled Prism VST3 plugins were not found at $INSTDIR\resources\plugins\VST3"
|
||||
MessageBox MB_OK|MB_ICONSTOP "Prism VST3 plugins were selected, but the bundled plugin files were not found.$\r$\n$\r$\nMissing path:$\r$\n$INSTDIR\resources\plugins\VST3" /SD IDOK
|
||||
Abort
|
||||
${EndIf}
|
||||
|
||||
CreateDirectory "$COMMONFILES64\VST3"
|
||||
; xcopy /E recurse, /I treat dest as dir, /Y overwrite without prompt.
|
||||
; The trailing "\*" + "/E" copies each *.vst3 bundle subfolder verbatim.
|
||||
nsExec::ExecToLog 'cmd.exe /c xcopy /E /I /Y "$INSTDIR\resources\plugins\VST3\*" "$COMMONFILES64\VST3\"'
|
||||
Pop $0
|
||||
${If} $0 != 0
|
||||
DetailPrint "ERROR: Prism VST3 plugin copy failed with xcopy exit code $0"
|
||||
MessageBox MB_OK|MB_ICONSTOP "Prism VST3 plugin installation failed while copying files to:$\r$\n$COMMONFILES64\VST3$\r$\n$\r$\nxcopy exit code: $0" /SD IDOK
|
||||
Abort
|
||||
${EndIf}
|
||||
${Else}
|
||||
DetailPrint "Prism VST3 plugins: skipped (opted out)."
|
||||
${EndIf}
|
||||
!macroend
|
||||
!endif
|
||||
|
||||
!macro customUnInstall
|
||||
; Always attempt removal — harmless RMDir if the bundle isn't there (user opted
|
||||
; out at install or removed manually).
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism Spectrum.vst3"
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism Oscilloscope.vst3"
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism VU Meter.vst3"
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism Loudness Meter.vst3"
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism Vectorscope.vst3"
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism Spectrogram.vst3"
|
||||
RMDir /r "$COMMONFILES64\VST3\Prism Waveform.vst3"
|
||||
!macroend
|
||||
Reference in New Issue
Block a user