Bundling Zsh with AppImage?

I would want to create AppImage for a script that has only one dependency – Zshell. I’ve found appimagetool but it doesn’t give an easy answer of how to automatically bundle Zshell in the package.

I’ve tried appimagetool n-commodore (n-commodore is the directory with the script), however it didn’t copy Zshell into the package. This is understandable, as the tool doesn’t know anything about Zsh. However, I have now a problem of deciding of how should I include Zsh in the package. Should I compile it with a custom --prefix …prefix…, or if I should include also libgdbm.so, which is required as Zsh will be build with zsh/db/gdbm module, which uses the library?

A pragmatic way is to make an AppDir of zshell, and then modify it to also include (and run) your script.