state sync, many changes:

* separated css/js/rule files to pak file (glorified zip) to reduce full rebuilds
* implemented build cache
* some frontend UI spiffing up
This commit is contained in:
2025-09-02 16:44:28 -07:00
parent 621d65b9e5
commit 0bd2f4827b
16 changed files with 226 additions and 42 deletions

View File

@@ -8,8 +8,9 @@ import threading
import webview
import flask
import fs.tree
from pylocal import core, actions, desktop, dev, items, tick
from pylocal import core, actions, desktop, dev, gamedata, items, tick
core.desktop_mode = True
sig_exit = threading.Event()
@@ -24,6 +25,7 @@ def index():
core.render_base_context()
core.base_context["scripts"].insert(0, core.app.url_for("static", filename="js/desktop-structuredclone.js"))
core.base_context["scripts"].insert(1, core.app.url_for("static", filename="js/seagull-desktop.js"))
gamedata.vfs.copy_out("templates/main_page.j2", dest=core.path_appdir.as_posix())
return flask.render_template("main_page.j2", **core.base_context)
if __name__ == "__main__":
@@ -37,6 +39,9 @@ if __name__ == "__main__":
storage_dir = pathlib.Path(os.environ["HOME"]) / ".local/share/seagull"
desktop.path_storagedir = storage_dir
gamedata.vfs.load_data_source("basepak")
gamedata.vfs.load_data_source("seagull.pak", proto="zip")
if argo.debug:
desktop.api.debug_mode = True
storage_dir.mkdir(exist_ok=True, parents=True)