You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Rename FirstRun to HowTo
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "FirstRun",
|
||||
"name": "HowTo",
|
||||
"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",
|
||||
"short_description": "Welcomes the user and gives a few pointers on how to control and use MicroPythonOS.",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.howto/icons/com.micropythonos.howto_0.0.1_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.howto/mpks/com.micropythonos.howto_0.0.1.mpk",
|
||||
"fullname": "com.micropythonos.howto",
|
||||
"version": "0.0.1",
|
||||
"category": "help",
|
||||
"activities": [
|
||||
{
|
||||
"entrypoint": "assets/firstrun.py",
|
||||
"classname": "FirstRun",
|
||||
"entrypoint": "assets/howto.py",
|
||||
"classname": "HowTo",
|
||||
"intent_filters": [
|
||||
{
|
||||
"action": "main",
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
from mpos import Activity, SharedPreferences
|
||||
|
||||
class FirstRun(Activity):
|
||||
class HowTo(Activity):
|
||||
|
||||
appname = "com.micropythonos.firstrun"
|
||||
appname = "com.micropythonos.howto"
|
||||
|
||||
dontshow_checkbox = None
|
||||
prefs = None
|
||||
@@ -161,7 +161,7 @@ except Exception as e:
|
||||
# This will throw an exception if there is already a "/builtin" folder present
|
||||
print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e)
|
||||
|
||||
prefs = SharedPreferences("com.micropythonos.settings", defaults={"auto_start_app_early": "com.micropythonos.firstrun"}) # if not value is set, it will start the FirstRun app
|
||||
prefs = SharedPreferences("com.micropythonos.settings") # if not value is set, it will start the HowTo app
|
||||
|
||||
AppearanceManager.init(prefs)
|
||||
init_rootscreen() # shows the boot logo
|
||||
@@ -209,7 +209,7 @@ except Exception as e:
|
||||
launcher_app = AppManager.get_launcher()
|
||||
started_launcher = AppManager.start_app(launcher_app.fullname)
|
||||
# Then start auto_start_app_early if configured
|
||||
auto_start_app_early = prefs.get_string("auto_start_app_early", "com.micropythonos.firstrun")
|
||||
auto_start_app_early = prefs.get_string("auto_start_app_early", "com.micropythonos.howto")
|
||||
if auto_start_app_early and launcher_app.fullname != auto_start_app_early:
|
||||
result = AppManager.start_app(auto_start_app_early)
|
||||
if result is not True:
|
||||
@@ -241,7 +241,6 @@ async def ota_rollback_cancel():
|
||||
except Exception as e:
|
||||
print("main.py: warning: could not mark this update as valid:", e)
|
||||
|
||||
|
||||
if not started_launcher:
|
||||
print(f"WARNING: launcher {launcher_app} failed to start, not cancelling OTA update rollback")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user