Created
April 25, 2020 17:39
-
-
Save MadMcCrow/98fff704a81ef879885bc8fbc9753ba8 to your computer and use it in GitHub Desktop.
Script to fix dotnet35 for steamapps. may not work with all apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First sanity check | |
if [ -z "$1" ] | |
then | |
echo "No app name supplied will exit" | |
exit | |
fi | |
if [ -z "$2" ] | |
then | |
echo "No app code supplied will exit" | |
exit | |
fi | |
# Can work with multiple proton version | |
PROTONVERSION="4.2" | |
if [ -z "$3" ] | |
then | |
echo -e "no proton version supplied will use 4.2\n" | |
else | |
PROTONVERSION=$3 | |
fi | |
# final folder paths : | |
STEAMdotnetfx35FOLDER="$HOME/.steam/debian-installation/steamapps/common/$1/Dependencies" | |
STEAMAPPFOLDER="$HOME/.steam/debian-installation/steamapps/compatdata/$2" | |
PROTONFOLDER="$HOME/.steam/debian-installation/steamapps/common/Proton $PROTONVERSION" | |
# checking for dotnetfx exe to launch | |
if [ -d "$STEAMdotnetfx35FOLDER" ] | |
then | |
echo -e "found dotnetfx exe at : $STEAMdotnetfx35FOLDER \n" | |
else | |
echo -e "Warning: could not find dotnetfx exe at $STEAMdotnetfx35FOLDER \n" | |
fi | |
# Sanity check | |
if [ -d "$STEAMAPPFOLDER" ] | |
then | |
echo -e "found steam app at : $STEAMAPPFOLDER \n" | |
else | |
echo -e "Error: could not find steam app at $STEAMAPPFOLDER \n" | |
exit | |
fi | |
if [ -d "$PROTONFOLDER" ] | |
then | |
echo -e "found proton data at : $PROTONFOLDER \n" | |
else | |
echo -e "Error: could not find proton data at $PROTONFOLDER \n" | |
exit | |
fi | |
# following https://steamcommunity.com/sharedfiles/filedetails/?id=1828877648 | |
# You get into the folder with Proton prefix, | |
cd "$STEAMAPPFOLDER" | |
# you backup the Steam folder into the folder you are currently in and remove the prefix. | |
cp -r "pfx/drive_c/Program Files (x86)/Steam/" . | |
rm -r pfx | |
# After 32 bit wine prefix is created, winecfg window will open. | |
# While you're at it, set Windows version to Windows XP | |
# otherwise you won't be able to install the .NET the way I show. | |
WINEPREFIX="$STEAMAPPFOLDER"/pfx WINEARCH=win32 winecfg | |
echo -e "\nWARNING : et Windows version to Windows XP\n" | |
# For reasons unknown to me, Proton keeps crashing unless the folder syswow64 is created. | |
# After that, you can just copy the Steam folder backup into Program Files folder. | |
mkdir pfx/drive_c/windows/syswow64/ | |
cp -r Steam "pfx/drive_c/Program Files/" | |
WINEPREFIX=$PWD/pfx WINEARCH=win32 wine "$STEAMdotnetfx35FOLDER/dotnetfx35.exe" | |
cd "$PROTONFOLDER" | |
sed -i 's/wine64/wine/' proton |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment