KnossosNET / Knossos.NET

Repository for the Knossos.NET launcher, currently in development.
GNU General Public License v3.0
30 stars 11 forks source link

Add SevenZipcmdline decompression, Fix autoupdate, add utility method to decompress files #55

Closed Shivansps closed 11 months ago

Shivansps commented 11 months ago

Im going to make some more tests before merging

The bad news is that while doing this i discovered that RC6 autoupdate is broken in the worse way possible, it will not display the update. This is strange before i remember testing it. If the user has the "autoupdate" option enabled it will pickup the update and do it more or less correctly. But other than that it will give an "call from invalid thread" error that gets printed to log but nothing more. RC6 cant display the update msg box, or close itself. This was caused by my changes to make macos more responsive. Since i was working on that part of the code i took the opportunity to fix that too.

This pr adds decompression function to the SevenZip console wrapper, reworked the decompression methods, now an utility function inside KnUtils, it also adds a proper progress tracking to Sharpcompress decompression process.

There is a hidden setting to choose the decompressor, the settings json will have a "decompressor" option, with possible values being = 0, 1 or 2. 0 = Auto Auto means knet will first try to decompress using sharpcompress and if decompression fails, it will then try with the sevenzip wrapper. 1 = only sharpcompress 2 = only sevenzip