Implement new Windows executable thumbcreator.
This is more-or-less finished proof-of-concept for an improved Windows executable thumbcreator. It is implemented without dependencies and attempting to be memory-safe.
I am posting this now in hopes of receiving feedback. Since I wrote this without any communication to anybody, I have zero expectation it will ever be merged, but I'm happy to rewrite it as much as necessary to make it acceptable. If it is not accepted, I will likely maintain a separate kio plugin on my own instead.
Here's what I believe this improves on:
- No dependencies
- Same codepath on all platforms
- Succeeds at generating thumbnails for some executables that
wrestool
seems to fail on. (I haven't looked into why yet.) - Better performance: Not benched, but MUCH faster at generating thumbnails in a large folder.
- Network transparency; there's an issue elsewhere in kio/dolphin that makes this not work correctly, so I don't have it enabled yet. (I haven't triaged/reported this issue.)
I think the primary obvious downside is that there is a larger maintenance burden: This code is necessarily more complicated and larger, since unlike either previous codepath it implements parsing Windows PE and NE executables on its own. However, the Windows PE and NE formats have been very stable for a long time, so I think the amount of maintenance that would be necessary should be very minimal and would mostly be related to changes in thumbcreators and kio in general.
(There were bugs in Qt's ICOReader
, but they have been fixed since the creation of this MR. These fixes apply to both the current Windows thumbcreator and the new one in this MR.)
Some autotests have been added for the basic use cases.