Skip to content

Commit 9081267

Browse files
AppManager: don't assume assets/ folder
1 parent d28a8d9 commit 9081267

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ Put unreleased changes here!
55

66
Builtin Apps:
77
- About: show system uptime
8+
- HowTo app: make import lvgl as lv explicit
89

910
Frameworks:
11+
- AppManager: try .mpy after .py and use import instead of explicit compile
1012
- SharedPreferences: avoid writing default-only configs at boot and prune empty config dirs/files
1113

1214
0.10.0

internal_filesystem/lib/mpos/content/app_manager.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,14 @@ def start_app(fullname):
409409
else:
410410
entrypoint = app.main_launcher_activity.get('entrypoint')
411411
classname = app.main_launcher_activity.get("classname")
412+
entrypoint_path = app.installed_path + "/" + entrypoint
413+
entrypoint_dir = app.installed_path
414+
if "/" in entrypoint:
415+
entrypoint_dir = entrypoint_path.rsplit("/", 1)[0]
412416
result = AppManager.execute_script(
413-
app.installed_path + "/" + entrypoint,
417+
entrypoint_path,
414418
classname,
415-
app.installed_path + "/assets/",
419+
entrypoint_dir + "/",
416420
app_fullname=fullname,
417421
)
418422
# Launchers have the bar, other apps don't have it

0 commit comments

Comments
 (0)