A script to package commercial game installers as Flatpaks

Aug 27, 2018 16:07 GMT  ·  By

There's a new script in town that promises to let you convert the installers of various commercial Linux games to Flatpak bundles you can run conternized on a wide range of GNU/Linux distributions.

Meet game-to-flatpak, an open-source shell script created by GNOME developer Bastien Nocera, which does one thing, to automatically convert commercial Linux game installers in various formats to Flatpak bundles for distribution across multiple Linux-based operating systems supporting the Flatpak universal binary format.

While the script is in early stages of development, it already supports the MojoSetup installer, as well as the makeself installer used by GOG.com to package their games. It doesn't support Wine-based game installers, nor DOSBox automagic wrappers, which won't be supported in future versions of the script, so don't ask for them, warns the developer.

Here's how to convert Linux game installers to Flatpaks

Using the game-to-flatpak script to automatically convert commercial Linux game installer to Flatpak bundles you can then distribute across virtually any GNU/Linux distribution out there, is pretty straightforward. First, download the latest version of the script from its GitHub page by cloning the master repository.

Save the script in your Home directory and make sure it's executable. Then, download the game installer you want to convert to a Flatpak bundle and run the "./game-to-flatpak [installer file]" command (without quotes) in a terminal emulator to add the game installer to the repository directory.

You'll then have to run the first command listed below, but you only need to do it once. Checking which games are available in the repositories is easy with the second command listed below, and you can use the last listed command to install the game for the current user, of course replacing the name of the game installer with yours.

flatpak --user remote-add --no-gpg-verify --if-not-exists game-repo repo flatpak --user remote-ls game-repo flatpak --user install game-repo com.gog.Call_of_Cthulhu__Shadow_of_the_Comet