cancel
Showing results for 
Search instead for 
Did you mean: 

tpkg file format unclear, import error bug or undocumented feature?

unsigned_char_array
Senior III

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.

 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
1 ACCEPTED SOLUTION

Accepted Solutions

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,

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2

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,

Mohammad MORADI
ST Software Developer | TouchGFX

I confirm it works in TouchGFX 4.24.0. Now everyone can just zip the widgets instead of using the export feature of TouchGFX.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.