Browse Source

vst: sandbox wine and update docs

undefined
sentriz 1 month ago
parent
commit
31d12ac503
No known key found for this signature in database GPG Key ID: 9A8DAE1CA907B862
7 changed files with 138 additions and 24 deletions
  1. +0
    -17
      conf_common/.config/fish/base.laptop.fish
  2. +93
    -0
      conf_extra/.config/pipewire/jack.conf
  3. +1
    -0
      conf_extra/.local/bin/wine
  4. +1
    -0
      conf_extra/.local/bin/winecfg
  5. +1
    -0
      conf_extra/.local/bin/winetricks
  6. +24
    -0
      conf_extra/.local/bin/yabridge-wine
  7. +18
    -7
      docs/desktop/daw.md

+ 0
- 17
conf_common/.config/fish/base.laptop.fish View File

@@ -32,25 +32,8 @@ set -gx ANDROID_HOME '/opt/android-sdk'
set -gx JAVA_HOME '/usr/lib/jvm/java-8-openjdk/'
set -gx JAVA_OPTS '-XX:+IgnoreUnrecognizedVMOptions'
set -gx PYLINTHOME "$XDG_DATA_HOME/pylint"
set -gx WINEPREFIX "$XDG_DATA_HOME/wine"
set -gx PYTHONHISTFILE "$XDG_CACHE_HOME/python_history"

set -gx --path VST_PATH \
'/usr/lib/vst/' \
'/usr/local/lib/vst/' \
"$HOME/.local/lib/vst" \
"$WINEPREFIX/drive_c/Program Files (x86)/Steinberg/VstPlugins" \
"$WINEPREFIX/drive_c/Program Files (x86)/VstPlugins" \
"$WINEPREFIX/drive_c/Program Files/Common Files/Steinberg/VST2" \
"$WINEPREFIX/drive_c/Program Files/Common Files/VST2" \
"$WINEPREFIX/drive_c/Program Files/Steinberg/VSTPlugins" \
"$WINEPREFIX/drive_c/Program Files/VSTPlugins"
set -gx --path VST3_PATH \
'/usr/lib/vst3/' \
'/usr/local/lib/vst3/' \
"$HOME/.local/lib/vst3" \
"$HOME/.vst3"

# gtk2/gtk3 theme
# also, gsettings commands parse these vars
set -gx GTK_THEME 'Arc-Dark'


+ 93
- 0
conf_extra/.config/pipewire/jack.conf View File

@@ -0,0 +1,93 @@
# JACK client config file for PipeWire version "0.3.38" #
#
# Copy and edit this file in /etc/pipewire for system-wide changes
# or in ~/.config/pipewire for local changes.

context.properties = {
## Configure properties in the system.
#mem.warn-mlock = false
#mem.allow-mlock = true
#mem.mlock-all = false
log.level = 0
}

context.spa-libs = {
#<factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
support.* = support/libspa-support
}

context.modules = [
#{ name = <module-name>
# [ args = { <key> = <value> ... } ]
# [ flags = [ [ ifexists ] [ nofail ] ]
#}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found.
# If nofail is given, module initialization failures are ignored.
#
#
# Boost the data thread priority.
{ name = libpipewire-module-rt
args = {
#nice.level = -11
#rt.prio = 88
rt.time.soft = -1
rt.time.hard = -1
}
flags = [ ifexists nofail ]
}

# The native communication protocol.
{ name = libpipewire-module-protocol-native }

# Allows creating nodes that run in the context of the
# client. Is used by all clients that want to provide
# data to PipeWire.
{ name = libpipewire-module-client-node }

# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
{ name = libpipewire-module-metadata }
]

# global properties for all jack clients
jack.properties = {
#node.latency = 1024/48000
#node.lock-quantum = false
#jack.merge-monitor = false
#jack.short-name = false
#jack.filter-name = false
#
# allow: Don't restrict self connect requests
# fail-external: Fail self connect requests to external ports only
# ignore-external: Ignore self connect requests to external ports only
# fail-all: Fail all self connect requests
# ignore-all: Ignore all self connect requests
#jack.self-connect-mode = allow
#jack.locked-process = true
}

