Package: support and extract jar files like zip files
#24001
Merged
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.
What this PR does ?
This PR make the
zig fetchcommand but also the zig package system handlejarlikezipA tiny story on why I make this PR
In one of my personal project, I used zig to make a cross platform audio player engine where FFmpeg was linked to my zig executable as a shared library.
Since the zig build system and package manager are so powerful, I'm able to directly fetch from the Internet my prebuild binaries of FFmpeg in my zig build so I could link them and install them along my executable.
Everything was fine for IOS, MacOS and even windows since I could download
zipandtarbut for my Android build the library was shared withjarfile since some others android project could directly find theincludeandlibdirectories.However when I try to fetch my
jarfile to extract manually theincludeandlibdirectories from github I got this error :I understand jar file are more than zip file but I still think
zigshould be able to understand them like regularzip. (If I take ajarand useunzipon it it's just works)Maybe I'm wrong and also this is the first time I contribute here but I didn't see anyone discuss about that and since it was simple to add the
mime-typeand the file extension recognition aszipI still hope you will find this PR interesting ^^