Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
widescreen cheats_ws.zip: 6 removed, 49 changed, 452 new, 2440 total
This syncs the cheats_ws.zip widescreen patches archive with Devina's archive from 2016-08-07. The zip file is the zipped content of folder cheats_ws at the archive, after removing the following 10 known WIP patches: 00000000 1771BFE4 C77AF2CA DA3DD765 07652DD9 FDA1CBF6 CC96CE93 2545CA71 1CE1DA8A CD787D68 Compared to the previous content of cheats_ws.zip: - 6 files deleted (07652DD9 1CE1DA8A 44D23E5F CC96CE93 CD787D68 FDA1CBF6) - 49 modified files - 452 new files (w00t!) - 1939 files identical to before The zip now has a total of 2440 patch files, compared to 1994 before.
- Loading branch information
8e8b8f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, there's a duplicate
1429EB9F.pnach
(named1429EB9F (2).pnach
) in the archive. Contents are entirely identical.8e8b8f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll let Devina know (it's at the original archive from the forum too), but I won't update it soon most probably, because it doesn't affect the game, and since this is a binary file and also not a tiny one, I prefer to update it relatively rarely (typically every 6 months or so) to not overwhelm the repo.
8e8b8f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@turtleli if you have an idea how avoid it being a binary entity, we should consider it.
The non-binary options IMO are:
GameIndex.dbf
is (which is how I approached this archive initially), or maybe a more standard format? tar? uncompressed zip? uncompressed something-else? (not sure whether or not that'd work as expected though).Also, if we want diff to work on some aggregated file, we'd have to make sure that we can produce exactly the same file on all systems. So the entries order should be well determined (alphabetically probably), CR/CRLF should be taken into account (probably use
dos2unix
or equivalent as part of the aggregation process), as well as file permissions or other properties which could make it accidentally into such archive and could create a different file on different systems, etc.8e8b8f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I can't think of any other ideas.
I suppose the first approach (create zip while building) wouldn't require changes to the widescreen archive handling. It'd probably be simple to build the zip on Linux (it might depend on cmake version). If the zip can be built without additional external dependencies on Windows too (some googling suggests powershell can zip stuff) then I think it might be worth doing (so long as nobody minds having a few thousands extra files in the git repo).
The other approach (concatenated file) sounds like a lot of work, since we'd need to do our own tooling and make changes to how PCSX2 handles the patches.
8e8b8f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the main issue with it in my opinion. I'm not sure what effects it would have and where.
One thing I have in mind is that it might make
git-prompt
somewhat/much slower (especially on windows?). Another is possibly tortoise-git would get slow too with so many files, even if small. As well as windows explorer itself is not great with thousands of files in a single dir IIRC (can be split to subdirs, but.. effort..).As for zipping on windows, and possibly on linux too, one option to not depend on external tools is build miniz ourselves and then use it, and it has a very liberal license. IIRC it builds on pretty much all platforms and can create zip files. Though zip is pretty common anyway, I think it wouldn't be a big issue regardless.
The first commit of the widescreen archive actually worked like that IIRC, with a batch file which creates a simple concatenation with whatever separator, and then code which uses it. The zip only came later and was actually more work to get right than the concatenation.
So I don't think code wise it would be an issue. But what could be an issue is making sure that we can produce exactly the same file on all systems.
Another issue with such approach IMO is that it lets users edit it more easily, and I think we prefer them not to (we want them instead to use their own
cheats_ws
dir to override the zip).Or.. we could leave it as is and keep updating it only every few months. It's not great but also not absolutely terrible...
8e8b8f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I looked into the zip method on Windows because curiosity. I managed to generate a zipfile with the following powershell script:
and by adding a VS project that contains a custom build command like:
I manually generated an index file with
ls cheats_ws_folder > path/to/index.txt
so Visual Studio can detect file changes and will rebuild the archive if necessary, though something likemd5sum --tag cheats_ws/*
might be a better idea in case no patches are added/removed but are improved instead. I checked that it works on AppVeyor.