FMini-1 for SMK-37
- v0 beta --
-
-
-
-
-
-
-
-
-
-
diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index eb50861..cd32de3 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -42,10 +42,7 @@ jobs: - name: Build the firmware run: | - BOARD=smk37 ./build.sh # the SMK-37 packages (SMK37.md): Pro, Elite, MKE-P37 - BOARD=smk37 MODEL=elite ./build.sh - BOARD=smk37 MODEL=mke ./build.sh - ./build.sh # the FM-1 last (the shared intermediates are the FM-1's again) + ./build.sh - name: Make the installer page run: | @@ -54,9 +51,6 @@ jobs: python3 web/make_fmini_installer.py "build/fmini-1-fm1-$VERSION.fwsc" _site/index.html "$VERSION" cp "build/fmini-1-fm1-$VERSION.fwsc" "_site/fmini-1-$VERSION.fwsc" cp docs/fmini-ad.mp4 docs/fmini-ad-poster.jpg _site/ - SMK_VERSION=$(sed -n 's/^#define FMINI_SMK_VERSION "v\(.*\)"/\1/p' firmware/src/core.h) # the SMK-37's own - python3 web/make_smk_installer.py "$SMK_VERSION" _site/smk.html # the SMK-37 installer (beta), its own page - cp build/fmini-1-smk37*-"$SMK_VERSION".fwsc _site/ mkdir -p _site/editor && cp web/editor_fmini.html _site/editor/index.html # the patch editor (web/test_editor_fmini.py) cp -r docs/emu _site/emu # the browser emulator (web/emu/build_wasi.sh builds docs/emu) echo "FMini-1 v$VERSION" >> "$GITHUB_STEP_SUMMARY" diff --git a/web/make_smk_installer.py b/web/make_smk_installer.py deleted file mode 100644 index 65939a0..0000000 --- a/web/make_smk_installer.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 -# SPDX-License-Identifier: GPL-3.0-only -"""FMini-1 on the M-Vave SMK-37 (beta): the installer page (site_smk37.html), one self-contained file with the three -SMK-37 packages of a version embedded (SMK-37 Pro, Elite, MKE-P37). The page reads the connected keyboard's model and -writes that model's package. - web/make_smk_installer.py VERSION OUT.html (takes build/fmini-1-smk37[-elite|-mke]-VERSION.fwsc) -Serve it over https or http://localhost (Web MIDI with SysEx needs a secure context), in Chrome / Edge.""" -import base64 -import json -import re -import sys -from pathlib import Path - -sys.path.insert(0, str(Path(__file__).resolve().parent)) -from make_site import HERE, strip_module, product_of # noqa: E402 - -BUILD = HERE.parent / "build" - - -def main(version, out): - boards = [] - for stem in ("fmini-1-smk37", "fmini-1-smk37-elite", "fmini-1-smk37-mke"): - f = BUILD / f"{stem}-{version}.fwsc" - if not f.exists(): - raise SystemExit(f"{f}: missing (BOARD=smk37 [MODEL=elite|mke] ./build.sh)") - raw = f.read_bytes() - prod = product_of(raw) - if not re.fullmatch(r"(SMK-37 Pro|SMK-37 Elite|MKE-P37)_9\d\d", prod) or b"FELUCCA-LOADER-1" not in raw: - raise SystemExit(f"{f}: not an SMK-37 package of FMini-1 (identity {prod!r})") - boards.append({"product": prod, "file": f.name, - "pkg": "data:application/octet-stream;base64," + base64.b64encode(raw).decode()}) - html = (HERE / "site_smk37.html").read_text(encoding="utf-8") - lib = "\n".join(strip_module((HERE / f).read_text(encoding="utf-8")) for f in ("fm1pkg.js", "fm1ota.js")) - for mark in ("/*LIB*/", "/*META*/"): - if html.count(mark) != 1: - raise SystemExit(f"site_smk37.html must contain {mark} once") - html = html.replace("/*LIB*/", lib).replace("/*META*/", json.dumps({"version": version, "boards": boards})) - Path(out).write_text(html, encoding="utf-8") - print(f"{out}: {len(html)} B; {', '.join(b['product'] for b in boards)}") - - -if __name__ == "__main__": - if len(sys.argv) != 3: - sys.exit(__doc__) - main(*sys.argv[1:]) diff --git a/web/site_smk37.html b/web/site_smk37.html deleted file mode 100644 index aa24770..0000000 --- a/web/site_smk37.html +++ /dev/null @@ -1,252 +0,0 @@ - - - -
- - - -