mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 02:16:16 +00:00
Removed public folder in production
This commit is contained in:
parent
da0b4dc6dc
commit
326ea8a112
|
@ -9,7 +9,7 @@ sys.modules['FixTk'] = None
|
|||
|
||||
a = Analysis(['deemix-pyweb.py'],
|
||||
binaries=[],
|
||||
datas=[('webui/public', 'webui/public'), ('icon.ico', '.')],
|
||||
datas=[('webui/public', 'webui'), ('icon.ico', '.')],
|
||||
hiddenimports=['engineio.async_drivers.threading', 'pkg_resources.py2_warn'],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
|
|
|
@ -53,6 +53,10 @@ def resource_path(relative_path):
|
|||
return path.join(base_path, relative_path)
|
||||
|
||||
gui_dir = resource_path(path.join('webui', 'public'))
|
||||
if not path.exists(gui_dir):
|
||||
gui_dir = resource_path('webui')
|
||||
if not path.isfile(path.join(gui_dir, 'index.html')):
|
||||
sys.exit("WebUI not found, please download and add a WebUI")
|
||||
server = CustomFlask(__name__, static_folder=gui_dir, template_folder=gui_dir, static_url_path="")
|
||||
server.config['SEND_FILE_MAX_AGE_DEFAULT'] = 1 # disable caching
|
||||
socketio = SocketIO(server, async_mode='threading')
|
||||
|
|
|
@ -9,7 +9,7 @@ sys.modules['FixTk'] = None
|
|||
|
||||
a = Analysis(['server.py'],
|
||||
binaries=[],
|
||||
datas=[('webui/public', 'webui/public')],
|
||||
datas=[('webui/public', 'webui')],
|
||||
hiddenimports=['engineio.async_drivers.threading', 'pkg_resources.py2_warn'],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
|
|
Loading…
Reference in a new issue