[vlc-devel] [PATCH] package/win32: build.sh: don't require a wine installation on WSL

Steve Lhomme robux4 at ycbcr.xyz
Fri Jan 31 11:24:04 CET 2020


No need to add a lot of packages just to run one program.
---
 extras/package/win32/build.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
index f46fbe832b7..3163a42aff2 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -122,6 +122,19 @@ if [ "$INTERACTIVE" != "yes" ] || [ ! -f ./Makefile ]; then
     NEEDED="$FORCED_TOOLS" ${SCRIPT_PATH}/../../tools/bootstrap
 fi
 make -j$JOBS
+
+# avoid installing wine on WSL
+# wine is needed to build Qt with shaders
+if test -z "`which wine`"
+then
+    if test -n "`which wsl.exe`"
+    then
+        echo "Using wsl.exe to replace wine"
+        echo "#!/bin/sh" > build/bin/wine
+        echo "wsl.exe \"\$@\"" >> build/bin/wine
+    fi
+fi
+
 cd ../../
 
 export USE_FFMPEG=1
-- 
2.17.1



More information about the vlc-devel mailing list