launch electron properly on macos

pull/432/head
Lex Neva 2019-04-11 01:00:28 -04:00
rodzic aae92ceca5
commit 28ffc8692c
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -24,6 +24,10 @@ def open_url(url):
electron_path = os.path.join(base_dir, "out", package_dir, "inkstitch-gui")
app_process = subprocess.Popen([electron_path, url])
if sys.platform == "darwin":
electron_path += ".app/Contents/MacOS/inkstitch-gui"
app_process = subprocess.Popen(["open", "-a", electron_path, "--args", url])
else:
app_process = subprocess.Popen([electron_path, url])
return app_process