Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also copy icon and font files #15

Open
Asbjoern opened this issue Mar 9, 2023 · 6 comments
Open

Also copy icon and font files #15

Asbjoern opened this issue Mar 9, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@Asbjoern
Copy link

Asbjoern commented Mar 9, 2023

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

@markusressel
Copy link
Owner

Jup I intend to support this.

@markusressel markusressel added the enhancement New feature or request label Mar 9, 2023
@markusressel
Copy link
Owner

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.

@Asbjoern
Copy link
Author

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.

@markusressel
Copy link
Owner

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?

@Asbjoern
Copy link
Author

Asbjoern commented Apr 4, 2023

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

markusressel added a commit that referenced this issue Apr 16, 2023
…nces_in_jsonl_properties

Feature/#15 copy images (.png and .bin)
@markusressel
Copy link
Owner

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants