Browse Source

fix(requirements): remove pywebview requirement

master
louisyoungx 3 years ago
parent
commit
a012186301
  1. 1
      Config/config.ini
  2. 26
      GUI/gui.py

1
Config/config.ini

@ -94,6 +94,7 @@ PROCESS_COUNT = 4 @@ -94,6 +94,7 @@ PROCESS_COUNT = 4
[GUI]
# GUI Settings
# 进行GUI打包时需要手动取消GUI/gui.py下的注释
START_USING = False
[Logger]

26
GUI/gui.py

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
import webview
from Config.settings import config
@ -8,14 +8,16 @@ PORT = config.settings("Server", "PORT") @@ -8,14 +8,16 @@ PORT = config.settings("Server", "PORT")
def gui():
url = "http://{}:{}/".format(SERVER_HOST, PORT)
webview.create_window(PROJECT,
url=url,
js_api=None,
width=900,
height=800,
resizable=True,
fullscreen=False,
min_size=(200, 200),
background_color='#FFF',
text_select=False)
webview.start()
# import webview
# webview.create_window(PROJECT,
# url=url,
# js_api=None,
# width=900,
# height=800,
# resizable=True,
# fullscreen=False,
# min_size=(200, 200),
# background_color='#FFF',
# text_select=False)
# webview.start()

Loading…
Cancel
Save