[vlc-commits] [Git][videolan/vlc][master] 3 commits: package/win32: move the configuration flags above the calls

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Feb 3 10:37:10 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6dd14208 by Steve Lhomme at 2023-02-03T10:06:27+00:00
package/win32: move the configuration flags above the calls

No functional changes.

- - - - -
7e2b8ecd by Steve Lhomme at 2023-02-03T10:06:27+00:00
package/win32: add an option to build with meson

Only cross compiling is supported for now. But we don't really build it
in other ways.

- - - - -
d9e8ad8b by Steve Lhomme at 2023-02-03T10:06:27+00:00
package/win32: always bootstrap

We always do a configure after that, so the extra time saved not doing the
bootstrap is peanuts. On the other hand, it prevents using a proper
configure script when switching to a different branch.

Effectively reverts abd6fbe4b2d39969e5f691892c181e7cc9aa1d1a

- - - - -


1 changed file:

- extras/package/win32/build.sh


Changes:

=====================================
extras/package/win32/build.sh
=====================================
@@ -37,11 +37,12 @@ OPTIONS:
    -w            Restrict to Windows Store APIs
    -z            Build without GUI (libvlc only)
    -o <path>     Install the built binaries in the absolute path
+   -m            Build with Meson rather than autotools
 EOF
 }
 
 ARCH="x86_64"
-while getopts "hra:pcli:W:sb:dD:xS:uwzo:" OPTION
+while getopts "hra:pcli:W:sb:dD:xS:uwzo:m" OPTION
 do
      case $OPTION in
          h)
@@ -101,6 +102,9 @@ do
          o)
              INSTALL_PATH=$OPTARG
          ;;
+         m)
+             BUILD_MESON="yes"
+         ;;
      esac
 done
 shift $(($OPTIND - 1))
@@ -363,14 +367,6 @@ else
 fi
 cd ../..
 
-info "Bootstrapping"
-
-if ! [ -e ${VLC_ROOT_PATH}/configure ]; then
-    echo "Bootstraping vlc"
-    ${VLC_ROOT_PATH}/bootstrap
-fi
-
-info "Configuring VLC"
 if [ -z "$PKG_CONFIG" ]; then
     if [ `unset PKG_CONFIG_LIBDIR; $TRIPLET-pkg-config --version 1>/dev/null 2>/dev/null || echo FAIL` = "FAIL" ]; then
         # $TRIPLET-pkg-config DOESNT WORK
@@ -387,16 +383,16 @@ if [ -z "$PKG_CONFIG" ]; then
     fi
 fi
 
-mkdir -p $SHORTARCH
-cd $SHORTARCH
-
 if [ "$RELEASE" != "yes" ]; then
      CONFIGFLAGS="$CONFIGFLAGS --enable-debug"
+     MCONFIGFLAGS="$MCONFIGFLAGS --buildtype debugoptimized"
 else
      CONFIGFLAGS="$CONFIGFLAGS --disable-debug"
+     MCONFIGFLAGS="$MCONFIGFLAGS --buildtype release"
 fi
 if [ "$I18N" != "yes" ]; then
      CONFIGFLAGS="$CONFIGFLAGS --disable-nls"
+     MCONFIGFLAGS="$MCONFIGFLAGS -Dnls=disabled"
 fi
 if [ ! -z "$BREAKPAD" ]; then
      CONFIGFLAGS="$CONFIGFLAGS --with-breakpad=$BREAKPAD"
@@ -413,23 +409,51 @@ if [ ! -z "$EXTRA_CHECKS" ]; then
 fi
 if [ ! -z "$DISABLEGUI" ]; then
     CONFIGFLAGS="$CONFIGFLAGS --disable-vlc --disable-qt --disable-skins2"
+    MCONFIGFLAGS="$MCONFIGFLAGS -Dvlc=false -Dqt=disabled"
+    # MCONFIGFLAGS="$MCONFIGFLAGS -Dskins2=disabled"
 else
     CONFIGFLAGS="$CONFIGFLAGS --enable-qt --enable-skins2"
+    MCONFIGFLAGS="$MCONFIGFLAGS -Dqt=enabled"
+    # MCONFIGFLAGS="$MCONFIGFLAGS -Dskins2=enabled"
 fi
 if [ ! -z "$WINSTORE" ]; then
     CONFIGFLAGS="$CONFIGFLAGS --enable-winstore-app"
+    MCONFIGFLAGS="$MCONFIGFLAGS -Dwinstore_app=true"
     # uses CreateFile to access files/drives outside of the app
     CONFIGFLAGS="$CONFIGFLAGS --disable-vcd"
+    MCONFIGFLAGS="$MCONFIGFLAGS -Dvcd_module=false"
     # other modules that were disabled in the old UWP builds
     CONFIGFLAGS="$CONFIGFLAGS --disable-dxva2"
+    # MCONFIGFLAGS="$MCONFIGFLAGS -Ddxva2=disabled"
 
 else
     CONFIGFLAGS="$CONFIGFLAGS --enable-dvdread --enable-caca"
+    MCONFIGFLAGS="$MCONFIGFLAGS -Ddvdread=enabled -Dcaca=enabled"
 fi
 if [ ! -z "$INSTALL_PATH" ]; then
     CONFIGFLAGS="$CONFIGFLAGS --with-packagedir=$INSTALL_PATH"
 fi
 
+if [ -n "$BUILD_MESON" ]; then
+    mkdir -p $SHORTARCH-meson
+    rm -rf $SHORTARCH-meson/meson-private
+
+    info "Configuring VLC"
+    BUILD_PATH="$( pwd -P )"
+    cd ${VLC_ROOT_PATH}
+    meson setup ${BUILD_PATH}/$SHORTARCH-meson $MCONFIGFLAGS --cross-file ${BUILD_PATH}/contrib/contrib-$SHORTARCH/crossfile.meson --cross-file ${BUILD_PATH}/contrib/$CONTRIB_PREFIX/share/meson/cross/contrib.ini
+
+    info "Compiling"
+    cd ${BUILD_PATH}/$SHORTARCH-meson
+    meson compile -j $JOBS
+else
+info "Bootstrapping"
+${VLC_ROOT_PATH}/bootstrap
+
+mkdir -p $SHORTARCH
+cd $SHORTARCH
+
+info "Configuring VLC"
 ${SCRIPT_PATH}/configure.sh --host=$TRIPLET --with-contrib=../contrib/$CONTRIB_PREFIX "$WIXPATH" $CONFIGFLAGS
 
 info "Compiling"
@@ -448,3 +472,4 @@ make package-msi
 elif [ ! -z "$INSTALL_PATH" ]; then
 make package-win-common
 fi
+fi



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/79fa6af0a98921f9d34933761f4fe20ef6c35309...d9e8ad8b02452fc5c601e96e70233458562c4ee9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/79fa6af0a98921f9d34933761f4fe20ef6c35309...d9e8ad8b02452fc5c601e96e70233458562c4ee9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list