tpkg file format unclear, import error bug or undocumented feature?
- April 8, 2024
- 1 reply
- 1310 views
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.
