@@ -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"
4545seen_base_names = set ()
4646app_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
6869for 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