summaryrefslogtreecommitdiff
path: root/tools/linux_packaging/stage2.run.in
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-12-16 22:39:00 +0100
committerRobin Gareus <robin@gareus.org>2015-12-16 23:22:05 +0100
commit259dbaea520be3a8f60fe517e2ea22da624691ef (patch)
treefaa30c97eb4f78bc5ad0e65e243825e1b09e7db0 /tools/linux_packaging/stage2.run.in
parent53d8b454579a2343c0976d9aafb3013e2a9d432a (diff)
fun hacks for wine
windows-VST? yes, we could.
Diffstat (limited to 'tools/linux_packaging/stage2.run.in')
-rwxr-xr-xtools/linux_packaging/stage2.run.in53
1 files changed, 53 insertions, 0 deletions
diff --git a/tools/linux_packaging/stage2.run.in b/tools/linux_packaging/stage2.run.in
index ea83a57e20..ba8e280a3a 100755
--- a/tools/linux_packaging/stage2.run.in
+++ b/tools/linux_packaging/stage2.run.in
@@ -313,6 +313,19 @@ else
fi
fi
+if %REPLACE_WINE%; then
+ if -z "`which wine`"; then
+ echo ""
+ echo "!!! ERROR !!! - 'wine' was not found."
+ echo ""
+ echo "This version of Ardour with Windows VST support requires wine."
+ echo "https://www.winehq.org/"
+ echo ""
+ read -p "Press ENTER to exit installer:" BLAH
+ exit 1
+ fi
+fi
+
#####################
# Unpack the bundle
#####################
@@ -376,6 +389,46 @@ then
fi
#################################################
+# Set up libwine.so
+#################################################
+if %REPLACE_WINE%; then
+ echo ""
+ echo "Searching for libwine.so (Windows VST support)"
+ echo ""
+ # we need to add libwine to ardour's LD_LIBRARY_PATH
+ # libwine itself includes paths to the various system-components
+ # which may be different on each platform.
+ #
+ # There's some chicken/egg here: ardour.exe.so is linked against libwine.so
+ # at build-time. wine/wineloader assumes a windows-application (which does not use libwine
+ # directly) and does not set up the LD path to libwine itself. the application terminates
+ # (missing libs) before it even starts..
+ #
+ # wine itself does not provide means to find the location of libwine.
+ # /usr/bin/wine is usually shell-script and libwine.so can be found in
+ # various places on different distros.
+ #
+ # if this check were quick and easy.. it should be done in the startup-script, but it's not
+ # so here we go... (updating wine may require re-installing ardour)
+ #
+ LIBWINE=$(
+ LD_DEBUG=files wine `pwd`/${BUNDLE_DIR}/lib/ardour-vst-scanner.exe.so 2>&1 \
+ | grep -e "calling init:.*libwine" \
+ | sed 's/^.*calling init: //' \
+ | uniq \
+ )
+ if ! test -f "$LIBWINE"; then
+ echo ""
+ echo "!!! ERROR !!! - 'libwine.so*' was not found."
+ echo ""
+ read -p "Press ENTER to exit installer:" BLAH
+ exit 1
+ fi
+ # this replaces/overwrites the bundled libwine
+ cp -L "$LIBWINE" `pwd`/${BUNDLE_DIR}/lib/libwine.so.1
+fi
+
+#################################################
# Check if system libs are OK (libc, etc)
#################################################