Fixed the application launcher location detection on linux systems, fixed the application launcher using outdated launch command (electron -> electron6)

This commit is contained in:
Nek-12 2020-07-16 19:16:22 +03:00
parent b5043508d9
commit cb9aa3ed5c

View File

@ -226,9 +226,17 @@ try:
if sys.platform == 'linux' and 'microsoft' not in platform.uname()[3].lower():
print(
f' ...patching app launcher')
s = ''
if os.path.exists('/opt/notion-app/notion-app'):
s = '/opt/notion-app/notion-app'
elif os.path.exists('/usr/bin/notion-app'):
s = '/usr/bin/notion-app'
elif os.path.exists('/usr/bin/notion'):
s = '/usr/bin/notion'
else:
raise ValueError("Couldn't find the app launcher")
subprocess.call(
['sed', '-i', r's/electron\ app\.asar/electron\ app/',
'/usr/bin/notion-app' if os.path.exists('/usr/bin/notion-app') else '/usr/bin/notion'])
['sed', '-i', r's/electron6\ app\.asar/electron6\ app/', s])
print('\n>>> SUCCESSFULLY CUSTOMISED <<<')