diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 2a614db..61f51d0 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -11,8 +11,10 @@ jobs: uses: actions/checkout@v4 - name: Initialize submodules run: cd software && ./update-submodules.sh + - name: Prepare venv + run: python -m venv build-venv && source build-venv/bin/activate && pip install freezefs - name: Build - run: cd software && ./build.sh + run: source build-venv/bin/activate && cd software && ./build.sh - name: Upload firmware uses: actions/upload-artifact@v3 with: diff --git a/software/boards/RPI_PICO_W/manifest.py b/software/boards/RPI_PICO_W/manifest.py index f8cb12a..486963d 100644 --- a/software/boards/RPI_PICO_W/manifest.py +++ b/software/boards/RPI_PICO_W/manifest.py @@ -22,3 +22,5 @@ module("mp3player.py", "../../src") module("webserver.py", "../../src") package("utils", base_path="../../src") package("nfc", base_path="../../src") + +module("frozen_frontend.py", "../../build") diff --git a/software/build.sh b/software/build.sh index 4b215cc..3f96779 100755 --- a/software/build.sh +++ b/software/build.sh @@ -25,6 +25,11 @@ mkdir "$FS_STAGE_DIR"/fs trap 'rm -rf $FS_STAGE_DIR' EXIT tools/mklittlefs/mklittlefs -p 256 -s 868352 -c "$FS_STAGE_DIR"/fs "$FS_STAGE_DIR"/filesystem.bin +FRONTEND_STAGE_DIR=$(mktemp -d) +trap 'rm -rf $FRONTEND_STAGE_DIR' EXIT +gzip -c frontend/index.html > "$FRONTEND_STAGE_DIR"/index.html.gz +python -m freezefs "$FRONTEND_STAGE_DIR" build/frozen_frontend.py --target=/frontend + for hwconfig in boards/RPI_PICO_W/manifest-*.py; do hwconfig_base=$(basename "$hwconfig") hwname=${hwconfig_base##manifest-} diff --git a/software/frontend/index.html b/software/frontend/index.html new file mode 100644 index 0000000..b1c2283 --- /dev/null +++ b/software/frontend/index.html @@ -0,0 +1,190 @@ + + +
+ +