Replace stale metadata-resources.zip with compressed usedhashes.kark#3
Open
oBusk wants to merge 2 commits intorfuzzo:mainfrom
Open
Replace stale metadata-resources.zip with compressed usedhashes.kark#3oBusk wants to merge 2 commits intorfuzzo:mainfrom
metadata-resources.zip with compressed usedhashes.kark#3oBusk wants to merge 2 commits intorfuzzo:mainfrom
Conversation
…lvenKit The zip is no longer produced and/or updated. WolvenKit keeps a "usedhashes.kark" file in their repo which is updated with all the files in the game, so we can get that as a submodule and include that file instead. A bonus is that we can include the compressed file (<4mb) instead of a uncompressed csv (140mb). But this means we need to decompress the file at runtime of course.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So I was using red4-conflicts and was seeing paths that was not resolved, and I figured there would probably be some paths changed with the updates to cyberpunk since the last
metadata-resources.zipwas checked into this lib. I understand the zip that this repo contains used to be provided on https://www.cyberpunk.net/en/modding-support, but is no longer.I then looked at how WolvenKit deals with the same issue, and found that they have a
usedhashes.karkwhich they produce from the gamefiles. I realize this is something that red4lib and red4-conflicts in turn should be able to use as a replacement formetadata-resources.csv.At first, I tried to recreate the csv from the kark at buildtime, to fully replicate existing behaviour, but the build process became so complex because we needed a runtime to decompress the kark with and stuff. See main...oBusk:red4lib:d118f286fed9c02754249cd5b9e524ad048da3f0
This PR replaces the static zip by inserting WolvenKit as a git submodule, including the compressed
usedhashes.karkin the executionable, and on demand decompress, calculate all the hashes into a hashmap. A nice bonus that the lib is reduced from 163 MB to 5 MB, but obviously comes at the cost that we need to unpack with oogle and calculate hash once per runtime.From it's usage in red4-conflicts I believe that should be fine, and just a part of the startup process, and for it's usage in the other parts of red4lib I hope it's doable.
As an alternative to this more complex solution, I've also made a PR for just updating the zip to match the latest version of usedhashes.kark, see #2