layday / instawow

World of Warcraft add-on manager CLI and GUI
GNU General Public License v3.0
153 stars 9 forks source link

Add support for other archive formats #142

Closed devicarus closed 5 months ago

devicarus commented 5 months ago

Wanted to write a plug-in but unfortunately the addons are only hosted as RAR archives by the provider, I'd be great if instawow supported it besides ZIP.

I looked at the code and seems like replacing the ZipFile lib here with something more universal like patool (also supports TAR, GZIP, 7z, ...) should do the trick?

Let me know what you think :)

layday commented 5 months ago

Other archive formats are pretty fringe. I've personally only seen RAR being used by WoWI more than 10y ago now - which host is it that distributes add-ons as RAR files?

devicarus commented 5 months ago

Thanks for the quick response! Just a few Mediafire links I found on a forum, unfortunately all RARs. Asked on Matrix and @seirl said he did a hack for it in his plugin, but would also prefer it being directly supported.

I definitely don't think instawow should support RAR out of the box, just have a universal wrapper like patool so if the plug-in developer supplies the required helper application (e.g. unrar in this case probably) - they can use it :)

layday commented 5 months ago

I don't wanna take on patool as a dependency, but I can add the ability to override the archive opener on a resolver basis.

layday commented 5 months ago

Added in https://github.com/layday/instawow/commit/e25302416900aef6c01b6d70f19659c8bc0fc07b.

layday commented 5 months ago

Released in v3.3.0.