[vlc-commits] package/win32: build.sh: add a -o option to specify where to install vlc
    Steve Lhomme 
    git at videolan.org
       
    Fri Jun 26 11:41:35 CEST 2020
    
    
  
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 23 11:10:15 2020 +0200| [76f074e4d5377d979fd2e290d9f2b90c445a7ceb] | 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76f074e4d5377d979fd2e290d9f2b90c445a7ceb
---
 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 c31b5c095c..8dd2c9df2a 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
    
    
More information about the vlc-commits
mailing list