diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-04-12 01:41:14 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-04-12 02:26:02 -0400 |
| commit | 0d54c828d0477db8666ff24d451591d9f7fdcf57 (patch) | |
| tree | 30544f7b5deb8c861c6b14b8d871da529b80bfbd /lib | |
| parent | 9091be8b974fb4b38d5fdf188d3db0b56c5a1c9d (diff) | |
use docker for windows
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gui/electron.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gui/electron.py b/lib/gui/electron.py index 6a31abe1..4ecc37bf 100644 --- a/lib/gui/electron.py +++ b/lib/gui/electron.py @@ -1,3 +1,4 @@ +from glob import glob import os import subprocess import sys @@ -16,13 +17,12 @@ def open_url(url): else: # It's a bit trickier to find the electron app in a development environment. base_dir = get_bundled_dir("electron") + package_dir = glob(os.path.join(base_dir, 'dist', '*-unpacked')) - try: - package_dir = os.listdir(os.path.join(base_dir, "out"))[0] - except (OSError, IndexError): - raise Exception("Electron app not found. Be sure to run 'npm install; npm run package' in %s." % base_dir) + if not package_dir: + raise Exception("Electron app not found. Be sure to run 'yarn; yarn dist' in %s." % base_dir) - electron_path = os.path.join(base_dir, "out", package_dir, "inkstitch-gui") + electron_path = os.path.join(base_dir, package_dir, "inkstitch-gui") if sys.platform == "darwin": electron_path += ".app/Contents/MacOS/inkstitch-gui" |
