@Alexzee :-
I'll be damned. I missed that! However, I've GOT to laugh.....because SnapCraft have done precisely what I did myself around 3-3½ years ago.
~~~~~~~~~~~~~~~~~~~~~~
Out of all the Linux 'portable' formats, I've always preferred the AppImage. They don't need a 'support' framework permanently installed before they'll function - unlike Snaps or FlatPaks - and their ONLY requirement is that FUSE be installed (
Filesystem in
USEr-space). This allows them to unpack their contents into a sand-boxed, virtual file-system they create in /tmp for the duration.....and it's from here that they in fact run.
A correctly-assembled AppImage contains absolutely everything it needs to run......and FUSE is pretty much standard across most distros these days.
When WINE builds began to be available as an AppImage - I get mine from
here - I immediately sussed-out that this was by far the simplest way of running WINE in Linux. All that is needed is for the WINE AppImage to be sym-linked into /usr/bin 3 times.....as 'wine', 'wine32', and 'wineserver'. It's as simple as that. Then you just run
....in the terminal to set up your 'prefix', where the virtual Windows install exists.
~~~~~~~~~~~~~~~~~~~~~
PhotoScape has for a long while been available as a Windows 'PortableApp', from
here. Anyway, I got to thinking (given my proclivities for building 'portable' applications, you can see where this is going, can't you?); put a WINE AppImage AND the portable build of PhotoScape together in a single directory, script the AppImage to link itself into /usr/bin, followed by the 'prefix' being created the first time you use it, then immediately followed by the portable PhotoScape firing-up. After the first run, PhotoScape just fires-up as though you were running it natively in Windows (although securely sand-boxed in /tmp).
The final pieces of this puzzle are provided by Puppy's ROX-filer FM, and hinge on its very powerful (and versatile) sym-linking function, along with its ability to create & use what are known as "executable directories". As long as a file called "AppRun" - just a sym-link to the launcher script will do - is present within the directory, a single click on the directory itself is all that's needed to set things in motion.
When you're finished, the app shuts down & the WINE symlinks in /usr/bin disappear into cyberspace. I've also set things up so the 'virtual Windows' (within the 'prefix') ALSO lives within the 'portable' directory, being sym-linked into position when the whole shebang launches. Nothing is left within the file-system at all when it closes.
I built this self-contained 'portable' version of PhotoScape for anybody who may want to run PhotoScape & play around with it, without having WINE permanently installed. I thought I was quite unusual in using PhotoScape, but it turns out - over the last few years - that the app is well-known and pretty widely used by an awful lot of people.....many of whom would like to be able to temporarily run it within Linux without actually having WINE installed.
~~~~~~~~~~~~~~~~~~~~~~~~~
Doubtless the Snap build does exactly the same as my own solution, with one big disadvantage; Snaps have to be within the file-system when you run them, whereas the WINE AppImage/portable PhotoScape combo can live completely outside the OS.....and run purely via sym-links.
It works beautifully.......and you've seen some of the results I achieve with it.
(Since the WINE AppImages are so simple to use, I also produce self-contained 'portable' builds of it for the Puppy community (with scripts provided to 'link' or 'unlink' them).. I have half-a-dozen different WINE builds set-up - for different purposes - on my big secondary data drive.....and built my own GUI (using YAD) that permits easy 'swapping-over' between builds, AND lets me see at a glance which version is currently linked in to the system.)
With the exception of needing to modify user-permissions throughout the application (remember, Puppy run as root all the time!), I can't see any reason why this wouldn't run in a mainstream distro.
Sorry for the length of this missive.....and for perhaps dragging your thread off-track!.....but I felt a bit of background would be helpful, too.
Mike.