Page 1 of 1

Linux Flatpak

Posted: Tue Jul 18, 2017 8:26 pm
by allthecoffee
A problem with paintstorm right now is the inconsistent behavior across multiple Linux distributions. This is due to variations in system libraries across the distros. One way around this is to compile a version of paintstorm for every distro. This is completely unrealistic and not going to happen due to the sheer amount of linux distros out there. Another option is to use flatpak. Flatpak is a new form of package distribution that has software run in a sandbox with a `runtime`. A runtime is bascially just a specific collection of system libraries that the software will use instead of your native systems. Any libs not included in the runtime can be packaged with the application. With this approach, you can drastically reduce the variability of behavior across systems.

Over the past little while I have been trying to get paintstorm to run in a flatpak sandbox. For the most part I was able to get it working. I had to compile quite a few libs myself, but I got it done. The real problem was the hardcoded path of `/usr/share/paintstorm` in the executable. In flatpak, `/usr` is read-only and the only directory you have access to is `/app`. Fortunately, I was able to find the path and hex edit it to be `/app/share/paintstorm`. It took a lot longer than I was expecting because I didn't think to search for the path as a wide string in the hex editor. Now that I've done it, it works (for the most part, there are still some bugs). If anyone would like to help me on this project or would like to test it, I have it all in a gitlab repo.

Re: Linux Flatpak

Posted: Wed Jul 19, 2017 2:38 pm
by allthecoffee
If you guys don't want to deal with git and stuff, I've created a standalone flatpak file for you guys to install. You can download it here:
http://mdit.to/files/flatpak/paintstorm ... 17.flatpak.

Re: Linux Flatpak

Posted: Fri Oct 13, 2017 11:34 pm
by ChaosOver
Thanks for the flatpak. It works well!
I'm on CentOS7.4 and dunno how to setup flatpaks myself. Would you mind to flatpak the latest release? Or share some knowledge about flatpaks? Can you remember the linie where you changed the filepath?


Thanks