[vlc-devel] [PATCH] package/win32: build.sh: Force Win7 and MSVCRT when not using UCRT

Steve Lhomme robux4 at ycbcr.xyz
Tue Jun 2 11:30:58 CEST 2020


That's the minimum we support in VLC 4.0.

The CRT version to set for UCRT is 0xE00.
---
 extras/package/win32/build.sh | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/extras/package/win32/build.sh b/extras/package/win32/build.sh
index c140e733b005..879b9cf701b7 100755
--- a/extras/package/win32/build.sh
+++ b/extras/package/win32/build.sh
@@ -202,7 +202,7 @@ fi
 
 if [ ! -z "$BUILD_UCRT" ]; then
     WIDL=${TRIPLET}-widl
-    CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_UCRT"
+    CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D__MSVCRT_VERSION__=0xE00 -D_UCRT"
 
     if [ ! -z "$WINSTORE" ]; then
         SHORTARCH="$SHORTARCH-uwp"
@@ -234,13 +234,16 @@ if [ ! -z "$BUILD_UCRT" ]; then
         CFLAGS="$CFLAGS -Wl,-lucrtbase,-lucrt"
         CXXFLAGS="$CXXFLAGS -Wl,-lucrtbase,-lucrt"
     fi
-    CFLAGS="$CPPFLAGS $CFLAGS"
-    CXXFLAGS="$CPPFLAGS $CXXFLAGS"
 
     # the values are not passed to the makefiles/configures
     export LDFLAGS
     export CPPFLAGS
+else
+    # The current minimum for VLC is Windows 7 and to use the regular msvcrt
+    CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 -D__MSVCRT_VERSION__=0x700"
 fi
+CFLAGS="$CPPFLAGS $CFLAGS"
+CXXFLAGS="$CPPFLAGS $CXXFLAGS"
 
 info "Building contribs"
 echo $PATH
-- 
2.26.2



More information about the vlc-devel mailing list