From 69942f9fc81dbccfef4ead1018d67ed387e1127b Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Fri, 30 Mar 2018 09:10:48 -0500 Subject: [PATCH] proton: Start unknown filetypes with 'start.exe' Doom II for example launches with a batch script. --- proton | 59 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/proton b/proton index c3b2c648..361c6908 100755 --- a/proton +++ b/proton @@ -269,29 +269,34 @@ ARCH_I386=1 ARCH_X86_64=2 def determine_architecture(path): #algorithm from file's msdos magic file - with open(path, "rb") as f: - magic = f.read(2) - if magic != "MZ": + try: + with open(path, "rb") as f: + magic = f.read(2) + if magic != "MZ": + return ARCH_UNKNOWN + f.seek(0x18) + reloc = struct.unpack(' windows path path = subprocess.check_output([wine_path, "winepath", "-w", sys.argv[2]], env=env, stderr=lfile)