New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to extract single file from archive #13
Comments
This one would be a gamechanger for me. |
It's the next feature on my todo list 👍 I'll hopefully have something pushed to the dev branch for testing by the weekend. |
Smart Extract will only extract a single file from an archive when the following conditions are met: * A file has been selected in "Select ROM In Archive" menu * All file types in the archive are the same
Hi @nixxou - I've added single file extraction, available as an option in the config window as "Smart Extract" (default is enabled). It will extract a single file from an archive when:
The assumption here is that when all the files in an archive are the same type, the archive probably contains multiple versions of the game, and only a single file is required to extract. If the file types differ, it's assumed all files are required to extract (e.g. cue+bin). I've attached plugin v2.12 beta 1 for you to test. It also includes the second part of the idea mentioned in #19, where you can select the emulator in the file selection window. Could you let me know if the new single file extraction works for your archives? |
Thank you, i will try that (maybe not before monday, my wife gonna kill me if i spend my time on computer on week end) |
Just a side note, i think your "Smart Extract" is a genius idea.
|
I'm not great with C# and github, but i was thinking about something like that :
|
Thanks very much for the feedback, ideas, and code snippets. Much appreciated!
Great idea. I'll add an ignore list, with txt, nfo, and maybe xml and dat too. It'd make sense for this list to be configurable, but I'll hardcode it for now.
It might also make sense to include a 'must extract' extension list including cue, gdi, toc, mds, and so on. Any file extensions found that match this list will always extract the whole archive. With all of the extension checks, I wonder how much can be done by 7z itself with a specially crafted command line, containing combinations of files to include and exclude. I'll see what can be done 🤔 |
Thanks again for your comments and insights, I think this feature is close to complete. v2.12 beta 2 is ready to try: |
I didn't try it yet, just took a look on the dev branch. Seems nice. The use case for the 2 that come in my mind is bundling multiples SNES MSU1 roms into a 7z file. (Or N64 games with .htc extra texture packs, stuff like that) |
I made some test with the dev branch from April 16, i didn't try the last commit, so maybe it's fixed now, but i found an issue : If there is no selected game in game-index.ini and you launch from a direct click within the launchbox UI (not using the select rom in Archive), it will decompress the whole archive to cache even if smart extract is active and the archive is filled with standalone file. |
I was a little unsure whether to do the smart extract when a single file hadn't been selected. Now that the smart extract option can be set for individual emulator\platforms, it's probably safe to remove the check for an individual file. So the only factor determining smart extract is the file extensions, but I think that's OK. I'll implement the fix later tonight. |
On that topic, i'm wondering something about the ListFileArchive function, if i understand your code well enought, it will execute a 7z l for each priority extension (at least until it find a match), right ? It will take a lot of time, peeking into the 7z file. I wonder if the wildcard check should be done on the plugin side instead of 7z. `
` Edit : I make a test on one of my archive (not a big one), i went down from 1808,2772ms. to 387,024ms. |
Thanks for testing that out. I ran some tests here and found repeated calls to |
Implemented in v2.12. Issue in extracting entire archive when individual file wasn't previously selected tracked in #27. |
Add an option to extract only a single file from a very large archive.
Things to consider:
See this post initial report:
https://forums.launchbox-app.com/topic/35010-archive-cache-manager/?do=findComment&comment=405266
The text was updated successfully, but these errors were encountered: