We had a few odd dependencies that caused nothing but pain in dependent projects
like libphysis. One of these was libunshield (a C library) that our game_install
feature used, but to be honest this was the wrong library to put this code. It
was really only ever used by Astra, and should live there instead - there's no
reason to have it shared between applications (and it's small enough to be
copied if *you* need it.) Also that also killed the system-deps dependency which
had a significant impact on our build time.
Another dependency was replaced: libz-sys. This is replaced by the pure Rust
libz-rs (through libz-rs-sys) which should simplify deploying physis without
having to worry about manually linking libz or other nonsense. Some leftover
copied code from flate2 can also be removed.
I also removed the visual_data feature as Astra ended up using it anyway, and
the distinction doesn't make much sense now. It was previously to gate some
dependencies needed for visual data extraction, but the bitflags and half crates
are small. I can look into splitting the crate up into more features if needed
later.
A dependency that was erroneously included in the refactoring was quote, which
has been removed. Also ran cargo fmt, clippy too.
Now it reads much more of the index file format, and tries to handle
index1/index2 differences more opaquely. I'm not yet happy with the API, it
needs a bit more work.
This implements parts of the AddFile operation for ZiPatch, which can
now create patches that add files. Note that ZiPatches created with
this will be abnormally huge since compression is not implemented yet.
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.
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.
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
* 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.