Skip to content

Commit 0bb6a3f

Browse files
Clarify app folder name and structure
1 parent c37abb1 commit 0bb6a3f

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

docs/apps/creating-apps.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@ More advanced examples are available in the [source code repository](https://git
88

99
## Structure
1010

11-
Create the following file and folder structure:
11+
Create a git repo with the following file and folder structure:
1212

1313
```
14-
com.micropythonos.helloworld/
14+
.gitignore
15+
CHANGELOG.md
16+
LICENSE
17+
README.md
18+
com.yourdomain.appname/
1519
├── MANIFEST.JSON
1620
├── icon_64x64.png
1721
└── hello.py
1822
```
1923

20-
This flat layout puts the required `MANIFEST.JSON` and app icon at the top level, alongside your Python files. Subfolders are still allowed if you want to organize larger apps, but **each directory costs about 8 KiB of storage in LittleFS**, so use them sparingly on device.
24+
The `com.yourdomain.appname/` folder and everything in it is the actual app that will be installed. All the rest is support materials, tests, info, etc.
25+
26+
For most apps, this relatively flat layout with the required `MANIFEST.JSON` and app icon alongside the Python files, is recommended. Subfolders are allowed if you want to organize larger apps, but **each directory costs about 8 KiB of storage in LittleFS**, so use them sparingly.
2127

2228
## App code
2329

@@ -49,7 +55,7 @@ In `MANIFEST.JSON`, put:
4955
"publisher": "MicroPythonOS",
5056
"short_description": "Minimal app",
5157
"long_description": "Demonstrates the simplest app.",
52-
"fullname": "com.micropythonos.helloworld",
58+
"fullname": "com.yourdomain.appname",
5359
"version": "0.0.2",
5460
"categories": ["Development"],
5561
"activities": [
@@ -164,11 +170,11 @@ The size will probably be somewhere between 3 and 10KB.
164170

165171
## Installing the App
166172

167-
The app can be installed by copying the top-level folder `com.micropythonos.helloworld/` (and its contents) to the `/apps/` folder.
173+
The app can be installed by copying the top-level folder `com.yourdomain.appname/` (and its contents) to the `/apps/` folder.
168174

169175
### On Desktop
170176

171-
If you are [running MicroPythonOS on desktop](../os-development/running-on-desktop.md) from a source checkout, copy or move the top-level folder `com.micropythonos.helloworld/` (and its contents) to `internal_filesystem/apps/` and you're good to go.
177+
If you are [running MicroPythonOS on desktop](../os-development/running-on-desktop.md) from a source checkout, copy or move the top-level folder `com.yourdomain.appname/` (and its contents) to `internal_filesystem/apps/` and you're good to go.
172178

173179
### On ESP32
174180

@@ -180,7 +186,7 @@ Then connect your device with a cable and install your app using:
180186

181187
```
182188
/path/to/mpremote.py mkdir :/apps
183-
/path/to/mpremote.py fs cp -r com.micropythonos.helloworld/ :/apps/
189+
/path/to/mpremote.py fs cp -r com.yourdomain.appname/ :/apps/
184190
```
185191

186192
Take a look at [`scripts/install.sh`](https://github.com/MicroPythonOS/MicroPythonOS/blob/main/scripts/install.sh) for convenient "install everything" or "install one app" scripting.
@@ -195,7 +201,7 @@ You can also launch it manually by typing this in the MicroPython REPL:
195201

196202
```python
197203
from mpos import AppManager
198-
AppManager.start_app('com.micropythonos.helloworld')
204+
AppManager.start_app('com.yourdomain.appname')
199205
```
200206
## Further reading
201207

0 commit comments

Comments
 (0)