# client specific properties
jack.rules = [
{
matches = [
{
# all keys must match the value. ~ starts regex.
#client.name = "Carla"
#application.process.binary = "jack_simple_client"
#application.name = "~jack_simple_client.*"
}
]
actions = {
update-props = {
#node.latency = 512/48000
}
}
}
]

+ 1
- 0
conf_extra/.local/bin/wine View File

@@ -0,0 +1 @@
yabridge-wine

+ 1
- 0
conf_extra/.local/bin/winecfg View File

@@ -0,0 +1 @@
yabridge-wine

+ 1
- 0
conf_extra/.local/bin/winetricks View File

@@ -0,0 +1 @@
yabridge-wine

+ 24
- 0
conf_extra/.local/bin/yabridge-wine View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash

export WINEARCH='win64'
export WINEDLLOVERRIDES="gdiplus=n;d2d1=;msvcrt=b,n"
export WINELOADER='/usr/bin/wine'
export WINEPREFIX="$XDG_DATA_HOME/wine"

exec bwrap \
--dev-bind / / \
--tmpfs "/mnt" \
--tmpfs "$HOME" \
--bind "$WINEPREFIX" "$WINEPREFIX" \
--bind-try "$XDG_DOCUMENTS_DIR/wine" "$XDG_DOCUMENTS_DIR" \
--bind-try "$XDG_CACHE_HOME/wine" "$XDG_CACHE_HOME/wine" \
--bind-try "$XDG_CACHE_HOME/winetricks" "$XDG_CACHE_HOME/winetricks" \
--bind-try "$HOME/daw" "$HOME/daw" \
--bind-try "$HOME/.vst" "$HOME/.vst" \
--bind-try "$HOME/.vst3" "$HOME/.vst3" \
--bind-try "$HOME/.vst3" "$HOME/.vst3" \
--bind-try "$HOME/daw" "$HOME/daw" \
--tmpfs "$XDG_RUNTIME_DIR" \
--bind-try "$XDG_RUNTIME_DIR/yabridge" "$XDG_RUNTIME_DIR/yabridge" \
--new-session \
"$(basename "$0")" "$@"

+ 18
- 7
docs/desktop/daw.md View File

@@ -2,7 +2,8 @@

this provides good renoise, jack, and windows vst support. where
pulseaudio programs will play just fine at the same time thanks to
pipewire
pipewire
wine is wrapped in a sandbox with `bwrap`

### packages

@@ -13,25 +14,35 @@ pipewire
- pipewire
- pipewire-jack-dropin
- realtime-privileges
- bubblewrap

### commands

$ # setup wine and vst deps
$ winetricks win7 winxp dotnet40 mdx vcrun6sp6 gdiplus corefonts
$ winecfg # -> libraries -> set gdiplus native
$ # -> set d2d1 disabled
$ # extra options WINEARCH, DDLOVERRIDES, etc are in fish config
$ winetricks sandbox win7 dotnet40 mdx gdiplus corefonts
$ winetricks vcrun6sp6 # broken currently

$ # allow unlimited mem lock size
$ usermod -a -G video "$USER"
$ usermod -a -G realtime "$USER"
$ # relog, and confirm
$ ulimit --lock-size
unlimited

$ # install vst
$ wine path/to/exe
$ # tell yabridge where to find windows vsts
$ yabridgectl add "$WINEPREFIX/drive_c/Program Files/VST/"
$ yabridgectl add "$WINEPREFIX/drive_c/Program Files (x86)/VST/"
$ # make sure it puts vst2s in ~/.vst, like it already does for ~/.vst3
$ ln -s "$WINEPREFIX/drive_c/Program Files/VST" ~/.vst/yabridge-64
$ ln -s "$WINEPREFIX/drive_c/Program Files (x86)/VST" ~/.vst/yabridge-32
$ yabridgectl sync

$ # install a new vst
$ wine path/to/exe # install to path mentioned above
$ yabridgectl sync

### see also

- [audio](./audio.md) (for the rest of pipewire stuff)
- fish config for `$VST_PATH`, `$VST3_PATH`
- `yabridge-wine` script, `$VST_PATH`, `$VST3_PATH`

Loading…
Cancel
Save