@@ -23,9 +23,10 @@ is what each one is, in everyday language.
2323### The desktop programs (pick the one for your computer)
2424
2525These four files are the ** same program** , each compiled for a different kind of
26- computer. They are * self-contained* : the Python language runtime is baked inside,
27- so you do ** not** need to install Python or anything else. Download, allow it to
28- run, done.
26+ computer. They are * self-contained* : the Python language runtime ** and** the
27+ plotting library (matplotlib) are baked inside, so you do ** not** need to install
28+ Python or anything else — even the chart-drawing demos work immediately. Download,
29+ allow it to run, done. (That bundled library is why each download is ~ 80 MB.)
2930
3031| If your computer is… | Download this file | What "x86_64 / arm64" means |
3132| ----------------------| --------------------| ------------------------------|
@@ -43,6 +44,8 @@ arguments tip-of-the-day style, or give it a command:
4344
4445- ` list ` — show all the built-in demonstrations.
4546- ` run m3 ` — run demo #3 (the TCP "sawtooth"); ` m1 ` …` m16 ` are available.
47+ - ` run plots ` / ` run gif ` / ` run viz ` — render the figures/animation (matplotlib
48+ is bundled in the binaries, so these work with no setup).
4649- ` bakeoff … ` — a configurable experiment comparing congestion-control
4750 algorithms (see Part 4).
4851- ` web ` — start a small website on your own machine (` http://127.0.0.1:8112 ` )
@@ -184,15 +187,21 @@ is why CI builds each platform on its own runner.
184187``` bash
185188pip install pyinstaller
186189pyinstaller netsim.spec --clean --noconfirm
187- ./dist/netsim list # Linux/macOS -> dist/netsim (~7-20 MB)
190+ ./dist/netsim list # Linux/macOS -> dist/netsim (~7-20 MB, no plots )
188191dist\n etsim.exe list # Windows -> dist\netsim.exe
189192```
190193
191- Fold the plotting demos into the binary too (much bigger — pulls in matplotlib):
194+ A plain local build (above) excludes matplotlib to stay small, so `run
195+ plots` / ` gif` / ` viz` won't work in it. The ** published release binaries** are
196+ instead built with ` NETSIM_WITH_PLOTS=1 ` , which folds matplotlib + pillow in so
197+ the plotting demos work out of the box (at the cost of a larger ~ 80 MB file).
198+ Reproduce that locally:
192199
193200``` bash
201+ pip install pyinstaller matplotlib pillow
194202NETSIM_WITH_PLOTS=1 pyinstaller netsim.spec --clean --noconfirm # Linux/macOS
195203set NETSIM_WITH_PLOTS=1 && pyinstaller netsim.spec --clean --noconfirm # Windows
204+ ./dist/netsim run plots # now works -> plots/*.png
196205```
197206
198207### Android APK — Chaquopy
@@ -230,9 +239,10 @@ that starts with `v` (e.g. `v1.0.1`) it:
230239 ` windows-latest ` → ` netsim-windows-x86_64.exe ` ,
231240 ` macos-latest ` → ` netsim-macos-arm64 ` ,
232241 ` macos-13 ` → ` netsim-macos-x86_64 ` .
233- Each binary is renamed to its unique asset name before upload (Linux and macOS
234- both produce a file literally called ` netsim ` , which would otherwise collide
235- on the Release).
242+ Each is built with ` NETSIM_WITH_PLOTS=1 ` (matplotlib + pillow folded in) and a
243+ plotting smoke-test (` run plots ` ) before upload, and renamed to its unique
244+ asset name (Linux and macOS both produce a file literally called ` netsim ` ,
245+ which would otherwise collide on the Release).
2362462 . ** builds and signs the Android APK** in a separate ` android ` job (gated on the
237247 repo variable ` BUILD_ANDROID ` plus the keystore secrets — see below). This job
238248 is independent, so it never blocks the desktop release.
0 commit comments