sommelier-core icon indicating copy to clipboard operation
sommelier-core copied to clipboard

How to snap non-redistributable Windows application available as a zipball?

Open brlin-tw opened this issue 5 years ago • 4 comments

The application provides a zipball with the setup executable in it, how to snap this kind of application?

brlin-tw avatar Oct 01 '20 12:10 brlin-tw

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 :)

merlijn-sebrechts avatar Jan 25 '21 22:01 merlijn-sebrechts

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.

merlijn-sebrechts avatar Jan 25 '21 22:01 merlijn-sebrechts

I included a pre-install hook sourced from hooks/pre-install via;

parts:
  hooks:
    plugin: dump
    source: hooks/
    organize:
      '*': sommelier/hooks/
    stage:
      - sommelier

Thermionix avatar Aug 11 '21 07:08 Thermionix

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

merlijn-sebrechts avatar Aug 12 '21 11:08 merlijn-sebrechts