markusressel/openhasp-config-manager

Also copy icon and font files

Opened this issue · 6 comments

Will it make sense to also copy png/bin images, icons and fonts to the devices using the same folder structure?

Jup I intend to support this.

The reason it currently doesn't work (anymore) is because I also try to figure out which files are actually referenced within the configuration to omit unneeded files automatically.

This is meant to reduce the number of files copied to a decide if you have many things in the common folder but only actually use a small subset of them on one of your devices.

I have yet to see if this is actually viable though, because I assume things like resources might be used indirectly by issuing MQTT commands and such, so it might not be possible for everything.

I see the problem with deciding what to copy from the common folder.
As it does not make sense to copy everything.

Since, from my point of view, it's better to have some of this functionality than none I suggest the following:

  1. Copy all files referenced in the generated jsonl files.
  2. Have a list somewhere of the files a user might want available for MQTT commands and such. e.g. the config file.

I like both suggestions. This will make it work as good as possible out of the box while allowing the user to add something that is missing.

How are local files usually referenced from jsonl files? Using the L:/ syntax? Or simple relative/absolute paths? Can you give an example from your config maybe?

My images are always referenced with full path L:/ I dont’t thing relative paths are supported.

Font files however are references with the text_font tag according to https://www.openhasp.com/0.7.0/design/fonts/#icons

There is also support for binary fonts but I have not tried those.

Open firmware for MCUs to drive a low-cost commodity touch display

@Asbjoern 0.5.0 now supports adding .png and .bin files.
This is only the initial support for images and is not fully fleshed out yet.
Please give it a try! 🙏 🤓

I plan to

  • only copy files if they are referenced somewhere (like discussed in this issue)
  • automatically convert images to binary before uploading them

No timeline on this for now.