Skip to content

Commit 070498b

Browse files
update
1 parent c0fe181 commit 070498b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/apps/bundling-apps.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
# Bundling Apps
22

3-
To bundle your app in an .mpk file, just make an uncompressed .zip file of it, without including the top-level `com.micropythonos.helloworld/` folder.
3+
To bundle your app in an .mpk file, just make an uncompressed "zip" file of it, without including the top-level `com.micropythonos.helloworld/` folder.
4+
5+
It's recommended to make the .mpk file deterministic by:
6+
- setting the file timestamps to a fixed value
7+
- sorting the files, so the order is fixed
8+
- excluding extra file attributes and directories
49

510
For example:
611

712
```
813
cd com.micropythonos.helloworld/
9-
zip -r0 /tmp/com.micropythonos.helloworld_0.0.2.mpk .
14+
find . -type f -exec touch -t 202501010000.00 {} \; # set fixed timestamp
15+
find . -type f | sort | TZ=CET zip -X -r -0 /tmp/com.micropythonos.helloworld_0.0.2.mpk -@ # sort, -Xclude extra attributes, -recurse into directories and -0 compression
1016
```
1117

18+
Take a look at [`scripts/bundleapps.sh`](https://github.com/MicroPythonOS/MicroPythonOS/blob/main/scripts/bundleapps.sh) to see how the MicroPythonOS default apps are bundled.

0 commit comments

Comments
 (0)