[vlc-devel] [PATCH 4/4] package/win32: build.sh: add a -o option to specify where to install vlc

Steve Lhomme robux4 at ycbcr.xyz
Tue Jun 23 13:57:30 CEST 2020


This is convenient to specify the output rather than relying on the _win32
location. It avoids copying files from _win32 to whatever the needed location
is (in the libvlc UWP script for example).

This may also be useful to build in WSL2 on the Linux filesystem and install
on the Windows filesystem. It may be faster than building with WSL1 on the
Windows filesystem.
---
 extras/package/win32/build.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
index c31b5c095cb..8dd2c9df2a2 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -32,11 +32,12 @@ OPTIONS:
    -u            Use the Universal C Runtime (instead of msvcrt)
    -w            Restrict to Windows Store APIs
    -z            Build without GUI (libvlc only)
+   -o <path>     Install the built binaries in the absolute path
 EOF
 }
 
 ARCH="x86_64"
-while getopts "hra:pcli:sb:dxuwz" OPTION
+while getopts "hra:pcli:sb:dxuwzo:" OPTION
 do
      case $OPTION in
          h)
@@ -83,6 +84,9 @@ do
          z)
              DISABLEGUI="yes"
          ;;
+         o)
+             INSTALL_PATH=$OPTARG
+         ;;
      esac
 done
 shift $(($OPTIND - 1))
@@ -355,6 +359,9 @@ if [ ! -z "$WINSTORE" ]; then
 else
     CONFIGFLAGS="$CONFIGFLAGS --enable-dvdread --enable-caca"
 fi
+if [ ! -z "$INSTALL_PATH" ]; then
+    CONFIGFLAGS="$CONFIGFLAGS --prefix=$INSTALL_PATH"
+fi
 
 ${SCRIPT_PATH}/configure.sh --host=$TRIPLET --with-contrib=../contrib/$CONTRIB_PREFIX $CONFIGFLAGS
 
@@ -370,4 +377,6 @@ make package-win32-release
 sha512sum vlc-*-release.7z
 elif [ "$INSTALLER" = "m" ]; then
 make package-msi
+elif [ ! -z "$INSTALL_PATH" ]; then
+make package-win-install
 fi
-- 
2.26.2



More information about the vlc-devel mailing list