From 38da06337acba5d0d3c9612ee72add77a0d0c8e4 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Thu, 18 Nov 2021 16:15:51 +0100 Subject: [PATCH] remove intel specific gpu workaround --- patcher.py | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/patcher.py b/patcher.py index f39235b..06dcf55 100644 --- a/patcher.py +++ b/patcher.py @@ -148,28 +148,7 @@ if (type == '1'): mkdir(output) move("AM2R.AppImage", output+"/AM2R.AppImage") copy("data/files_to_copy/icon.png", output+"/icon.png") - - - #check if current OS is a fork of Debian - isDebianFork = 0 - catOutput = subprocess.check_output(("cat", "/etc/os-release")) - catOutput = str(catOutput) - grep = "ID_LIKE=debian" - isDebianFork = catOutput.find(grep) >= 0 - - #if not debian, check for ubuntu instead - if(not isDebianFork): - grep = "ID_LIKE=ubuntu" - isDebianFork = catOutput.find(grep) >= 0 - - #cehck if current OS uses intel as gpu - isIntelGPU = 0 - lspciOutput = subprocess.check_output(("lspci")) - lspciOutput = str(catOutput) - grep = "VGA compatible controller: Intel" - isIntelGPU = lspciOutput.find(grep) >= 0 - - + print("\nDo you want to install AM2R systemwide?\n\n[y/n]\n") inp = getch() @@ -187,9 +166,6 @@ if (type == '1'): fileContents = template.read() fileContents = fileContents.replace("[REPLACE]", "/usr/local/bin/am2r") - if( isDebianFork and isIntelGPU): - fileContents = fileContents.replace("Exec=", "Exec=LIBGL_DRI3_DISABLE=1 ") - desktopFile = open(output+"/AM2R.desktop", "w+") desktopFile.seek(0) desktopFile.write(fileContents) @@ -205,9 +181,6 @@ if (type == '1'): fileContents = desktopFile.read() fileContents = fileContents.replace("[REPLACE]", cwd+"/"+output) - if( isDebianFork and isIntelGPU): - fileContents = fileContents.replace("Exec=", "Exec=LIBGL_DRI3_DISABLE=1 ") - desktopFile.seek(0) desktopFile.write(fileContents) #make the desktopFile executable. For some reason, this is not *necessary*, when copying it into /applications. @@ -216,10 +189,6 @@ if (type == '1'): print("Desktop file has been created!") - if( isDebianFork and isIntelGPU): - print("It has been detected, that you're running a fork of Debian along with an Intel GPU. Please use the provided .desktop File in order to launch the game.") - print("Ignore this message, if you installed AM2R systemwide") - elif (type == '2'): print("Android selected.\nApplying data patch...") # To be completely honest I don't know why I made the Android patch work like this. @@ -298,6 +267,3 @@ else: print("\nThe operation was completed successfully. See you next mission!") - - -