Advertisement
GostLy

Fix for playing Catherine Classic on linux

Jan 14th, 2022 (edited)
2,698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.69 KB | None | 0 0
  1. #!/bin/bash
  2. # script name: catherineClassic.fix.sh
  3. # author: GostLy
  4. #
  5. #!!! Download(Proton 6.1-GE-2):
  6. #!!! https://github.com/GloriousEggroll/proton-ge-custom/releases/download/6.1-GE-2/Proton-6.1-GE-2.tar.gz
  7. #!!! Follow the install instructions:
  8. #!!! https://github.com/GloriousEggroll/proton-ge-custom/wiki
  9. #
  10. # Linux dependencies: curl, git
  11. #
  12. ##################################################################################
  13. #                           !!!!READ ME FIRST!!!!                                #
  14. #                                                                                #
  15. # Before running this script it is important that you read this section.         #
  16. #                                                                                #
  17. # The following is required to do in steam:                                      #
  18. #                                                                                #
  19. # Inside your steam library find Catherine Classic and open properties:          #
  20. # Under Launch Options, add the following: PROTON_USE_WINED3D=1 %command%        #
  21. # Change compatibility to force the use of Proton-6.1-GE-2                       #
  22. # Now open/run the game once so that the wine pfx gets created.                  #
  23. #                                                                                #
  24. # Edit/verify the directories defined below (steamLib AND steamProtonDir)        #
  25. # Run the script and with any luck you'll be able to play Catherine Classic!     #
  26. #                                                                                #
  27. ##################################################################################
  28. # This script is intended to fix Catherine Classic so that it will work on Linux;#
  29. #                                                                                #
  30. #@@@ WARNING: There are no error checks in this script so use at your own risk!  #
  31. #@@@ But as long as you set all variables correctly there will be no problems ;) #
  32. ##################################################################################
  33.  
  34. # steamAppID should only be changed if you're trying to run this script for another game.
  35. steamAppID="893180" # Catherine Classic
  36.  
  37. # *** Edit: gitMethod *** set to either SSH or HTTPS
  38. # If you've never setup git to work with SSH then leave it set to HTTPS
  39. gitMethod="HTTPS"
  40.  
  41. # *** Edit: steamLib *** to the location where the game is installed
  42. # If you only have one drive on your PC then most likely you can use the default location
  43. steamLib=~/.steam/steam # Default Location of steam library
  44. #steamLib="/mnt/Samsung.500/SteamLibrary" # Example location of steam on another drive
  45.  
  46. # *** Edit: steamProtonDir *** to the location of the Proton version you intend to use with Catherine Classic;
  47. steamProtonDir=~/.steam/steam/compatibilitytools.d/Proton-6.1-GE-2
  48.  
  49. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  50. # @@@ NO EDITING REQUIRED BEYOND THIS POINT @@@
  51. # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  52.  
  53. winebin="$steamProtonDir/dist/bin"
  54. export WINEPREFIX="$steamLib/steamapps/compatdata/$steamAppID/pfx"
  55.  
  56. syswow64="$WINEPREFIX/drive_c/windows/syswow64"
  57.  
  58. # Install mediafoundation:
  59. if [ ! -d ~/tmp ]; then
  60.     mkdir -p ~/tmp
  61. fi
  62. cd ~/tmp
  63. if [ ! -f ~/tmp/mf-install/mf-install.sh ]; then   
  64.     if [ $gitMethod == "SSH" ]; then
  65.         git clone git@github.com:z0z0z/mf-install.git
  66.     else
  67.         git clone https://github.com/z0z0z/mf-install.git
  68.     fi
  69. fi
  70. cd mf-install
  71. PROTON="$steamProtonDir" ./mf-install.sh -proton
  72.  
  73. # Download needed DLL files:
  74. rm "$syswow64/dxva2.dll"
  75. rm "$syswow64/evr.dll"
  76. curl -o "$syswow64/dxva2.dll" https://github.com/GostLy/GLib/raw/main/dxva2.dll
  77. curl -o "$syswow64/evr.dll" https://github.com/GostLy/GLib/raw/main/evr.dll
  78. curl -o "$syswow64/mp4sdecd.dll" https://github.com/GostLy/GLib/raw/main/mp4sdecd.dll
  79. curl -o "$syswow64/wmadmod.dll" https://github.com/GostLy/GLib/raw/main/wmadmod.dll
  80.  
  81. # Register DLL files inside of WINEPREFIX:
  82. $winebin/wine regsvr32 $syswow64/evr.dll
  83. $winebin/wine regsvr32 $syswow64/mp4sdecd.dll
  84. $winebin/wine regsvr32 $syswow64/wmadmod.dll
  85.  
  86. # Add DLL's to the registry
  87. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\CLSID\\{41457294-644c-4298-a28a-bd69f2c0cf3b}" /f /t REG_SZ /v "" /d "ASF Byte Stream Handler"
  88. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\CLSID\\{41457294-644c-4298-a28a-bd69f2c0cf3b}\\InprocServer32" /f /t REG_SZ /v "" /d "C:\\windows\\system32\\mf.dll"
  89. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\CLSID\\{41457294-644c-4298-a28a-bd69f2c0cf3b}\\InprocServer32" /f /t REG_SZ /v "ThreadingModel" /d "Both"
  90. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\MediaFoundation\\Transforms\\2eeb4adf-4578-4d10-bca7-bb955f56320a" /f /t REG_SZ /v "" /d "WMAudio Decoder MFT"
  91. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\MediaFoundation\\Transforms\\2eeb4adf-4578-4d10-bca7-bb955f56320a" /f /t REG_BINARY /v "InputTypes" /d "6175647300001000800000aa00389b716101000000001000800000aa00389b716175647300001000800000aa00389b716201000000001000800000aa00389b71"
  92. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\MediaFoundation\\Transforms\\2eeb4adf-4578-4d10-bca7-bb955f56320a" /f /t REG_BINARY /v "OutputTypes" /d "6175647300001000800000aa00389b710300000000001000800000aa00389b716175647300001000800000aa00389b710100000000001000800000aa00389b71"
  93. $winebin/wine64 reg add "HKEY_CLASSES_ROOT\\Wow6432Node\\MediaFoundation\\Transforms\\Categories\\9ea73fb4-ef7a-4559-8d5d-719d8f0426c7\\2eeb4adf-4578-4d10-bca7-bb955f56320a"
  94.  
  95. echo "Try playing Catherine Classic now and enjoy!"
  96.  
  97. # You can also find the script here: https://github.com/GostLy/GLib/tree/main/scripts
  98. # Download the file catherineClassic.fix.sh (Right click > Save link/target as...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement