How to snap non-redistributable Windows application available as a zipball?
The application provides a zipball with the setup executable in it, how to snap this kind of application?
You could add a pre-install hook that extracts the zip and then point INSTALL_EXE or RUN_EXE to it. Any script in "$SNAP/sommelier/hooks/pre-install" will be sourced before installation is attempted. These hooks can also change environment variables.
See https://github.com/snapcrafters/sommelier-core/blob/4020073016c6ee3400fa7a4f4f26308485aa3484/scripts/sommelier#L108
Hooks still need to be documented so contributions are welcome :)
It might be useful to look into doing this automatically. For example, sommelier could check if INSTALL_EXE is an archive and extract it if that's the case.
I included a pre-install hook sourced from hooks/pre-install via;
parts:
hooks:
plugin: dump
source: hooks/
organize:
'*': sommelier/hooks/
stage:
- sommelier
Thanks, @Thermionix
For anyone looking to do the same thing, this is what it looks like in action: https://github.com/Thermionix/fusion360/blob/main/snap/snapcraft.yaml