From cb9aa3ed5c94b66d22bddb596e3eb8df40d72da4 Mon Sep 17 00:00:00 2001 From: Nek-12 Date: Thu, 16 Jul 2020 19:16:22 +0300 Subject: [PATCH] Fixed the application launcher location detection on linux systems, fixed the application launcher using outdated launch command (electron -> electron6) --- customiser.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/customiser.py b/customiser.py index ac69400..af15c00 100755 --- a/customiser.py +++ b/customiser.py @@ -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 <<<')