2021-03-12 04:17:19 +00:00
|
|
|
# Authors: see git history
|
|
|
|
#
|
|
|
|
# Copyright (c) 2010 Authors
|
|
|
|
# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
|
|
|
|
|
2020-08-19 18:53:01 +00:00
|
|
|
from .base import InkstitchExtension
|
|
|
|
from ..api import APIServer
|
|
|
|
from ..gui import open_url
|
2018-06-24 19:55:13 +00:00
|
|
|
|
2018-05-02 01:21:07 +00:00
|
|
|
|
2020-08-19 18:53:01 +00:00
|
|
|
class Install(InkstitchExtension):
|
|
|
|
def __init__(self):
|
|
|
|
InkstitchExtension.__init__(self)
|
2018-08-22 18:12:39 +00:00
|
|
|
|
2018-04-29 01:26:53 +00:00
|
|
|
def effect(self):
|
2020-08-19 18:53:01 +00:00
|
|
|
api_server = APIServer(self)
|
|
|
|
port = api_server.start_server()
|
|
|
|
electron = open_url("/install?port=%d" % port)
|
|
|
|
electron.wait()
|
|
|
|
api_server.stop()
|
|
|
|
api_server.join()
|