Skip to content

Commit

Permalink
Merge remote-tracking branch 'tkg/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
marzent committed Jan 27, 2024
2 parents ab46c17 + 135e11e commit 1032af3
Show file tree
Hide file tree
Showing 296 changed files with 266,499 additions and 2,625 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/wine-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- name: Compilation
run: |
sudo dnf -y -q update
sudo dnf -y -q upgrade --refresh
cd wine-tkg-git
sed -i 's/distro=""/distro="fedora"/' customization.cfg
touch tarplz
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wine-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
sudo aptitude remove -y '?narrow(?installed,?version(deb.sury.org))'
cd wine-tkg-git
sed -i 's/distro=""/distro="debuntu"/' customization.cfg
sed -i 's/_NOLIB32="false"/_NOLIB32="wow64"/' wine-tkg-profiles/advanced-customization.cfg
echo '_ci_build="true"' >> customization.cfg
touch tarplz
yes|./non-makepkg-build.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wine-valvexbe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
cd wine-tkg-git
sed -i 's/distro=""/distro="debuntu"/' customization.cfg
sed -i 's/LOCAL_PRESET=""/LOCAL_PRESET="valve-exp-bleeding"/' customization.cfg
sed -i 's/_NOLIB32="false"/_NOLIB32="wow64"/' wine-tkg-profiles/advanced-customization.cfg
echo '_ci_build="true"' >> customization.cfg
touch tarplz
yes|./non-makepkg-build.sh
Expand Down
2 changes: 1 addition & 1 deletion proton-tkg/proton-tkg-profiles/advanced-customization.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Some options will be missing from this config file compared to wine-tkg-git as they are enforced.

# Proton branch to target for lsteamclient libs and steam helper on 4.x+ - When using a Wine 3.x base, "proton_3.16" branch will be enforced
_proton_branch="experimental_7.0"
_proton_branch="experimental_8.0"

# Set to "true" to use the "noruntime" proton toolmanifest if available
# Set to "sniper" to use the experimental sniper runtime
Expand Down
2 changes: 1 addition & 1 deletion proton-tkg/proton-tkg-profiles/sample-external-config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ _no_autoinstall="false"
# PROTON-TKG OPTIONS

# Proton branch to target for lsteamclient libs and steam helper on 4.x+ - When using a Wine 3.x base, "proton_3.16" branch will be enforced
_proton_branch="experimental_7.0"
_proton_branch="experimental_8.0"

