From 28ffc8692c30ce2db98b70b7752927758ed8f772 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Thu, 11 Apr 2019 01:00:28 -0400 Subject: launch electron properly on macos --- lib/gui/electron.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/gui/electron.py') diff --git a/lib/gui/electron.py b/lib/gui/electron.py index d3547c34..6a31abe1 100644 --- a/lib/gui/electron.py +++ b/lib/gui/electron.py @@ -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 -- cgit v1.2.3