icculus / mojosetup

A standalone installer for Linux software.
https://icculus.org/mojosetup/
Other
68 stars 7 forks source link

MojoSetup.archive.offsetofstart(base) fails for tar.xz #70

Open naatje80 opened 9 months ago

naatje80 commented 9 months ago

First of all: thank you for continuing this great project. I'm currently recreating setups for games I either bought via GOG/Steam (to include Linux support or switch to a better configuration including dosbox-staging/scummvm/wine) or games I mainly own on physical storage and bought over the years in the 90's/00's. I'm using Arch Linux docker containers to create my whole setup. Yesterday I was finally able to generate two setups using the package container. However, I initially created mojosetups with tar.xz binaries. Using cmake, I specifically enabled both TAR and TAR.XZ support. The whole installation works (the files are uncompressed and installed; the desktop file is also created), however it seems to fail on the last step with and error: MojoSetup.fatal(_("BUG: Unexpected value")). For now, I switched to zip, which is working like expected.

Looking at the lua code, it seems to fail at line 997 of mojosetup_mailnline.lua "maxbytes = MojoSetup.archive.offsetofstart(base)". So I assume it is failing somewhere else in the codebase. However, I'm not familiar with Lua yet. Did I miss a certain dependency during compilation? Do you otherwise have some tips to further debug this issue.

PS: I was also running into a failure when the vendor in config.lua contains spaces. But I will either check if I'm able to resolve it myself (and create a pull request for this), or create a separate ticket for this. Same for building the examples: the ones I've tested were not working until I enabled MOJOSETUP_LUALIB_IO (which is currently disabled in the build example script).