remove intel specific gpu workaround
This commit is contained in:
parent
1fd4db41cf
commit
38da06337a
34
patcher.py
34
patcher.py
|
@ -149,27 +149,6 @@ if (type == '1'):
|
|||
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!")
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue