From 0d54c828d0477db8666ff24d451591d9f7fdcf57 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 12 Apr 2019 01:41:14 -0400 Subject: use docker for windows --- lib/gui/electron.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') 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" -- cgit v1.2.3