Support transparent upload of 7z archive content (like zip)
I started using 7z to archive my builds, instead of zip, in order to save space on my cloud storage. I have a custom script besides all the .7z files to upload them to itch via butler.
However, when I tried to play the game on itch app on Linux, I noticed that the Launch button would merely reveal the .7z in the file explorer (e.g. Dolphin) and not automatically extract files and run the binary (Unity build .x86_64) inside.
Note:
- I tested on SteamDeck - SteamOS
- On Linux Ubuntu I think the binary was run but I cannot remember
- I tested on Windows and there is the same issue
I thought that butler supported 7z just like zip and I even remembered that 7z was recommended, but when I read this doc again: https://itch.io/docs/butler/single-files.html
I saw no such thing, only mention of zip. However, technically speaking, when I looked at the various GitHub threads, butler & itch app seem to use 7-zip so it should be feasible.
In summary, it seems that currently, the .7z file itself is uploaded to itch, but if: a. butler unarchived .7z like .zip it would upload the folder content and let the server re-archive it as seems fit (probably a zip, in any case something that itch app can read) b. itch app knew about .7z it would be able to unarchive a .7z file
(so this could also be an issue with itch app - if you think so, I'll open another ticket on the itch app repo)
So implementing either a. or b. would fix the issue of .7z not being launched immediately in itch app. Implementing only b. would not fix the issue of users downloading games directly from the browser and getting a .7z they can't open (in this case dev should add info about 7zip as on this page: https://mrdrnose.itch.io/votv). But in this case, there is still the advantage of downloading a smaller file so it may be worth it after all.
Finally, an option could be added for people who really want to upload a .7z to benefit from smaller size and not having it auto-rearchived to .zip. It could be useful e.g. to upload an artbook where there is no binary, we only care about size.
For now, I'll just change my script to upload either a folder or .zip, but I'll have to move my scripts a bit around to some temp folder (since I really just want .7z on my cloud storage).
One interesting thing is that if I manually extract the .7z archive, from here if I go to itch app and Launch the game, it works! It will detect the folder of same name and the binary inside. Which makes me think that itch app was supposed to auto-unarchive the .7z but just happens to fail doing so on SteamOS? Is it a bug then?