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

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 21 13:40:59 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.

(cherry picked from commit 76f074e4d5377d979fd2e290d9f2b90c445a7ceb) (rebased)

rebased:
- this branch doesn't have the MSI installer

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
---
 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 ed2b4107dc..86274410b1 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))
@@ -337,6 +341,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
 
@@ -350,4 +357,6 @@ make package-win32
 elif [ "$INSTALLER" = "u" ]; then
 make package-win32-release
 sha512sum vlc-*-release.7z
+elif [ ! -z "$INSTALL_PATH" ]; then
+make package-win-install
 fi
-- 
2.26.2



More information about the vlc-devel mailing list