You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/web-port/developer.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ This section describes how MicroPythonOS runs in the browser, how to build and s
9
9
# The build auto-activates ../emsdk or ../../emsdk if emcc is not on PATH.
10
10
11
11
# 2. Build the web target.
12
-
scripts/build_mpos_web.sh
12
+
scripts/build_mpos.sh web
13
13
14
14
# 3. Build (if needed) and serve locally at http://localhost:8080/
15
15
scripts/run_web.sh
@@ -21,7 +21,7 @@ Output artifacts land in `web/`: `micropython.{html,js,wasm,data}`, plus copies
21
21
22
22
## Prerequisites
23
23
24
-
-**Emscripten SDK** (tested with **6.0.0**). Either have `emcc` on `PATH`, or place an activated `emsdk` checkout one or two directories above this repo (`../emsdk` or `../../emsdk`). `scripts/build_mpos_web.sh` sources `emsdk_env.sh` automatically when `emcc` is missing.
24
+
-**Emscripten SDK** (tested with **6.0.0**). Either have `emcc` on `PATH`, or place an activated `emsdk` checkout one or two directories above this repo (`../emsdk` or `../../emsdk`). `scripts/build_mpos.sh web` sources `emsdk_env.sh` automatically when `emcc` is missing.
25
25
- Standard host toolchain to build `mpy-cross` (built with the host compiler, not emcc) and the usual MicroPython build dependencies (`python3`, `make`).
26
26
- The git submodules must be checked out (`git submodule update --init --recursive`). A **clean** submodule checkout is fine — the build re-applies the web changes every time.
27
27
@@ -40,7 +40,7 @@ cd MicroPythonOS
40
40
# (emcc on PATH, or an activated emsdk at ../emsdk or ../../emsdk).
41
41
42
42
# 3. Build and serve.
43
-
scripts/build_mpos_web.sh
43
+
scripts/build_mpos.sh web
44
44
scripts/run_web.sh
45
45
```
46
46
@@ -89,7 +89,6 @@ Key design points:
89
89
| Path | Purpose |
90
90
| --- | --- |
91
91
|[`scripts/build_mpos.sh`](https://github.com/MicroPythonOS/MicroPythonOS/blob/main/scripts/build_mpos.sh)| Central build orchestration. The `web` target branch does all web-specific work (patching the submodule, staging the FS, injecting shims, invoking `make.py web`, collecting artifacts). |
92
-
|[`scripts/build_mpos_web.sh`](https://github.com/MicroPythonOS/MicroPythonOS/blob/main/scripts/build_mpos_web.sh)| Convenience wrapper: activates emsdk then runs `build_mpos.sh web`. |
|[`scripts/web_port/web.py`](https://github.com/MicroPythonOS/MicroPythonOS/blob/main/scripts/web_port/web.py)| The Emscripten build backend. Copied into `lvgl_micropython/builder/web.py` at build time; consumed by `make.py web`. |
95
94
|[`scripts/web_port/sdl_bus.h.patch`](https://github.com/MicroPythonOS/MicroPythonOS/blob/main/scripts/web_port/sdl_bus.h.patch)| C struct-layout fix applied to the `lcd_bus` SDL bus (see "Submodule patches"). |
@@ -134,7 +133,7 @@ To verify reproducibility, revert the submodule files and rebuild — the build
( cd lvgl_micropython/lib/micropython && git checkout -- ports/unix/gccollect.c )
137
-
scripts/build_mpos_web.sh
136
+
scripts/build_mpos.sh web
138
137
```
139
138
140
139
The two C patches were verified to apply cleanly (`patch --forward`, exit 0, no `.rej`) against the pinned commits listed in *Build from a fresh clone*.
@@ -213,7 +212,7 @@ Notes / limitations:
213
212
214
213
## Making changes — common scenarios
215
214
216
-
-**Change MPOS Python code / apps:** edit under `internal_filesystem/` as usual, then rebuild (`scripts/build_mpos_web.sh`). The staged FS is rebuilt every time, so changes are picked up. (Most of the FS is baked into `micropython.data` at link time; a rebuild is required — there is no live file mount. `/data` and `/apps` are the exception: they persist in IndexedDB across reloads — see "Persistence".)
215
+
-**Change MPOS Python code / apps:** edit under `internal_filesystem/` as usual, then rebuild (`scripts/build_mpos.sh web`). The staged FS is rebuilt every time, so changes are picked up. (Most of the FS is baked into `micropython.data` at link time; a rebuild is required — there is no live file mount. `/data` and `/apps` are the exception: they persist in IndexedDB across reloads — see "Persistence".)
217
216
-**Change the HTML/JS shell:** edit `web/shell.html`, rebuild. `index.html` and `mpos.html` are regenerated from it.
0 commit comments