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
-- v20: mspatcha: Remove useless unused parameter annotation
This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/wine/-/merge_requests/3870
On Thu Sep 21 05:34:00 2023 +0000, Aidan Khoury wrote:
changed this line in [version 20 of the diff](/wine/wine/-/merge_requests/3870/diffs?diff_id=70785&start_sha=47b02c6a641dd6a24e8b5009efee348352fa9ac3#acda5f5d040f90ecb29756b0c057cc22a0c00c32_1147_1147)
Changed in 06b76488
On Tue Sep 19 20:29:33 2023 +0000, Aidan Khoury wrote:
changed this line in [version 11 of the diff](/wine/wine/-/merge_requests/3870/diffs?diff_id=70305&start_sha=d58bbd1672672bdeae597fcbbb401dc7483d4919#acda5f5d040f90ecb29756b0c057cc22a0c00c32_982_982)
changed in 42e9c060
On Tue Sep 19 21:01:19 2023 +0000, Aidan Khoury wrote:
changed this line in [version 14 of the diff](/wine/wine/-/merge_requests/3870/diffs?diff_id=70390&start_sha=065bbf12ab4d62ff3a91e85ae40ca548ae908560#acda5f5d040f90ecb29756b0c057cc22a0c00c32_1015_1044)
I suppose we could use strnicmp/strncasecmp instead, though those routines lack portability, so that's why I did it the way you see. I say its a hack because it's not easy to immediately comprehend what the code is doing with the magic OR'ing of 0x20 to force ascii characters to be lowercase.
changed in ff51d90b
On Tue Sep 19 18:15:53 2023 +0000, Aidan Khoury wrote:
changed this line in [version 9 of the diff](/wine/wine/-/merge_requests/3870/diffs?diff_id=70283&start_sha=69533132d16cf72bde70431c4fa6e24b20bdc10b#acda5f5d040f90ecb29756b0c057cc22a0c00c32_753_752)
Relocations are not guaranteed to be aligned. The other PE image structures require unalignment as well for the case that mspatcha compiled as a 64-bit PE image (8-byte alignment default) will be manipulating 32-bit PE image buffers which defaults to 4-byte alignment.
I may be wrong about all of this in wine's case, forgive me as I am also not super familiar with GCC's default type alignment. I noticed in dlls/msvcrt/string.c uses unaligned typedefs, so I would have assumed that types are aligned to their own size boundary.
Let me know what you think of 6088f31e
On Thu Sep 21 05:38:03 2023 +0000, Aidan Khoury wrote:
Okay, I thought it was easier to read the way I grouped the arguments based on their intent/use. `normalize_old_file_image` is also called from the ApplyPatch* routines so having the trace in `normalize_old_file_image` really produces the most effective trace output. I left the result variable for debugging purposes - no longer needed so I will remove it.
Changed in 065bbf12
On Tue Sep 19 20:29:35 2023 +0000, Aidan Khoury wrote:
changed this line in [version 11 of the diff](/wine/wine/-/merge_requests/3870/diffs?diff_id=70305&start_sha=d58bbd1672672bdeae597fcbbb401dc7483d4919#acda5f5d040f90ecb29756b0c057cc22a0c00c32_991_991)
changed in 42e9c060
On Tue Sep 19 20:29:36 2023 +0000, Aidan Khoury wrote:
changed this line in [version 11 of the diff](/wine/wine/-/merge_requests/3870/diffs?diff_id=70305&start_sha=d58bbd1672672bdeae597fcbbb401dc7483d4919#acda5f5d040f90ecb29756b0c057cc22a0c00c32_1052_1053)
changed in 42e9c060
On Thu Sep 21 05:19:42 2023 +0000, Aidan Khoury wrote:
Ah okay, that would have been great to know before I removed all the todo's lol. This is going to be a mess to cleanup, got any tips?
I think I got it figured out, I will squash all the tiny fix commits to reduce the amount of time wasted manually reverting and re-checking failing tests between commits.