# Proton SDL Joystick support, xinput hacks and other gamepad additions. _gamepad_additions depends on _sdl_joy_support.
# This might be required for some FFB steering wheels, but can break gamepad support in some games.
Expand Down
45 changes: 31 additions & 14 deletions proton-tkg/proton-tkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function build_vrclient {
export CFLAGS="-O2 -g"
export CXXFLAGS="-Wno-attributes -std=c++0x -O2 -g"
PATH="$_nowhere"/proton_dist_tmp/bin:$PATH
if [[ "$_proton_branch" = *6.* ]] || [[ "$_proton_branch" = *7.* ]]; then
if [[ "$_proton_branch" = *6.* ]] || [[ "$_proton_branch" = *7.* ]] || [[ "$_proton_branch" = *8.* ]]; then
WINEMAKERFLAGS+=" -ldl"
elif [ "$_standard_dlopen" = "true" ] && [[ "$_proton_branch" != *5.13 ]]; then
patch -Np1 < "$_nowhere/proton_template/vrclient-remove-library.h-dep.patch" || exit 1
Expand All @@ -187,22 +187,31 @@ function build_vrclient {
rm -rf build/vrclient.win32
mkdir -p build/vrclient.win64
mkdir -p build/vrclient.win32
if [ ! -e "$_nowhere/proton_dist_tmp/include/wine/unixlib.h" ]; then
cp "$_wine_tkg_git_path/src/$_winesrcdir/include/wine/unixlib.h" "$_nowhere/proton_dist_tmp/include/wine/"
fi

cp -a "${_nowhere}"/Proton/vrclient_x64/* build/vrclient.win64
cp -a "${_nowhere}"/Proton/vrclient_x64/* build/vrclient.win32 && mv build/vrclient.win32/vrclient_x64 build/vrclient.win32/vrclient && mv build/vrclient.win32/vrclient/vrclient_x64.spec build/vrclient.win32/vrclient/vrclient.spec
cp -a "${_nowhere}"/Proton/vrclient_x64/* build/vrclient.win32
mv build/vrclient.win32/vrclient_x64 build/vrclient.win32/vrclient
if [ -e build/vrclient.win32/vrclient/vrclient_x64.spec ]; then
mv build/vrclient.win32/vrclient/vrclient_x64.spec build/vrclient.win32/vrclient/vrclient.spec
_vrclient_longpath64="/vrclient_x64"
_vrclient_longpath32="/vrclient"
fi

cd build/vrclient.win64
winemaker $WINEMAKERFLAGS -L"$_nowhere/proton_dist_tmp/$_lib64name/" -L"$_nowhere/proton_dist_tmp/$_lib64name/wine/" -I"$_nowhere/openvr/build/vrclient.win64/vrclient_x64/" -I"$_nowhere/openvr/build/vrclient.win64/" vrclient_x64
make -e CC="winegcc -m64" CXX="wineg++ -m64 $_cxx_addon" -C "$_nowhere/openvr/build/vrclient.win64/vrclient_x64" -j$(nproc) && strip --strip-debug vrclient_x64/vrclient_x64.dll.so || exit 1
winebuild --dll --fake-module -E "$_nowhere/openvr/build/vrclient.win64/vrclient_x64/vrclient_x64.spec" -o vrclient_x64.dll.fake || exit 1
winebuild --dll --fake-module -E "$_nowhere/openvr/build/vrclient.win64$_vrclient_longpath64/vrclient_x64.spec" -o vrclient_x64.dll.fake || exit 1
cd ../..

cd build/vrclient.win32
if [ "$_NOLIB32" != "true" ]; then
winemaker $WINEMAKERFLAGS --wine32 -L"$_nowhere/proton_dist_tmp/$_lib32name/" -L"$_nowhere/proton_dist_tmp/$_lib32name/wine/" -I"$_nowhere/openvr/build/vrclient.win32/vrclient/" -I"$_nowhere/openvr/build/vrclient.win32/" vrclient
make -e CC="winegcc -m32" CXX="wineg++ -m32 $_cxx_addon" -C "$_nowhere/openvr/build/vrclient.win32/vrclient" -j$(nproc) && strip --strip-debug vrclient/vrclient.dll.so || exit 1
fi
winebuild --dll --fake-module -E "$_nowhere/openvr/build/vrclient.win32/vrclient/vrclient.spec" -o vrclient.dll.fake || exit 1
winebuild --dll --fake-module -E "$_nowhere/openvr/build/vrclient.win32$_vrclient_longpath32/vrclient.spec" -o vrclient.dll.fake || exit 1
cd "$_nowhere"

mkdir -p proton_dist_tmp/lib/wine/dxvk
Expand Down Expand Up @@ -395,6 +404,8 @@ function build_mediaconverter {
fi

if [ "$_build_mediaconv" = "true" ]; then
# git 2.40 workaround
git config --local index.skipHash false && git add .
if [ -d "$_nowhere"/Proton/media-converter ]; then
cd "$_nowhere"/Proton/media-converter

Expand Down Expand Up @@ -436,7 +447,7 @@ function build_mediaconverter {

function build_steamhelper {
export CFLAGS="-Wno-attributes -O2 -g"
export CXXFLAGS="-Wno-attributes -O2 -g"
export CXXFLAGS="-Wno-attributes -O2 -g -fpermissive"
# disable openvr support for now since we don't support it
if [[ "$_proton_branch" = *6.3 ]]; then
_cxx_addon="-std=c++17"
Expand All @@ -457,7 +468,7 @@ function build_steamhelper {
fi
fi

if [ "$_processinfoclass" = "true" ]; then
if [[ "$_proton_branch" = *6.* ]] || [[ "$_proton_branch" = *7.* ]] && [ "$_processinfoclass" = "true" ]; then
( cd Proton && patch -Np1 < "$_nowhere/proton_template/steamhelper_PROCESSINFOCLASS.patch" ) || exit 1
fi

Expand Down Expand Up @@ -487,7 +498,7 @@ function build_steamhelper {
if [ "$_NOLIB32" != "true" ]; then
# 32-bit
if [ -e "$_nowhere"/Proton/steam_helper/32/libsteam_api.so ]; then
make -e CC="winegcc -m32" CXX="wineg++ -m32 $_cxx_addon" -C "$_nowhere/Proton/build/steam.win32" LIBRARIES="-L$_nowhere/Proton/steam_helper/32/ -lsteam_api -lole32 -lmsi -ldl -static-libgcc -static-libstdc++" -j$(nproc) && strip --strip-debug steam.exe.so || exit 1
make -e CC="winegcc -m32" CXX="wineg++ -m32 $_cxx_addon" -C "$_nowhere/Proton/build/steam.win32" LIBRARIES="-L$_nowhere/Proton/steam_helper/32/ -lsteam_api -lole32 -lshlwapi -lmsi -ldl -static-libgcc -static-libstdc++" -j$(nproc) && strip --strip-debug steam.exe.so || exit 1
else
make -e CC="winegcc -m32" CXX="wineg++ -m32 $_cxx_addon" -C "$_nowhere/Proton/build/steam.win32" LIBRARIES="-lsteam_api -lole32 -ldl -static-libgcc -static-libstdc++" -j$(nproc) && strip --strip-debug steam.exe.so || exit 1
fi
Expand All @@ -502,7 +513,7 @@ function build_steamhelper {
if [ -e "$_nowhere"/Proton/steam_helper/64/libsteam_api.so ]; then
cd "$_nowhere"/Proton/build/steam.win64
winemaker $WINEMAKERFLAGS --guiexe -lsteam_api -lole32 -I"$_nowhere/Proton/lsteamclient/steamworks_sdk_142/" -I"$_nowhere/openvr/headers/" -L"$_nowhere/Proton/steam_helper" .
make -e CC="winegcc -m64" CXX="wineg++ -m64 $_cxx_addon" -C "$_nowhere/Proton/build/steam.win64" LIBRARIES="-L$_nowhere/Proton/steam_helper/64/ -lsteam_api -lmsi -lole32 -ldl -static-libgcc -static-libstdc++" -j$(nproc) && strip --strip-debug steam.exe.so
make -e CC="winegcc -m64" CXX="wineg++ -m64 $_cxx_addon" -C "$_nowhere/Proton/build/steam.win64" LIBRARIES="-L$_nowhere/Proton/steam_helper/64/ -lsteam_api -lshlwapi -lmsi -lole32 -ldl -static-libgcc -static-libstdc++" -j$(nproc) && strip --strip-debug steam.exe.so


touch "$_nowhere/Proton/build/steam.win64/steam.spec"
Expand Down Expand Up @@ -718,8 +729,9 @@ function download_dxvk_version {
echo "#######################################################"
echo ""
echo "$_dxvk_version_response" \
| grep "browser_download_url.*tar.gz" \
| cut -d : -f 2,3 \
| jq .assets[].browser_download_url \
| grep -v "dxvk-native" \
| head -1 \
| tr -d \" \
| wget -qi -
break
Expand Down Expand Up @@ -929,11 +941,16 @@ else
cd Proton
fi

# Tooling compilation needs an update for latest BE - Use slightly older tooling for now
if [ -n "$_bleeding_tag" ] || [[ "$_proton_branch" = experimental_8* ]]; then
git checkout f5e9c76903e4e18e0416e719a6d42d0cb00998aa
fi

# Embed fake data to spoof desired fonts
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationSans-Regular" "Arial" "Arial" "Arial"
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationSans-Bold" "Arial-Bold" "Arial" "Arial Bold"
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationSerif-Regular" "TimesNewRoman" "Times New Roman" "Times New Roman"
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationMono-Regular" "CourierNew" "Courier New" "Courier New"
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationSans-Regular" "Arial" "Arial" "Arial" "$_nowhere/proton_template/share/fonts"/arial.ttf
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationSans-Bold" "Arial-Bold" "Arial" "Arial Bold" "$_nowhere/proton_template/share/fonts"/arialbd.ttf
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationSerif-Regular" "TimesNewRoman" "Times New Roman" "Times New Roman" "$_nowhere/proton_template/share/fonts"/times.ttf
fontforge -script "$_nowhere/Proton/fonts/scripts/generatefont.pe" "$_nowhere/proton_template/share/fonts/LiberationMono-Regular" "CourierNew" "Courier New" "Courier New" "$_nowhere/proton_template/share/fonts"/cour.ttf

# Build GST/mediaconverter
if [ "$_build_mediaconv" = "true" ] || [ "$_build_gstreamer" = "true" ]; then
Expand Down
8 changes: 8 additions & 0 deletions proton-tkg/proton_template/conf/proton
Original file line number Diff line number Diff line change
Expand Up @@ -1134,13 +1134,21 @@ class CompatData:
if not os.path.exists(self.prefix_dir + "drive_c/windows/syswow64"):
try_copy(g_proton.lib_dir + "wine/vkd3d-proton/d3d12.dll",
self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
try_copy(g_proton.lib_dir + "wine/vkd3d-proton/d3d12core.dll",
self.prefix_dir + "drive_c/windows/system32/d3d12core.dll")
g_session.dlloverrides["d3d12"] = "n"
g_session.dlloverrides["d3d12core"] = "n"
else:
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12.dll",
self.prefix_dir + "drive_c/windows/system32/d3d12.dll")
try_copy(g_proton.lib_dir + "wine/vkd3d-proton/d3d12.dll",
self.prefix_dir + "drive_c/windows/syswow64/d3d12.dll")
try_copy(g_proton.lib64_dir + "wine/vkd3d-proton/d3d12core.dll",
self.prefix_dir + "drive_c/windows/system32/d3d12core.dll")
try_copy(g_proton.lib_dir + "wine/vkd3d-proton/d3d12core.dll",
self.prefix_dir + "drive_c/windows/syswow64/d3d12core.dll")
g_session.dlloverrides["d3d12"] = "n"
g_session.dlloverrides["d3d12core"] = "n"

setup_game_dir_drive()
setup_steam_dir_drive()
Expand Down
2 changes: 1 addition & 1 deletion proton-tkg/proton_template/conf/user_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"PROTON_NVAPI_DISABLE": "1",

#Pass "--use-gl=osmesa" to the command line. Fixes various launchers showing up with a black window (Star Citizen, Warframe, etc..). Might give poor perf on native opengl games, so disable in case of issues.
"PROTON_GL_OSMESA": "1",
# "PROTON_GL_OSMESA": "1",

#Set a wine override to disable libglesv2. Fixes various launchers showing up with a black window (Star Citizen, Warframe, etc..). Alternative to running an app with `--use-gl=osmesa`, but more extreme.
#Known to break at least the Rockstar Games Launcher, so only use if the PROTON_GL_OSMESA option above doesn't fix your issue.
Expand Down
74 changes: 74 additions & 0 deletions proton-tkg/proton_template/ffmpeg_binutils.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
From: Rémi Denis-Courmont <[email protected]>
Date: Sun, 16 Jul 2023 15:18:02 +0000 (+0300)
Subject: avcodec/x86/mathops: clip constants used with shift instructions within inline assembly
X-Git-Tag: n6.1~1007
X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/effadce6c756247ea8bae32dc13bb3e6f464f0eb

avcodec/x86/mathops: clip constants used with shift instructions within inline assembly

Fixes assembling with binutil as >= 2.41

Signed-off-by: James Almer <[email protected]>
---

diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 6298f5ed19..ca7e2dffc1 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -35,12 +35,20 @@
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
{
int rt, dummy;
+ if (__builtin_constant_p(shift))
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
);
+ else
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
+ );
return rt;
}

@@ -113,19 +121,31 @@ __asm__ volatile(\
// avoid +32 for shift optimization (gcc should do that ...)
#define NEG_SSR32 NEG_SSR32
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}

#define NEG_USR32 NEG_USR32
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}


7 changes: 5 additions & 2 deletions proton-tkg/proton_template/gstreamer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

if [ "$_build_ffmpeg" = "true" ]; then
mkdir -p "$_nowhere"/Proton/build/FFmpeg64 && cd "$_nowhere"/Proton/build/FFmpeg64
( cd "$_nowhere"/external-resources/FFmpeg && patch -Np1 < "$_nowhere"/proton_template/ffmpeg_binutils.patch )

"$_nowhere"/Proton/FFmpeg/configure \
--prefix="$_nowhere/gst" \
Expand Down Expand Up @@ -235,6 +236,7 @@
-D gst-plugins-bad:voamrwbenc=disabled
-D gst-plugins-bad:x265=disabled
-D gst-plugins-bad:openexr=disabled
-D gst-plugins-bad:lc3=disabled
-D gst-plugins-ugly:gobject-cast-checks=disabled
-D gst-rtsp-server:gobject-cast-checks=disabled
-D gst-editing-services:validate=disabled
Expand Down Expand Up @@ -373,6 +375,8 @@
-D gst-plugins-good:rpicamsrc=disabled
-D gst-plugins-good:aalib=disabled
-D gst-plugins-good:alpha=disabled
-D gst-plugins-good:amrnb=disabled
-D gst-plugins-good:amrwbdec=disabled
-D gst-plugins-good:apetag=disabled
-D gst-plugins-good:audiofx=disabled
-D gst-plugins-good:auparse=disabled
Expand Down Expand Up @@ -474,6 +478,7 @@
-D gst-plugins-bad:soundtouch=disabled
-D gst-plugins-bad:svtav1=disabled
-D gst-plugins-bad:ladspa=disabled
-D gst-plugins-bad:lc3=disabled
-D gst-plugins-bad:ldac=disabled
-D gst-plugins-bad:openaptx=disabled
-D gst-plugins-bad:microdns=disabled
Expand All @@ -493,8 +498,6 @@
-D gst-plugins-bad:bs2b=disabled
-D gst-plugins-bad:timecode=disabled
-D gst-plugins-ugly:gobject-cast-checks=disabled
-D gst-plugins-ugly:amrnb=disabled
-D gst-plugins-ugly:amrwbdec=disabled
-D gst-plugins-ugly:cdio=disabled
-D gst-plugins-ugly:dvdread=disabled
-D gst-rtsp-server:gobject-cast-checks=disabled
Expand Down
Loading

0 comments on commit 1032af3

Please sign in to comment.