2024-04-08 12:38 PM - edited 2024-04-08 12:49 PM
Right now packaging of widgets is only possible through TouchGFX (by clicking export) and I would like to create a package through the command line.
I found the tpkg file format extracts like a zip file, but zipping it again and renaming leads to error when importing it into TouchGFX:
Error: Object reference not set to an instance of an object.
I used Linux zipinfo utility to compare my zip file to the package. I tried to make them as close as possible by not adding file comments(these are optional zip attributes) and by having the file order the same. The only differences I could find was "non-MSDOS external file attributes" which is set to 0 in the tpkg file, the path separators (the tpkg file uses inconsistent path separators combining windows and linux separators ) and slightly varying compression ratios and file dates. Even a binary comparison of the files did not show large differences.I also looked up http://tpkg.github.io/ . But it appears this tool is no longer maintained and I wasn't able to create a working archive with that either. So either there is something special about the tpkg file format that I missed or TouchGFX is very selective in importing (path separators?). Either way I'd like to know what the cause is.
How to test? Unzip a tpkg file and zip the contents of the extracted folder(not the folder itself), rename to tpkg, then import in TouchGFX. I've attached a working tpkg file and two nonworking ones.
Solved! Go to Solution.
2024-04-09 06:51 AM
Hello @unsigned_char_array ,
First of all, I should make it clear that http://tpkg.github.io/ has nothing to do with TouchGFX.
Unfortunately, there are no instructions for creating a tpkg from the command-line. However, the process you mentioned (making your own zip file and converting it into a tpkg) should work, but there was a mistake on our side. So, we will going to fix it as soon as possible.
Sorry for the inconvenience.
Best regards,
2024-04-09 06:51 AM
Hello @unsigned_char_array ,
First of all, I should make it clear that http://tpkg.github.io/ has nothing to do with TouchGFX.
Unfortunately, there are no instructions for creating a tpkg from the command-line. However, the process you mentioned (making your own zip file and converting it into a tpkg) should work, but there was a mistake on our side. So, we will going to fix it as soon as possible.
Sorry for the inconvenience.
Best regards,
2024-06-14 09:38 AM - edited 2024-06-14 09:44 AM
I confirm it works in TouchGFX 4.24.0. Now everyone can just zip the widgets instead of using the export feature of TouchGFX.