alexpado / hoyoverse-music-unpacker

Extract music from Hoyoverse's games. Support Genshin Impact, Honkai Star Rail and Honkai Impact
70 stars 7 forks source link

Allow specifying an output directory #7

Closed aMytho closed 1 year ago

aMytho commented 1 year ago

I think it would be useful to extract the files to a specific directory instead of the same directory as the executable.

I did some modifications and managed to get it working. If you think this would be useful, I'll make a PR.

alexpado commented 1 year ago

Hi ! I'm open to contributions, it's always a pleasure ! :)

If you did the modification based on the master branch, this might break upon merging feature/refactoring due to a huge amount of edits. On that branch, I made it so each game will be extracted in their own folders (extracted/GAME), see Line 42 in GameUnpacker.java

The idea would be that GameUnpacker could accept an optional value setting the base directory, as asLocalDirectory can accept a File instance as an argument to set the root path.

EDIT: The feature/refactoring branch isn't ready to be merged yet. It's working, but the issue is that due to refactoring, the music extraction from the pre-downloaded package needs to be rewritten. The extraction in itself is already working though. I’m waiting for the pre-download of each game to do that

aMytho commented 1 year ago

I made the PR #8

I initially did it on the master branch, but I re-wrote it for the new branch.

aMytho commented 1 year ago

Merged in #8