Skip to content

Commit 4549704

Browse files
launcher: tweaks for "unix" (desktop) target running
1 parent 23a3bc4 commit 4549704

File tree

1 file changed

+5
-3
lines changed
  • internal_filesystem/builtin/apps/com.example.launcher/assets

1 file changed

+5
-3
lines changed

internal_filesystem/builtin/apps/com.example.launcher/assets/launcher.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def load_icon(icon_path):
4040
return image_dsc
4141

4242
# Check and collect subdirectories from existing directories
43-
apps_dir = "/apps"
44-
apps_dir_builtin = "/builtin/apps"
43+
apps_dir = "apps"
44+
apps_dir_builtin = "builtin/apps"
4545
seen_base_names = set()
4646
app_list = []
4747

@@ -51,6 +51,7 @@ def load_icon(icon_path):
5151
if uos.stat(dir_path)[0] & 0x4000: # Verify directory exists
5252
for d in uos.listdir(dir_path):
5353
full_path = f"{dir_path}/{d}"
54+
#print(f"full_path: {full_path}")
5455
if uos.stat(full_path)[0] & 0x4000: # Check if it's a directory
5556
base_name = d
5657
if base_name not in seen_base_names: # Avoid duplicates
@@ -66,6 +67,7 @@ def load_icon(icon_path):
6667

6768
# Create UI for each app
6869
for app_name, app_dir_fullpath in app_list:
70+
#print(f"Adding app {app_name} from {app_dir_fullpath}")
6971
# Create container for each app (icon + label)
7072
app_cont = lv.obj(cont)
7173
app_cont.set_size(iconcont_width, iconcont_height)
@@ -78,7 +80,7 @@ def load_icon(icon_path):
7880
image.set_src(load_icon(icon_path))
7981
except Exception as e:
8082
print(f"Error loading icon {icon_path}: {e} - loading default icon")
81-
icon_path = "/builtin/res/mipmap-mdpi/default_icon_64x64.png"
83+
icon_path = "builtin/res/mipmap-mdpi/default_icon_64x64.png"
8284
try:
8385
image.set_src(load_icon(icon_path))
8486
except Exception as e:

0 commit comments

Comments
 (0)