Advertisement
emilwojcik93

protonprep

Jul 16th, 2021
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 13.32 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.     cd gst-plugins-base
  4.     git reset --hard HEAD
  5.     git clean -xdf
  6.     echo "add Guy's patch for gstreamer preroll buffer for media converter"
  7.     patch -Np1 < ../patches/gstreamer/mediaconvert-gstdecodebin2.patch
  8.     cd ..
  9.  
  10.     cd gst-plugins-ugly
  11.     git reset --hard HEAD
  12.     git clean -xdf
  13.     echo "add Guy's patch to fix wmv playback in gst-plugins-ugly"
  14.     patch -Np1 < ../patches/gstreamer/asfdemux-Re-initialize_demux-adapter_in_gst_asf_demux_reset.patch
  15.     patch -Np1 < ../patches/gstreamer/asfdemux-gst_asf_demux_reset_GST_FORMAT_TIME_fix.patch
  16.     cd ..
  17.  
  18.     cd lsteamclient
  19.     git reset --hard HEAD
  20.     git clean -xdf
  21.     echo "add warframe 5 minute crash fix"
  22.     patch -Np1 < ../patches/proton-hotfixes/proton-lsteamclient_disable_SteamController007_if_no_controller.patch
  23.     cd ..
  24.  
  25.     cd dxvk
  26.     git reset --hard HEAD
  27.     git clean -xdf
  28.  
  29.     echo "add valve dxvk patches"
  30.     patch -Np1 < ../patches/dxvk/proton-dxvk_avoid_spamming_log_with_requests_for_IWineD3D11Texture2D.patch
  31.     patch -Np1 < ../patches/dxvk/proton-dxvk_add_new_dxvk_config_library.patch
  32.  
  33.     echo "proton re8 fixups"
  34.     patch -Np1 < ../patches/dxvk/RE8_proton_fixups.patch
  35.  
  36. #    echo "add dxvk PR patches"
  37. #    patch -Np1 < ../patches/dxvk/1582.patch
  38.    
  39.     # this needs to be the last patch in the list.. because reasons?
  40.     echo "add dxvk async patch"
  41.     patch -Np1 < ../patches/dxvk/dxvk-async.patch
  42.     cd ..
  43.  
  44.     #WINE STAGING
  45.     cd wine-staging
  46.     git reset --hard HEAD
  47.     git clean -xdf
  48.    
  49.     # reenable pulseaudio patches
  50.     patch -Np1 < ../patches/wine-hotfixes/staging-reenable-pulse.patch
  51.     patch -RNp1 < ../patches/wine-hotfixes/staging-pulseaudio-reverts.patch
  52.  
  53.     # protonify syscall emulation
  54.     patch -Np1 < ../patches/wine-hotfixes/protonify_stg_syscall_emu.patch
  55.     cd ..
  56.  
  57.     #WINE
  58.     cd wine
  59.     git reset --hard HEAD
  60.     git clean -xdf
  61.  
  62.     #echo "revert d171d1116764260f4ae272c69b54e5dfd13c6835 which breaks the wayland driver"
  63.     #git revert --no-commit d171d1116764260f4ae272c69b54e5dfd13c6835
  64.  
  65.     # https://bugs.winehq.org/show_bug.cgi?id=49990
  66.     echo "revert bd27af974a21085cd0dc78b37b715bbcc3cfab69 which breaks some game launchers"
  67.     git revert --no-commit bd27af974a21085cd0dc78b37b715bbcc3cfab69
  68.    
  69.     # revert this because it breaks controllers on some platforms
  70.     # https://github.com/Frogging-Family/wine-tkg-git/issues/248#issuecomment-760471607
  71.     echo "revert e4fbae832c868e9fcf5a91c58255fe3f4ea1cb30 which breaks controller detection on some distros"
  72.     git revert --no-commit e4fbae832c868e9fcf5a91c58255fe3f4ea1cb30
  73.    
  74.     # this breaks sea of thieves
  75.     git revert --no-commit b8aaf86b2dbb8ecb3f7094cc40a0df89bb2add27
  76.    
  77.     echo "temporary pulseaudio reverts"
  78.     git revert --no-commit 2e64d91428757eaa88475b49bf50922cda603b59
  79.     git revert --no-commit f77af3dd6324fadaf153062d77b51f755f71faea
  80.     git revert --no-commit ce151dd681fe5ee80daba96dce12e37d6846e152
  81.     git revert --no-commit 77813eb7586779df0fb3b700000a17e339fd5ce3
  82.     git revert --no-commit d8e9621cfad50596378283704dfb1e6926d77ed8
  83.     git revert --no-commit a4149d53f734bf898087e22170eab5bed9a423d1
  84.     git revert --no-commit b4c7823bbb6a792098131f5572506784c8ed0f35
  85.     git revert --no-commit 70f59eb179d6a1c1b4dbc9e0a45b5731cd260793
  86.     git revert --no-commit e19d97ff4e2f5a7800d6df77b8acce95130b84c3
  87.     git revert --no-commit 4432b66e372caf0096df56f45502d7dea1f1800c
  88.     git revert --no-commit 6a6296562f536ed10d221f0df43ef30bbd674cb2
  89.     git revert --no-commit aba40bd50a065b3ac913dbc1263c38535fb5d9e7
  90.     git revert --no-commit bf74f36350c92daae84623dc0bd0530c212bb908
  91.     git revert --no-commit 1518e73b23211af738ae448a80466c0199f24419
  92.     git revert --no-commit 44e4132489c28b429737be022f6d4044c5beab3e
  93.     git revert --no-commit a6131544e87c554f70c21a04fb4697d8e1f508d5
  94.     git revert --no-commit 80b996c53c767fef4614f097f14c310285d9c081
  95.     git revert --no-commit 459e911b653c7519a335661a6c0b0894e86d2f1a
  96.     git revert --no-commit 42d826bc8c1d625ed2985ff06c2cd047209a1916
  97.     git revert --no-commit 30c17619e5401618122ca330cf0909f49b170a59
  98.     git revert --no-commit af84907ccad3e28f364ecfaa75ccb5fedf7f5a42
  99.     git revert --no-commit a5997bece730beb8ab72d66b824ed2a1cb92c254
  100.     git revert --no-commit 24a7c33fc1ad6dbab489284cfb6dba4130297ddb
  101.     git revert --no-commit 8cb88173d87efedce8c345beea05641f5617d857
  102.     git revert --no-commit 505d4b8b14913f3abd362bf27272e6b239cb6ce4
  103.     git revert --no-commit 638455136b4d30b853b02b77a2f33dc61c60b267
  104.     git revert --no-commit 13cac6287c454146eff73aabc4b92b5c8f76d4df
  105.     git revert --no-commit d7b957654d4739b8dd07c91f051b7940f416ef42
  106.     git revert --no-commit 8ea23d0d44ced0ce7dadc9b2546cbc56f6bce364
  107.     git revert --no-commit 0b0ae164f4ccebf4b5bc1bb1529a90786d2d5941
  108.     git revert --no-commit 131b7fd5e16a3da17aed28e86933074c5d663d9f
  109.     git revert --no-commit 8060e56b26add8eafffb211119798569ea3188ff
  110.     git revert --no-commit bca0706f3a93fa0a57f4dbdc6ae541e8f25afb34
  111.     git revert --no-commit b1ddfca16e4696a52adf2bdd8333eeffb3c6170c
  112.     git revert --no-commit a5d4079c8285c10ab2019c9fd9d19a6b22babb76
  113.     git revert --no-commit ebd344f2922f4044117904e024a0a87576a3eff1
  114.     git revert --no-commit 0eeefec6c56084a0677403aee46493e2c03a1dca
  115.     git revert --no-commit 5477f2b0156d16952a286dd0df148c2f60b71fe6
  116.     git revert --no-commit fa097243e06b3855a240c866a028add722025ead
  117.     git revert --no-commit 8df72bade54d1ef7a6d9e79f20ee0a2697019c13
  118.     git revert --no-commit e264ec9c718eb66038221f8b533fc099927ed966
  119.     git revert --no-commit d3673fcb034348b708a5d8b8c65a746faaeec19d
  120.  
  121.     # disable these when using proton's gamepad patches
  122.     # -W dinput-SetActionMap-genre \
  123.     # -W dinput-axis-recalc \
  124.     # -W dinput-joy-mappings \
  125.     # -W dinput-reconnect-joystick \
  126.     # -W dinput-remap-joystick \
  127.  
  128.     # these cause window freezes/hangs with origin
  129.     # -W winex11-_NET_ACTIVE_WINDOW \
  130.     # -W winex11-WM_WINDOWPOSCHANGING \
  131.  
  132.     # this needs to be disabled of disabling the winex11 patches above because staging has them set as a dependency.
  133.     # -W imm32-com-initialization
  134.  
  135.     # instead, we apply it manually:
  136.     # patch -Np1 < ../patches/wine-hotfixes/imm32-com-initialization_no_net_active_window.patch
  137.  
  138.     echo "applying staging patches"
  139.     ../wine-staging/patches/patchinstall.sh DESTDIR="." --all \
  140.     -W winex11-_NET_ACTIVE_WINDOW \
  141.     -W winex11-WM_WINDOWPOSCHANGING \
  142.     -W imm32-com-initialization \
  143.     -W bcrypt-ECDHSecretAgreement \
  144.     -W ntdll-NtAlertThreadByThreadId
  145.  
  146.     # apply this manually since imm32-com-initialization is disabled in staging.
  147.     patch -Np1 < ../patches/wine-hotfixes/imm32-com-initialization_no_net_active_window.patch
  148.  
  149.     echo "reverts"
  150.     # revert this, it breaks lsteamclient compilation
  151.     patch -RNp1 < ../wine-staging/patches/Compiler_Warnings/0031-include-Check-element-type-in-CONTAINING_RECORD-and-.patch
  152.  
  153.     # revert this, it breaks lsteamclient compilation
  154.     patch -RNp1 < ../patches/wine-hotfixes/__wine_make_process_system_restore.patch
  155.  
  156.     ### GAME PATCH SECTION ###    
  157.     echo "mech warrior online"
  158.     patch -Np1 < ../patches/game-patches/mwo.patch
  159.  
  160.     echo "assetto corsa"
  161.     patch -Np1 < ../patches/game-patches/assettocorsa-hud.patch
  162.  
  163.     # TODO: Add game-specific check
  164.     echo "mk11 patch"
  165.     patch -Np1 < ../patches/game-patches/mk11.patch
  166.  
  167.     # BLOPS2 uses CEG which does not work in proton. Disabled for now
  168. #    echo "blackops 2 fix"
  169. #    patch -Np1 < ../patches/game-patches/blackops_2_fix.patch
  170.  
  171.     echo "killer instinct vulkan fix"
  172.     patch -Np1 < ../patches/game-patches/killer-instinct-winevulkan_fix.patch
  173.  
  174.     ### END GAME PATCH SECTION ###
  175.    
  176.     ### PROTON PATCH SECTION ###
  177.    
  178.     echo "clock monotonic"
  179.     patch -Np1 < ../patches/proton/01-proton-use_clock_monotonic.patch
  180.    
  181.     #WINE FSYNC
  182.     echo "applying fsync patches"
  183.     patch -Np1 < ../patches/proton/03-proton-fsync_staging.patch
  184.  
  185.     echo "LAA"
  186.     patch -Np1 < ../patches/proton/04-proton-LAA_staging.patch
  187.    
  188.     echo "steamclient swap"
  189.     patch -Np1 < ../patches/proton/08-proton-steamclient_swap.patch
  190.  
  191.     echo "protonify"
  192.     patch -Np1 < ../patches/proton/10-proton-protonify_staging.patch
  193.  
  194.     echo "protonify-audio"
  195.     patch -Np1 < ../patches/proton/11-proton-pa-staging.patch
  196.  
  197.     echo "steam bits"
  198.     patch -Np1 < ../patches/proton/12-proton-steam-bits.patch
  199.  
  200. #    currently disabled in favor of wine's implementation
  201. #    echo "proton gamepad additions"
  202. #    patch -Np1 < ../patches/proton/15-proton-gamepad-additions.patch
  203.  
  204.     echo "Valve VR patches"
  205.     patch -Np1 < ../patches/proton/16-proton-vrclient-wined3d.patch
  206.  
  207.     echo "amd ags"
  208.     patch -Np1 < ../patches/proton/18-proton-amd_ags.patch
  209.  
  210.     echo "msvcrt overrides"
  211.     patch -Np1 < ../patches/proton/19-proton-msvcrt_nativebuiltin.patch
  212.  
  213.     echo "atiadlxx needed for cod games"
  214.     patch -Np1 < ../patches/proton/20-proton-atiadlxx.patch
  215.  
  216.     echo "valve registry entries"
  217.     patch -Np1 < ../patches/proton/21-proton-01_wolfenstein2_registry.patch
  218.     patch -Np1 < ../patches/proton/22-proton-02_rdr2_registry.patch
  219.     patch -Np1 < ../patches/proton/23-proton-03_nier_sekiro_ds3_registry.patch
  220.     patch -Np1 < ../patches/proton/24-proton-04_cod_registry.patch
  221.     patch -Np1 < ../patches/proton/32-proton-05_spellforce_registry.patch
  222.     patch -Np1 < ../patches/proton/33-proton-06_shadow_of_war_registry.patch
  223.     patch -Np1 < ../patches/proton/41-proton-07_nfs_registry.patch
  224.     patch -Np1 < ../patches/proton/45-proton-08_FH4_registry.patch
  225.     patch -Np1 < ../patches/proton/46-proton-09_nvapi_registry.patch
  226.     patch -Np1 < ../patches/proton/47-proton-10_dirt_5_registry.patch
  227.  
  228.     echo "valve rdr2 fixes"
  229.     patch -Np1 < ../patches/proton/25-proton-rdr2-fixes.patch
  230.    
  231.     echo "apply staging bcrypt patches on top of rdr2 fixes"
  232.     patch -Np1 < ../patches/wine-hotfixes/0001-bcrypt-Allow-multiple-backends-to-coexist.patch
  233.     patch -Np1 < ../patches/wine-hotfixes/0002-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch
  234.  
  235.     echo "set prefix win10"
  236.     patch -Np1 < ../patches/proton/28-proton-win10_default.patch
  237.  
  238.     echo "dxvk_config"
  239.     patch -Np1 < ../patches/proton/29-proton-dxvk_config.patch
  240.  
  241.     #this is needed specifically for proton, not needed for normal wine
  242.     echo "proton-specific manual mfplat dll register patch"
  243.     patch -Np1 < ../patches/proton/30-proton-mediafoundation_dllreg.patch
  244.  
  245. #    only needed with proton's gamepad patches
  246. #    echo "proton udev container patches"
  247. #    patch -Np1 < ../patches/proton/35-proton-udev_container_patches.patch
  248.  
  249. #    only needed with proton's gamepad patches
  250. #    echo "proton overlay patches"
  251. #    patch -Np1 < ../patches/proton/36-proton-overlay_fixes.patch
  252.  
  253.     echo "mouse focus fixes"
  254.     patch -Np1 < ../patches/proton/38-proton-mouse-focus-fixes.patch
  255.  
  256.     echo "CPU topology overrides"
  257.     patch -Np1 < ../patches/proton/39-proton-cpu-topology-overrides.patch
  258.  
  259.     echo "proton futex2 patches"
  260.     patch -Np1 < ../patches/proton/40-proton-futex2.patch
  261.  
  262.     ## VULKAN-CENTRIC PATCHES
  263.  
  264.     echo "fullscreen hack"
  265.     patch -Np1 < ../patches/proton/41-valve_proton_fullscreen_hack-staging-tkg.patch
  266.  
  267. #    disabled for now, needs rebase. only used for vr anyway
  268. #    echo "proton openxr patches"
  269. #    patch -Np1 < ../patches/proton/37-proton-OpenXR-patches.patch
  270.  
  271.     ## END VULKAN-CENTRIC PATCHES
  272.  
  273.     ### END PROTON PATCH SECTION ###
  274.  
  275.     ### WINE PATCH SECTION ###
  276.  
  277.     echo "mfplat additions"
  278.     patch -Np1 < ../patches/wine-hotfixes/mfplat-godfall-hotfix.patch
  279.  
  280.     # these are applied out of order since guy's mfplat patches are based on vanilla wine
  281.     echo "proton-specific mfplat video conversion patches"
  282.     patch -Np1 < ../patches/proton/34-proton-winegstreamer_updates.patch
  283.  
  284.     # witcher 3 + borderlands 3 breaker
  285.     patch -Np1 < ../patches/wine-hotfixes/205333
  286.  
  287.     # pending upstream wine fixes
  288.  
  289.     # additional pending mfplat fonv audio loop fix
  290.     patch -Np1 < ../patches/wine-hotfixes/205277
  291.  
  292.     # FH4 performance frequency patch
  293.     patch -Np1 < ../patches/wine-hotfixes/204113
  294.  
  295.     echo "proton QPC performance patch"
  296.     patch -Np1 < ../patches/wine-hotfixes/proton_QPC.patch
  297.  
  298.     echo "proton LFH performance patch"
  299.     patch -Np1 < ../patches/wine-hotfixes/proton_LFH.patch
  300.    
  301.     echo "Horizon Zero Dawn animations fix"
  302.     patch -Np1 < ../patches/wine-hotfixes/HZD_animations_pr112.patch
  303.  
  304.     # RPGMaker VX fix
  305.     patch -Np1 < ../patches/wine-hotfixes/rpgmaker.patch
  306.  
  307.     # bnet unfucker
  308.     patch -Np1 < ../patches/wine-hotfixes/pending_upstream_battlenet_unfucker.patch
  309.  
  310.     # server cpu usage unfucker
  311.     patch -Np1 < ../patches/wine-hotfixes/pending_upstream_server_cpu_unfucker.patch
  312.    
  313.     # BF4 ping fix
  314.     patch -Np1 < ../patches/wine-hotfixes/207990
  315.  
  316.     #disabled, still horribly broken
  317. #    patch -Np1 < ../patches/wine-hotfixes/wine_wayland_driver.patch
  318.  
  319.     ### END WINEPATCH SECTION ###
  320.  
  321.     #WINE CUSTOM PATCHES
  322.     #add your own custom patch lines below
  323.  
  324.     # Star Citizen patches
  325.     echo -e "\nSTAR CITIZEN PATCHES\n"
  326.     dir_patch="../patches/patches-2/**"
  327.     echo -e "List of files"
  328.     ls ${dir_patch}/*.patch
  329.     for file in $(ls ${dir_patch}/*.patch); do
  330.         echo -e "Applying patch: ${file}"
  331.         patch -Np1 < $file
  332.         sleep 1
  333.     done
  334.  
  335.     #end
  336.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement