AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

Replace Boost.filesystem and update CI infrastructure #175

Closed TheAssassin closed 1 year ago

TheAssassin commented 1 year ago

This pull request modernizes some parts of our code base. Specifically, it introduces the use of C++17 and replaces Boost.filesystem with the native <filesystem> library. Boost is still used, but only the header-only algorithms template library, which we only include from the system now (even the version shipped in CentOS 7 is sufficient).

Since the tests would have to be touched anyway, I took the chance to replace all of the temporary files and directories handling with a new RAII-style class, which is easier to use, requires less boilerplate code and makes the paths reasonably predictable (e.g., for cleaning up after crashes in tests).

The PR further removes the deprecated Ubuntu xenial from our CI and make the builds on the oldest still-supported Ubuntu LTS work with C++17 (it's doable with reasonably low effort, even in deployment, see AppImageUpdate). AppImageBuild has been updated accordingly to provide a fully C++17 compatible compiler (moving from devtoolset-8 to devtoolset-9 and thus gcc-9).

The final commit corrects the wrong usage of some of CMake's dependency handling, modernizing this code and making it more comprehensible.