Commit 6e8effb6 authored by Steve Lhomme's avatar Steve Lhomme

win32: use windowsappcompat instead of winstorecompat

This is the proper counterpart to windowsapp.

Now that we have a proper Docker image to build it:
registry.videolan.org/vlc-debian-llvm-uwp:20200603145315

A recent mingw64 8 (unreleased) is needed to make use of this. It's available
in our Docker images and in msys2 (although it's using msvcrt so it will
probably fail to link properly)

The forced -lwindowsappcompat is added like the other LDFLAGS in configure.ac.
parent 8f883369
...@@ -389,7 +389,7 @@ AS_IF([test "${SYS}" = "mingw32"],[ ...@@ -389,7 +389,7 @@ AS_IF([test "${SYS}" = "mingw32"],[
AX_APPEND_FLAG([-DWINSTORECOMPAT],[CFLAGS]) AX_APPEND_FLAG([-DWINSTORECOMPAT],[CFLAGS])
AX_APPEND_FLAG([-DWINSTORECOMPAT],[CPPFLAGS]) AX_APPEND_FLAG([-DWINSTORECOMPAT],[CPPFLAGS])
AX_APPEND_FLAG([-DWINSTORECOMPAT],[CXXFLAGS]) AX_APPEND_FLAG([-DWINSTORECOMPAT],[CXXFLAGS])
AX_APPEND_FLAG([-lwinstorecompat], [LDFLAGS]) LDFLAGS="${LDFLAGS} -lwindowsappcompat"
VLC_ADD_LIBS([libvlccore], [-lruntimeobject]) VLC_ADD_LIBS([libvlccore], [-lruntimeobject])
AC_LIBOBJ([gai_strerror]) AC_LIBOBJ([gai_strerror])
],[]) ],[])
......
...@@ -174,7 +174,7 @@ endif ...@@ -174,7 +174,7 @@ endif
ifdef HAVE_WINSTORE ifdef HAVE_WINSTORE
EXTRA_CFLAGS += -DWINSTORECOMPAT EXTRA_CFLAGS += -DWINSTORECOMPAT
EXTRA_LDFLAGS += -lwinstorecompat EXTRA_LDFLAGS += -lwindowsappcompat
endif endif
ifneq ($(findstring clang, $(shell $(CC) --version 2>/dev/null)),) ifneq ($(findstring clang, $(shell $(CC) --version 2>/dev/null)),)
......
...@@ -209,9 +209,9 @@ if [ ! -z "$BUILD_UCRT" ]; then ...@@ -209,9 +209,9 @@ if [ ! -z "$BUILD_UCRT" ]; then
CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_UNICODE -DUNICODE" CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_UNICODE -DUNICODE"
# WinstoreCompat: hopefully can go away someday # WinstoreCompat: hopefully can go away someday
LDFLAGS="$LDFLAGS -lwindowsapp -lwinstorecompat" LDFLAGS="$LDFLAGS -lwindowsapp -lwindowsappcompat"
CFLAGS="$CFLAGS -Wl,-lwindowsapp,-lwinstorecompat" CFLAGS="$CFLAGS -Wl,-lwindowsapp,-lwindowsappcompat"
CXXFLAGS="$CXXFLAGS -Wl,-lwindowsapp,-lwinstorecompat" CXXFLAGS="$CXXFLAGS -Wl,-lwindowsapp,-lwindowsappcompat"
CPPFLAGS="$CPPFLAGS -DWINSTORECOMPAT" CPPFLAGS="$CPPFLAGS -DWINSTORECOMPAT"
EXTRA_CRUNTIME="vcruntime140_app" EXTRA_CRUNTIME="vcruntime140_app"
else else
...@@ -234,7 +234,7 @@ if [ ! -z "$BUILD_UCRT" ]; then ...@@ -234,7 +234,7 @@ if [ ! -z "$BUILD_UCRT" ]; then
if [ ! -z "$WINSTORE" ]; then if [ ! -z "$WINSTORE" ]; then
# trick to provide these libraries instead of -ladvapi32 -lshell32 -luser32 -lkernel32 # trick to provide these libraries instead of -ladvapi32 -lshell32 -luser32 -lkernel32
sed -i -e "s/-ladvapi32/-lwindowsapp -lwinstorecompat/" $NEWSPECFILE sed -i -e "s/-ladvapi32/-lwindowsapp -lwindowsappcompat/" $NEWSPECFILE
sed -i -e "s/-lshell32//" $NEWSPECFILE sed -i -e "s/-lshell32//" $NEWSPECFILE
sed -i -e "s/-luser32//" $NEWSPECFILE sed -i -e "s/-luser32//" $NEWSPECFILE
sed -i -e "s/-lkernel32//" $NEWSPECFILE sed -i -e "s/-lkernel32//" $NEWSPECFILE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment