This clears up much of the todo list for mspatcha. GetFilePatchSignature* and NormalizeFileForPatchSignature have now been implemented in these changes.
These changes bring better support for things like the Adobe Acrobat installer without the need for things like the winetricks mspatcha.dll native dll override. Still needed is support for interleaved streams in the LZXD decompression logic, however this is a great start to better supporting software installers that use the Windows interface for creating and applying patches to files.
This is the beginning of the fixes required for bug 12501: https://bugs.winehq.org/show_bug.cgi?id=12501
--
v7: mspatcha: Fix binary to hex string conversions for GetFilePatchSignatureByBuffer
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870
The default exit code is only used when a process is killed by the system or through a signal.
These are exceptional cases where exit code 1 (killed by Task Manager) is more appropriate than the normal termination code of 0.
Chromium does not restart helper processes that exit with code 0 (see [kill.h](https://source.chromium.org/chromium/chromium/src/+/main:base/proce…), with this fix they are restarted when killed by the system or by a signal.
--
v3: server: Set the default thread exit code to 1.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3648
On Thu Sep 21 00:46:47 2023 +0000, Jinoh Kang wrote:
> I'm not sure if it is correct to flip the "violent delth" flag
> parameter. Anyways, this looks like a duplicate of
> https://gitlab.winehq.org/wine/wine/-/merge_requests/3648, so you might
> want to ask about its status?
@iamahuman thanks for pointing out that older thread, I'll follow up on that!
With regards to the `violent_death` parameter, are there any guidelines around when it is appropriate to set that to a value of 1? From what I can see, it's primarily used when a protocol error is encountered (e.g. [here](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/request.c… and [here](https://gitlab.winehq.org/wine/wine/-/blob/wine-8.16/server/request.c…) and the server can no longer communicate with the client process. That seems fairly similar to the abnormal process termination scenario (with the main difference being that the server isn't trying to send or receive a message at the time it detects the pipe close), but there might be some nuance there that I'm overlooking?
If there's a more appropriate mechanism to set the non-zero exit code in the abnormal process termination scenario then I'd certainly be happy to update the patch to use that instead. The current implementation was designed to be as minimally intrusive as possible whilst still achieving the desired behaviour, but I'm not familiar enough with the internal workings of the Wine server to be completely confident in its correctness, so any guidance here is much appreciated! (I'm also happy to add comments if desired, since I recognise that the current code is not particularly explicit in communicating its intent to readers.)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3908#note_46121
libdecor makes sense as a workaround for Gnome which doesn't support server side decorations. I.e. server side decorations can be used as a primary option and if it's not available, Wine can fall back to libdecor.
It shouldn't matter much for games I think, since games normally run in fullscreen if you care about performance, so window decorations are really irrelevant in gaming use case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3909#note_46120