浏览代码

Fix compilation of Proton Experimental 8.0 on Ubuntu 18.04

Kron4ek 2 年之前
父节点
当前提交
d75b00c640
共有 2 个文件被更改,包括 32 次插入0 次删除
  1. 4 0
      build_wine.sh
  2. 28 0
      proton-exp-8.0.patch

+ 4 - 0
build_wine.sh

@@ -231,6 +231,10 @@ elif [ "$WINE_BRANCH" = "proton" ]; then
 		git clone https://github.com/ValveSoftware/wine -b "${PROTON_BRANCH}"
 	fi
 
+	if [ "${PROTON_BRANCH}" = "experimental_8.0" ]; then
+		patch -d wine -Np1 < "${scriptdir}"/proton-exp-8.0.patch
+	fi
+
 	WINE_VERSION="$(cat wine/VERSION | tail -c +14)-$(git -C wine rev-parse --short HEAD)"
 	BUILD_NAME=proton-"${WINE_VERSION}"
 else

+ 28 - 0
proton-exp-8.0.patch

@@ -0,0 +1,28 @@
+diff -ur proton-exp/dlls/winegstreamer/unixlib.c proton-exp-patched/dlls/winegstreamer/unixlib.c
+--- proton-exp/dlls/winegstreamer/unixlib.c	2023-07-19 09:55:49.342288280 +0000
++++ proton-exp-patched/dlls/winegstreamer/unixlib.c	2023-07-19 09:58:10.275236423 +0000
+@@ -214,23 +214,7 @@
+     GstCaps *caps;
+     gchar *str;
+ 
+-    if (!(caps = gst_type_find_helper_for_data_with_extension(NULL, data, size,
+-            extension ? extension + 1 : NULL, &probability)))
+-    {
+-        GST_ERROR("Failed to detect caps for url %s, data %p, size %u", url, data, size);
+-        return NULL;
+-    }
+-
+-    str = gst_caps_to_string(caps);
+-    if (probability > GST_TYPE_FIND_POSSIBLE)
+-        GST_INFO("Detected caps %s with probability %u for url %s, data %p, size %u",
+-                str, probability, url, data, size);
+-    else
+-        GST_FIXME("Detected caps %s with probability %u for url %s, data %p, size %u",
+-                str, probability, url, data, size);
+-    g_free(str);
+-
+-    return caps;
++    return NULL;
+ }
+ 
+ GstPad *create_pad_with_caps(GstPadDirection direction, GstCaps *caps)