Browse Source

Fix Proton Experimental 9.0 compilation

#123
Kron4ek 1 year ago
parent
commit
f8bd003937
3 changed files with 35 additions and 3 deletions
  1. 1 1
      LICENSE
  2. 7 2
      build_wine.sh
  3. 27 0
      proton-exp-9.0.patch

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2018-2023 Kron4ek
+Copyright (c) 2018-2024 Kron4ek
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 7 - 2
build_wine.sh

@@ -35,7 +35,8 @@ export WINE_BRANCH="${WINE_BRANCH:-staging}"
 
 # Available proton branches: proton_3.7, proton_3.16, proton_4.2, proton_4.11
 # proton_5.0, proton_5.13, experimental_5.13, proton_6.3, experimental_6.3
-# proton_7.0, experimental_7.0, proton_8.0, experimental_8.0, bleeding-edge
+# proton_7.0, experimental_7.0, proton_8.0, experimental_8.0, experimental_9.0
+# bleeding-edge
 # Leave empty to use the default branch.
 export PROTON_BRANCH="${PROTON_BRANCH:-proton_8.0}"
 
@@ -231,10 +232,14 @@ elif [ "$WINE_BRANCH" = "proton" ]; then
 		git clone https://github.com/ValveSoftware/wine -b "${PROTON_BRANCH}"
 	fi
 
-	if [ "${PROTON_BRANCH}" = "experimental_8.0" ] || [ "${PROTON_BRANCH}" = "bleeding-edge" ]; then
+	if [ "${PROTON_BRANCH}" = "experimental_8.0" ]; then
 		patch -d wine -Np1 < "${scriptdir}"/proton-exp-8.0.patch
 	fi
 
+	if [ "${PROTON_BRANCH}" = "experimental_9.0" ] || [ "${PROTON_BRANCH}" = "bleeding-edge" ]; then
+		patch -d wine -Np1 < "${scriptdir}"/proton-exp-9.0.patch
+	fi
+
 	WINE_VERSION="$(cat wine/VERSION | tail -c +14)-$(git -C wine rev-parse --short HEAD)"
 	if [[ "${PROTON_BRANCH}" == "experimental_"* ]] || [ "${PROTON_BRANCH}" = "bleeding-edge" ]; then
 		BUILD_NAME=proton-exp-"${WINE_VERSION}"

+ 27 - 0
proton-exp-9.0.patch

@@ -0,0 +1,27 @@
+--- proton-wine-a/dlls/winegstreamer/wg_source.c	2024-03-01 16:51:11.441373814 +0100
++++ proton-wine-b/dlls/winegstreamer/wg_source.c	2024-03-01 17:23:35.341565300 +0100
+@@ -82,23 +82,7 @@ static GstCaps *detect_caps_from_data(co
+     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;
+ }
+ 
+ static GstPad *create_pad_with_caps(GstPadDirection direction, GstCaps *caps)