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

Steve Lhomme git at videolan.org
Thu Aug 27 09:37:22 CEST 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 23 11:10:15 2020 +0200| [13589fc48b223b538ace34f6c899f2c0a10b6e25] | committer: Steve Lhomme

package/win32: build.sh: add a -o option to specify where to install vlc

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>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=13589fc48b223b538ace34f6c899f2c0a10b6e25
---

 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



More information about the vlc-commits mailing list