Dolphin, the GameCube and Wii emulator - Forums
Resource Pack Compression - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Development Discussion (https://forums.dolphin-emu.org/Forum-development-discussion)
+--- Thread: Resource Pack Compression (/Thread-resource-pack-compression)



Resource Pack Compression - Bighead - 04-09-2019

I've been procrastinating creating resource pack versions of all my textures packs, mainly because I wanted to figure out how to get compressed resource packs working in Dolphin, plus I would also like to add the ability to compress them with my script if possible. I finally spent some time looking into this, and I still haven't figured it out so I'm hoping someone who knows more can help me out.

I haven't been able to find much talk about it except the PR that added it here:
https://github.com/dolphin-emu/dolphin/pull/7773

And the tidbit mentioned in the spec:
https://gist.github.com/spycrab/9d05056755d8d7908bdb871a99d050bf

Techjar mentions that it only supports "Zlib (aka Deflate)". Looking into it, the ZIP format is using deflate, so I think maybe that will work. I compressed a zip file, added the necessary line to the manifest, and nada. Looking more into it, the GZIP format also uses Zlib library, a.k.a. deflate. I didn't know much about it, so looking into it further I learned that GZIP can only handle a single file, so a "TAR" archive (or tarball) needs to be created, then compress that. So I create a ".tar.gz" archive, and that doesn't work either. Does anyone know exactly what program/settings/archive are needed?

The packs I created and tried are here:
http://www.mediafire.com/folder/dt8q8n5smnt66/ResourcePacks


RE: Resource Pack Compression - spycrab - 04-09-2019

Your texture pack is mostly fine but your manifest is malformed (and yes it needs to be a zip file).
Code:
{
"name": "New Super Mario Bros. Wii HD",
"id" : "new-super-mario-bros-wii-hd",
"version": "2.8",
"authors": ["Bighead", "razius"],
"website": "https://forums.dolphin-emu.org/Thread-new-super-mario-bros-wii-hd-texture-pack-v2-8-november-13-2017",
"description": "HD texture pack for NSMBW."
"compressed": "true"
}

1. You're missing a comma in the description line
2. Compressed is a boolean an doesn't need to be escaped so just use true instead of "true"

With those small adjustments (see below), your texture pack loads fine for me.


Code:
{
"name": "New Super Mario Bros. Wii HD",
"id" : "new-super-mario-bros-wii-hd",
"version": "2.8",
"authors": ["Bighead", "razius"],
"website": "https://forums.dolphin-emu.org/Thread-new-super-mario-bros-wii-hd-texture-pack-v2-8-november-13-2017",
"description": "HD texture pack for NSMBW.",
"compressed": true
}



RE: Resource Pack Compression - Bighead - 04-09-2019

Felled by typos. Sad When I added the "compressed" line in my script, I copied the "description" line which didn't have a comma, and I forgot to put one in there. Thank you for the reply, everything works great now! And it even works with standard ZIP so adding compression was as simple as changing a flag which is great. I convinced myself for no reason that I'd probably have to use GZIP.


RE: Resource Pack Compression - spycrab - 04-09-2019

No big deal. Our error reporting isn't really detailed enough right now.
I'll hopefully address this soon.