diff --git a/proton b/proton index 67dbb6b606..59037d8d6c 100755 --- a/proton +++ b/proton @@ -810,7 +810,9 @@ class CompatData: os.symlink("/", self.prefix_dir + "/dosdevices/z:") # collect configuration info - steamdir = os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"] + steamdir = os.environ.get("STEAM_COMPAT_CLIENT_INSTALL_PATH") + if steamdir is None: + steamdir = "" use_wined3d = "wined3d" in g_session.compat_config use_dxvk_dxgi = not use_wined3d and \ @@ -892,10 +894,11 @@ class CompatData: ("GameOverlayRenderer64.dll", "GameOverlayRenderer64.dll"), ("SteamService.exe", "steam.exe"), ("Steam.dll", "Steam.dll")] - for (src,tgt) in filestocopy: - srcfile = steamdir + '/legacycompat/' + src - if os.path.isfile(srcfile): - try_copy(srcfile, steam_dir + tgt, prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) + if steamdir: + for (src,tgt) in filestocopy: + srcfile = steamdir + '/legacycompat/' + src + if os.path.isfile(srcfile): + try_copy(srcfile, steam_dir + tgt, prefix=self.prefix_dir, track_file=tracked_files, link_debug=True) filestocopy = [("steamclient64.dll", "steamclient64.dll"), ("GameOverlayRenderer.dll", "GameOverlayRenderer.dll"), @@ -996,7 +999,7 @@ class CompatData: # add Steam ffmpeg libraries to path use_ffmpeg = "PROTON_NO_STEAM_FFMPEG" not in os.environ or not nonzero(os.environ["PROTON_NO_STEAM_FFMPEG"]) - if use_ffmpeg and 'nosteamffmpeg' not in g_session.compat_config: + if use_ffmpeg and 'nosteamffmpeg' not in g_session.compat_config and steamdir: prepend_to_env_str(g_session.env, ld_path_var, steamdir + "/ubuntu12_64/video/:" + steamdir + "/ubuntu12_32/video/", ":") def comma_escaped(s): @@ -1647,10 +1650,13 @@ if __name__ == "__main__": if g_proton.missing_default_prefix(): g_proton.make_default_prefix() - g_session.init_session(sys.argv[1] != "runinprefix") + g_session.init_session(len(sys.argv) < 2 or sys.argv[1] != "runinprefix") #determine mode rc = 0 + if len(sys.argv) < 2: + log("Need a verb.") + sys.exit(1) if sys.argv[1] == "run": #start target app setup_game_dir_drive() @@ -1674,7 +1680,7 @@ if __name__ == "__main__": path = subprocess.check_output([g_proton.wine_bin, "winepath", sys.argv[2]], env=g_session.env, stderr=g_session.log_file) sys.stdout.buffer.write(path) else: - log("Need a verb.") + log("Bad verb.") sys.exit(1) sys.exit(rc)