File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,23 @@ def start_app(app_dir, is_launcher=False):
352352 start_script_fullpath = f"{ app_dir } /{ start_script } "
353353 execute_script_new_thread (start_script_fullpath , True , is_launcher , True )
354354
355+ # Execute this if it exists
355356execute_script_new_thread ("/autorun.py" , True , False , False )
356- start_app ("/apps/com.example.launcher" , True )
357+
358+ try :
359+ import freezefs_mount
360+ except Exception as e :
361+ print ("/main.py: WARNING: could not import freezefs_mount: " , e )
362+
363+ # The launcher might have been updated from the builtin one, so check that:
364+ import uos
365+ custom_launcher = "/apps/com.example.launcher"
366+ builtin_launcher = "/apps_builtin/com.example.launcher"
367+ try :
368+ stat = uos .stat (custom_launcher )
369+ start_app (custom_launcher , True )
370+ except OSError :
371+ start_app (builtin_launcher , True )
357372
358373# If we got this far without crashing, then no need to rollback the update
359374import ota .rollback
You can’t perform that action at this time.
0 commit comments