From d485d4e02a1aeb6336bb748ad18878e8f3239343 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 6 Mar 2026 16:43:56 +0100 Subject: [PATCH] Add initial FirstRun app --- .../META-INF/MANIFEST.JSON | 23 +++++++++++++++++++ .../assets/firstrun.py | 23 +++++++++++++++++++ .../assets/launcher.py | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 internal_filesystem/builtin/apps/com.micropythonos.firstrun/META-INF/MANIFEST.JSON create mode 100644 internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py diff --git a/internal_filesystem/builtin/apps/com.micropythonos.firstrun/META-INF/MANIFEST.JSON b/internal_filesystem/builtin/apps/com.micropythonos.firstrun/META-INF/MANIFEST.JSON new file mode 100644 index 00000000..dd7c1fb5 --- /dev/null +++ b/internal_filesystem/builtin/apps/com.micropythonos.firstrun/META-INF/MANIFEST.JSON @@ -0,0 +1,23 @@ +{ +"name": "FirstRun", +"publisher": "MicroPythonOS", +"short_description": "Welcomes the user and gives a few pointers on how to control the UI.", +"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.firstrun/icons/com.micropythonos.firstrun_0.0.1_64x64.png", +"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.firstrun/mpks/com.micropythonos.firstrun_0.0.1.mpk", +"fullname": "com.micropythonos.firstrun", +"version": "0.0.1", +"category": "help", +"activities": [ + { + "entrypoint": "assets/firstrun.py", + "classname": "FirstRun", + "intent_filters": [ + { + "action": "main", + "category": "launcher" + } + ] + } + ] +} + diff --git a/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py b/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py new file mode 100644 index 00000000..7f1c7323 --- /dev/null +++ b/internal_filesystem/builtin/apps/com.micropythonos.firstrun/assets/firstrun.py @@ -0,0 +1,23 @@ +from mpos import Activity + +class FirstRun(Activity): + + def onCreate(self): + screen = lv.obj() + label = lv.label(screen) + label.align(lv.ALIGN.TOP_LEFT, 0, 0) + label.set_width(lv.pct(100)) + touchhelp = "swipe from the left edge to go back and from the top edge to open the menu." + label.set_text(f''' +Welcome! + +This app will explain how to move around in MicroPythonOS. + +If you're on a touch screen, {touchhelp} + +If you've got 3 buttons, one is PREVIOUS, one is ENTER and one is NEXT. To go back, press PREVIOUS and NEXT together. + +If you've got 2 buttons, one is PREVIOUS, the other is NEXT. To ENTER, press both at the same time. To go back, long-press PREVIOUS. + ''') + label.set_long_mode(lv.label.LONG_MODE.WRAP) + self.setContentView(screen) diff --git a/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py b/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py index 440ee6b4..ee63c437 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.launcher/assets/launcher.py @@ -86,7 +86,7 @@ class Launcher(Activity): iconcont_height = icon_size + label_height for app in AppManager.get_app_list(): - if app.category == "launcher": + if app.category == "launcher" or app.fullname == "com.micropythonos.firstrun": continue app_name = app.name