summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-04-11 01:00:28 -0400
committerLex Neva <github.com@lexneva.name>2019-04-11 01:18:50 -0400
commit28ffc8692c30ce2db98b70b7752927758ed8f772 (patch)
tree172932bf303e222b6daa02f8dfe8d5b0fedf2b39
parentaae92ceca51469292f9ea2ab4386e963e6a33716 (diff)
launch electron properly on macos
-rw-r--r--lib/gui/electron.py6
1 files changed, 5 insertions, 1 deletions
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