57d13f0b21
Remove hardcoded "win32" string in repository filename functions
...
Second part to that recent refactor, so eventually it might be possible
to read DATs from other platforms.
2024-04-15 19:43:16 -04:00
e146b31bd4
Unify Platform enums, use it in GameData API and yet more simplifying
...
So we had a couple copies of a Platform enum, so now there's a public
one in the common module. It wasn't possible to specify what platform
the GameData is, so now it's part of initialization. While I'm at it,
remove the stupid reload_repositories() requirement and make that a
private part of the API.
2024-04-15 19:40:55 -04:00
8e6b0dd6b4
Fix issue where patches could panic because file didn't exist
...
Some of the recent boot updates now include patch files that try to
ask us to remove files that were already deleted. Now the patch process
is smarter and will quietly warn that said operation failed but will
continue to chug along.
2024-03-23 11:56:55 -04:00
67eab58c24
Fix some clippy warnings
2023-12-02 20:17:05 -05:00
2c5491f82c
Improve patch documentation
2023-12-02 20:12:09 -05:00
b210782af0
Don't use println
2023-11-10 17:25:53 -05:00
0621ce03d7
Convert more signed integers to unsigned variants
...
Should help protect against future patch troubles
2023-10-05 12:33:44 -04:00
267feae8cf
Fix broken 6.5 patching
...
Thanks to the goatcorp team for figuring this out first, there's some
parts of the patches that are actually unsigned ints.
Should constitute further testing, but it now patches up to 6.5
2023-10-04 11:06:52 -04:00
2000b978b3
Ensure compliance with REUSE, add to CI
2023-08-06 08:25:04 -04:00
f036f741a9
Possibly fix platform strings for ps3 & ps4
2023-08-02 16:27:55 -04:00
b180cf5aac
Fix patching for some patch files
...
We still need to read the index type, even though it's NOP. It appeared
in a recent patch!
2023-07-30 14:45:19 -04:00
425f755850
Fix clippy warnings about unnecessary deref, useless casts
2023-02-20 16:07:48 -05:00
67d2f035c3
Reformat code with rustfmt
2022-10-20 11:45:55 -04:00
78856af0a5
Finally, implement SqpkFileOperation::RemoveAll
2022-10-17 19:05:58 -04:00
263f18a544
Remove Index Add/Delete commands, intentionally NOP some ops
2022-10-17 17:48:34 -04:00
ebc7ae77e7
Implement MakeDirTree, consolidate some parts of FileOperation
2022-10-17 16:54:40 -04:00
5508813340
Fix a very small error that caused index2 file gen to fail
2022-10-17 16:20:42 -04:00
c61ba6be7a
Note a TODO that the InvalidPatchFile error is misleading
2022-10-17 15:25:49 -04:00
e86d910594
Update binrw to 0.10.0
...
This introduces a new breaking change, namely that all endianness must
be known. I've done the best I can, but I'll be checking soon.
2022-10-13 16:03:46 -04:00
d87694df4d
Make apply_patch public
2022-10-13 15:45:50 -04:00
9819f87fcc
Suppress some warnings
2022-09-15 16:26:31 -04:00
0dd4121557
Improve patch NOP logging
2022-09-13 16:51:32 -04:00
ca6a5be72b
Don't panic on IndexAddDelete, it should actually NOP
2022-08-31 17:58:08 -04:00
d9e79e563a
Reformat code
2022-08-16 11:52:07 -04:00
c7184cb36f
Fix Clippy warnings and errors
2022-08-16 11:50:18 -04:00
22569cf09d
Oops, apparently index and patch platform id sizes are different!
2022-08-09 22:37:40 -04:00
18322a13d2
Handle patching error handling better
...
* Move PlatformId to common module.
* Platform id is no longer hardcoded to win32.
* Parse apply options correctly.
* Parse target info better, use more native structures.
* All errors are now handled properly, and propagated up.
* Added a new Region enum.
* Added todo!() to all unhandled patching branches.
* Paths are now built using PathBuf instead of format!().
* process_patch function is no longer accessible, now you have to use
the function found in GameData and BootData.
2022-08-09 21:51:52 -04:00
c03c6495fc
Combine the AddDirectoryChunk and DeleteDirectoryChunk patch structs
...
They are actually the same structure, so now they are combined into
one (similar to DeleteData and ExpandData, I should rename those too)
2022-08-06 18:07:06 -04:00
be9c850fc1
Remove some warnings
2022-07-27 21:21:50 -04:00
db2ea22201
Create directories if needed for AddData, ExpandData, etc
2022-07-20 17:25:10 -04:00
f340319a9e
Stub out SqpkFileOperation::RemoveAll
2022-07-20 16:30:17 -04:00
70a92594a2
Re-add support for FDHR version 2, used for boot patches still
2022-07-20 15:45:22 -04:00
c4549a413f
Remove duplicated dat/index filename calculations from patch routine
...
This also removes the hardcoded ffxiv repository in the path, so now it
should properly calculate the correct expansion folder.
2022-07-20 15:04:55 -04:00
d6c85ab6a6
Add match for unhandled operation
2022-07-20 11:42:31 -04:00
115733d0b6
Add missing DeleteFile operation, fix-up wipe buffer handling
...
This makes game patching fully functional now!
2022-07-20 11:00:21 -04:00
389c3fe00b
Add initial files
2022-07-19 19:29:41 -04:00