echo-lalia / MicroHydra

MicroHydra is a simple, 'OS-like', MicroPython based app switcher designed for ESP32 based devices.
GNU General Public License v3.0
168 stars 14 forks source link

Apps in /sd/apps not showing in the launcher #180

Open eugconrad opened 3 days ago

eugconrad commented 3 days ago

I am trying to install my custom apps on MicroHydra by placing them in the /sd/apps directory on an SD card. Each app includes a .py file and a details.yml file. However, after rebooting the device, the apps do not appear in the launcher.

Example directory structure:

/sd/apps  
  /MyApp  
    MyApp.py  
    details.yml

Expected behavior: The app "MyApp" should be visible and accessible in the launcher.

Actual behavior: The app "MyApp" does not appear in the launcher.

Additional information: I followed the documentation, which mentions that apps should be .py files or directories with an init.py file. I included a details.yml file, as I assumed it might be needed for app metadata. Other SD card functionality is working, so the card is properly mounted. My deivice is Cardputer, MicroHydra v2.3.

Did I misunderstand the app requirements or miss a key step? I would appreciate any guidance to resolve this. Thank you!

eugconrad commented 3 days ago

I figured it out. I didn’t need to wrap the .py file in a directory. I just had to leave the .py file directly in the /sd/apps directory, so it looks like /sd/apps/MyApp.py. Is this the correct solution?

endarthur commented 3 days ago

I haven't tested this yet, but I think you could also have your app as a module, leaving the folder structure and renaming MyApp.py as __init__.py, and as far as I understood the details.yml is just for the community app repository.

echo-lalia commented 3 days ago

I figured it out. I didn’t need to wrap the .py file in a directory. I just had to leave the .py file directly in the /sd/apps directory, so it looks like /sd/apps/MyApp.py. Is this the correct solution?

Yup! You've got it figured out 😁


I haven't tested this yet, but I think you could also have your app as a module, leaving the folder structure and renaming MyApp.py as __init__.py, and as far as I understood the details.yml is just for the community app repository.

You're right. Apps can either be plain .py files, placed directly in the apps folder, or directories with an __init__.py file.

The directory structure with the details.yml is just used for categorizing apps, and providing descriptions for them in the apps repo, and it's not used by the actual launcher.