From c2ab4c12d957b102eb39186340f6fd44304e44f5 Mon Sep 17 00:00:00 2001 From: aljelly <10395308+aljelly@users.noreply.github.com> Date: Sun, 21 Oct 2018 05:02:00 +0000 Subject: [PATCH 1/2] Look for winetricks in /usr/local/bin/winetricks --- protontricks | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/protontricks b/protontricks index 77968b9..379919a 100755 --- a/protontricks +++ b/protontricks @@ -273,10 +273,14 @@ if __name__ == "__main__": if os.environ.get('WINETRICKS') is None: print("[INFO] WINETRICKS environment variable is not available. " - "Falling back to /usr/bin/winetricks") - os.environ["WINETRICKS"] = "/usr/bin/winetricks" - if not os.path.exists("/usr/bin/winetricks"): - print("[ERROR!] Winetricks isn't installed, please install " + "Looking for winetricks in " + "/usr/bin/winetricks and /usr/local/bin/winetricks...") + if os.path.exists("/usr/bin/winetricks"): + os.environ["WINETRICKS"] = "/usr/bin/winetricks" + elif os.path.exists("/usr/local/bin/winetricks"): + os.environ["WINETRICKS"] = "/usr/local/bin/winetricks" + else: + print("[ERROR!] Couldn't find winetricks, please install " "winetricks in order to use this script!") prereq_fail = True else: From bbe7f1cbb1b2756df68967a5b5f1d2d7c014ad71 Mon Sep 17 00:00:00 2001 From: aljelly <10395308+aljelly@users.noreply.github.com> Date: Sun, 21 Oct 2018 05:09:06 +0000 Subject: [PATCH 2/2] Fix style --- protontricks | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protontricks b/protontricks index 379919a..84692ed 100755 --- a/protontricks +++ b/protontricks @@ -276,9 +276,9 @@ if __name__ == "__main__": "Looking for winetricks in " "/usr/bin/winetricks and /usr/local/bin/winetricks...") if os.path.exists("/usr/bin/winetricks"): - os.environ["WINETRICKS"] = "/usr/bin/winetricks" + os.environ["WINETRICKS"] = "/usr/bin/winetricks" elif os.path.exists("/usr/local/bin/winetricks"): - os.environ["WINETRICKS"] = "/usr/local/bin/winetricks" + os.environ["WINETRICKS"] = "/usr/local/bin/winetricks" else: print("[ERROR!] Couldn't find winetricks, please install " "winetricks in order to use this script!")