-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Package resources + a metadata file into a single .zip file. #1299
Conversation
I'm currently implementing this for ITD. Should be ready soon if everything goes well. I'll make a branch with it when I'm done and then merge when this is released. |
One question that I have is: should I load the resources (delete obsolete, upload new, etc.) before or after the DFU itself? After would be A LOT more complicated because I'd have to wait for the watch to boot back up and then reconnect to do it, which would require rewriting a lot of how ITD handles reconnects, which is already really annoying due to BLE having no way to check whether a device is in range. |
That's a good question! Loading the new resources (and potentially removing older ones) before the firmware update might break the firmware that is currently running, if it's still using the resources that will be deleted. Loading them after the firmware update might break the new firmware if it tries to load resources that do not exist yet... In the end, I think we need to ensure that the firmware (app & watchface) will never crash or misbehave if the resource does not exist. In this case, the update sequence (firmware then resource or resource then firmware) will be the choice of the user or the companion app. |
Here is a new resource package that maps files into subdirectories ( |
Add lv_img_conf in Docker image to build resources at build time.
So my plan for this feature is:
|
Files (fonts and pictures) are converted and packed into a single .zip file using a CMake
custom_target
. This targetsrc/displayapp/fonts/generate.py
)generate.py
above)infinitime-resources-1.11.0.zip
The content of the zip file looks like this:
resources.json:
resources
contains the list of files from the .zip file that must be uploaded to the watch. It contains the name of the file in the .zip file and the path (filename) where it must be written to the watch.obsolete_files
contains a list of files that can optionally remove from the watch. This is a hint to the companion app which lists the files that are not used anymore in this version of infinitime and that can be removed. It's up to the companion app to remove them to free some memory space. Each item contain the filename in the watch FS and the version of infinitime that made that file obsolete.EDIT : here is an example package: infinitime-resources-1.10.0.zip
And this is the expected result once the files are uploaded (screenshots using ITD:

To support this, companion apps will have to implement our BLE FS API.
See this comment