diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-04-11 01:00:28 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-04-11 01:18:50 -0400 |
| commit | 28ffc8692c30ce2db98b70b7752927758ed8f772 (patch) | |
| tree | 172932bf303e222b6daa02f8dfe8d5b0fedf2b39 /lib/gui/electron.py | |
| parent | aae92ceca51469292f9ea2ab4386e963e6a33716 (diff) | |
launch electron properly on macos
Diffstat (limited to 'lib/gui/electron.py')
| -rw-r--r-- | lib/gui/electron.py | 6 |
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 |
