proton: Also track Steam files

We want to remove these on downgrade, as older Proton versions aren't
set up to intercept GameOverlayRenderer.
This commit is contained in:
Andrew Eikum 2020-08-10 14:23:31 -05:00
parent 0ac177efaa
commit 8130c38a19

47
proton
View File

@ -454,21 +454,38 @@ class CompatData:
#create font files symlinks #create font files symlinks
self.create_fonts_symlinks() self.create_fonts_symlinks()
#copy steam files into place with open(self.tracked_files_file, "a") as tracked_files:
dst = self.prefix_dir + "/drive_c/Program Files (x86)/" #copy steam files into place
makedirs(dst + "Steam") steam_dir = "drive_c/Program Files (x86)/Steam/"
filestocopy = [("steamclient.dll", "steamclient.dll"), dst = self.prefix_dir + steam_dir
("steamclient64.dll", "steamclient64.dll"), makedirs(dst)
("GameOverlayRenderer64.dll", "GameOverlayRenderer64.dll"), filestocopy = [("steamclient.dll", "steamclient.dll"),
("SteamService.exe", "steam.exe"), ("steamclient64.dll", "steamclient64.dll"),
("Steam.dll", "Steam.dll")] ("GameOverlayRenderer64.dll", "GameOverlayRenderer64.dll"),
for (src,tgt) in filestocopy: ("SteamService.exe", "steam.exe"),
srcfile = steamdir + '/legacycompat/' + src ("Steam.dll", "Steam.dll")]
if os.path.isfile(srcfile): for (src,tgt) in filestocopy:
dstfile = dst + "Steam/" + tgt srcfile = steamdir + '/legacycompat/' + src
if os.path.isfile(dstfile): if os.path.isfile(srcfile):
os.remove(dstfile) dstfile = dst + tgt
try_copy(srcfile, dstfile) if os.path.isfile(dstfile):
os.remove(dstfile)
else:
tracked_files.write(steam_dir + tgt + "\n")
try_copy(srcfile, dstfile)
filestocopy = [("steamclient64.dll", "steamclient64.dll"),
("GameOverlayRenderer.dll", "GameOverlayRenderer.dll"),
("GameOverlayRenderer64.dll", "GameOverlayRenderer64.dll")]
for (src,tgt) in filestocopy:
srcfile = g_proton.path(src)
if os.path.isfile(srcfile):
dstfile = dst + tgt
if os.path.isfile(dstfile):
os.remove(dstfile)
else:
tracked_files.write(steam_dir + tgt + "\n")
try_copy(srcfile, dstfile)
#copy openvr files into place #copy openvr files into place
dst = self.prefix_dir + "/drive_c/vrclient/bin/" dst = self.prefix_dir + "/drive_c/vrclient/bin/"