Voilà!
PureBasic AppTainer Helper (PAT) v1.0.0 (Beta) - compile for multiple Linux distros in seconds
What is PureBasic AppTainer Helper (PAT)?
I've uploaded the .def files including a helper script called "PAT" to allow compiling PureBasic to multiple Linux distros without the user of Virtual Machines. I regard this as a
beta version (use it at your own risk). I have tested the script and .defs only on my own PC with Linux Mint and compiling some basic PB console and GUI apps. It works well for me, but only for x64.
PAT needs AppTainer to work. AppTainer is an open source application that can create "containerized" Linux distributions, containing only the necessary files needed to make specific Linux applications launch. This makes it possible to run applications that were designed for specific versions and distros of Linux.
PAT leverages this by making it possible to compile PureBasic source code for many different Linux distributions without needing to install Linux on other PCs or in Virtual Machines. PAT includes a bulk compile option, which can produce compiled applications for many Linux distros in a matter of seconds. Before compiling, you must build a "container" (.sif) for each distro that you want to compile for. Each container will likely take up about 450 - 750 MB of space.
Feel free to edit and improve upon the concept, suggest more .def files etc.
Basic usage:
- AppTainer must first be installed: https://github.com/apptainer/apptainer/releases
- The Official PureBasic (.tgz) archives (compiler and IDE) must be downloaded corresponding to the distros you want to compile to (i.e. PB Ubuntu 18 release if compiling for Ubuntu 18). You must put these archives in the "purebasic/" subfolder of PAT. Rename them to something useful, e.g. PBv621-x64-Ubuntu18.
- Run "PAT.sh" to get started (you may need to set execute rights)
- You must first create an AppTainer container for *each* target Linux distro that you want to compile for (use option 2 "BUILD PureBasic container"
- After successfully creating the AppTainer container(s), you can use menu option 6 or 7 to compile for a single distro, or use option 8 or 9 to bulk compile to ALL distros that you created AppTainer containers for in step 4 above.
For more comprehensive help, see the included Readme.
Supported Linux distributions for compiling (x64 only)
PAT contains PureBasic .def files for:
- Debian 10 (use PureBasic for Ubuntu 18)
- Debian 12 (use PureBasic for Ubuntu 20-22)
- Ubuntu 18
- Ubuntu 20
- Ubuntu 22
- Ubuntu 24
Download
- Download
here.
- MD5 checksum: d50689283aed4e9ce7fdda748656f05d