07th-mod / python-patcher

Mod Installer for the Higurashi and Umineko Games
151 stars 12 forks source link

GOG compatability archive not applied correctly #162

Closed drojf closed 2 years ago

drojf commented 3 years ago

We had an issue here: https://github.com/07th-mod/matsuribayashi/issues/32 whose root cause was that the GOG compatability archive was not properly applied to the game (the files were not copied over/into the game folder)

The issue seems to be the moveFilesIntoPlace function. This function is mainly used on MacOS and Linux, as on those OSs we first extract all the archives to a temporary folder, then we "move files into place" from that temporary folder to the game folder.

The way we do this is as below:

https://github.com/07th-mod/python-patcher/blob/e6371a58aa81bcc1fcbe6ad2bf75cd215feaac26/higurashiInstaller.py#L241-L260

We first move the contents of the data directory (the HigurashiEp08_Data folder), then if there is anything outside the data directory that we need to move, we take care of that manually. This is because the data directory is different on MacOS, and some special handling is done for the data directory, while the other files are copied "as is".

The problem is that the GOG compatibility archive has some files outside of the data directory - the executables and some .so files. These files wouldn't be copied.

There is also no sanity check that the temp folder is empty before it is deleted, which would have made the install fail more obviously.

This can probably be fixed by copying any files that remain directly into the game root.

drojf commented 2 years ago

Had a user with this problem test the latest release https://github.com/07th-mod/python-patcher/releases/tag/v1.1.91-force-build, and it fixed the issue.