mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-04-09 11:00:19 +03:00
proton: Don't crash on setting up VR stuff in existing prefix
This commit is contained in:
parent
d35045de06
commit
04174e94e7
21
proton
21
proton
@ -21,6 +21,13 @@ def run_wine(args):
|
|||||||
else:
|
else:
|
||||||
subprocess.call(args, env=env, stdout=lfile, stderr=subprocess.STDOUT)
|
subprocess.call(args, env=env, stdout=lfile, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
|
def makedirs(path):
|
||||||
|
try:
|
||||||
|
os.makedirs(path)
|
||||||
|
except:
|
||||||
|
#already exists
|
||||||
|
pass
|
||||||
|
|
||||||
if not ("STEAM_COMPAT_DATA_PATH" in os.environ):
|
if not ("STEAM_COMPAT_DATA_PATH" in os.environ):
|
||||||
log("No compat data path?")
|
log("No compat data path?")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -74,11 +81,7 @@ if not os.path.isdir(prefix):
|
|||||||
#copy steam files into place
|
#copy steam files into place
|
||||||
steamdir = env["HOME"] + "/.steam/steam/legacycompat/"
|
steamdir = env["HOME"] + "/.steam/steam/legacycompat/"
|
||||||
dst = prefix + "/drive_c/Program Files (x86)/"
|
dst = prefix + "/drive_c/Program Files (x86)/"
|
||||||
try:
|
makedirs(dst + "Steam")
|
||||||
os.mkdir(dst + "Steam")
|
|
||||||
except:
|
|
||||||
#already exists
|
|
||||||
pass
|
|
||||||
filestocopy = ["steamclient.dll",
|
filestocopy = ["steamclient.dll",
|
||||||
"steamclient64.dll",
|
"steamclient64.dll",
|
||||||
"Steam.dll"]
|
"Steam.dll"]
|
||||||
@ -88,7 +91,7 @@ for f in filestocopy:
|
|||||||
|
|
||||||
#copy openvr files into place
|
#copy openvr files into place
|
||||||
dst = prefix + "/drive_c/vrclient/bin/"
|
dst = prefix + "/drive_c/vrclient/bin/"
|
||||||
os.makedirs(dst)
|
makedirs(dst)
|
||||||
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst)
|
shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst)
|
||||||
shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst)
|
shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst)
|
||||||
|
|
||||||
@ -135,11 +138,7 @@ if vr_runtime is None or \
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
try:
|
makedirs(prefix + "/drive_c/users/steamuser/Local Settings/Application Data/openvr")
|
||||||
os.makedirs(prefix + "/drive_c/users/steamuser/Local Settings/Application Data/openvr")
|
|
||||||
except:
|
|
||||||
#already exists
|
|
||||||
pass
|
|
||||||
|
|
||||||
#remove existing file
|
#remove existing file
|
||||||
vrpaths_name = prefix + "/drive_c/users/steamuser/Local Settings/Application Data/openvr/openvrpaths.vrpath"
|
vrpaths_name = prefix + "/drive_c/users/steamuser/Local Settings/Application Data/openvr/openvrpaths.vrpath"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user