saturneric / GpgFrontend

A free, open-source, robust yet user-friendly, compact and cross-platform tool for OpenPGP encryption. It stands out as an exceptional GUI frontend for the modern GnuPG (gpg).
https://gpgfrontend.bktus.com
GNU General Public License v3.0
450 stars 43 forks source link

Windows 7 version #151

Open sergeevabc opened 1 month ago

sergeevabc commented 1 month ago

I see that QT5 version is back.

However, 2.1.3 QT5 does not work on Windows 7. It seems you compiled it without targeting that OS as a minimum, so it tries to use KERNEL32.dll calls introduced in Windows 8 such as CreateFile2 instead of CreateFileW. It leads to the fatal error.

2024-0513-0202 gpgfrontend 216 createfile2 error

If I replace that call in libarchive.dll, then GPGFrontend launches.

$ sfk.exe replace -pat /CreateFile2/CreateFileW/ -dir . -file *.* -yes
[total hits/matching patterns/non-matching patterns]
[003/1/0] libarchive.dll
109 files checked, 1 changed.
saturneric commented 1 month ago

https://github.com/libarchive/libarchive/blob/d33f44ad5ce754d61e4e8e193edc52e50bf2896c/libarchive/archive_read_disk_windows.c#L420

That if-else statement at the specified line addresses the current situation. What would happen if I forked this library and recompiled it on Windows 7? Is this a good idea, or is there an already compiled binary available?

sergeevabc commented 1 month ago

Sure, let's try that path.

soulstenance commented 1 month ago

I'm sure it's been stated many times before but it's very discouraged to use Windows 7 for any form of security use case. It hasn't had updates for almost half a decade. This not working on Windows 7 seems more like a feature than a bug.