A *lot* of import fixes for flatpak (#3909)

* A *lot* of import fixes for flatpak

Aside, thank you @hadess for the majority of these fixes. You are the
base point for a lot of issues fixed during the creation of this
flatpak.

* Use slic3r::load_string_file

Boost 1.84 removed `boost::fs::load_string_file` so use the func located
in Utils.hpp
This commit is contained in:
Aidan 2024-01-31 05:23:29 -06:00 committed by GitHub
parent 4110ecc968
commit 951fc8e98a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
114 changed files with 214 additions and 45 deletions

View file

@ -13,6 +13,7 @@
#include <cstdarg>
#include <stdio.h>
#include "format.hpp"
#include "Platform.hpp"
#include "Time.hpp"
#include "libslic3r.h"
@ -1510,7 +1511,7 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out)
// SoftFever: copy directory recursively
void copy_directory_recursively(const boost::filesystem::path &source, const boost::filesystem::path &target)
{
BOOST_LOG_TRIVIAL(info) << format("copy_directory_recursively %1% -> %2%", source, target);
BOOST_LOG_TRIVIAL(info) << Slic3r::format("copy_directory_recursively %1% -> %2%", source, target);
std::string error_message;
if (boost::filesystem::exists(target))
@ -1530,7 +1531,7 @@ void copy_directory_recursively(const boost::filesystem::path &source, const boo
CopyFileResult cfr = copy_file(source_file, target_file, error_message, false);
if (cfr != CopyFileResult::SUCCESS) {
BOOST_LOG_TRIVIAL(error) << "Copying failed(" << cfr << "): " << error_message;
throw Slic3r::CriticalException(format(
throw Slic3r::CriticalException(Slic3r::format(
("Copying directory %1% to %2% failed: %3%"),
source, target, error_message));
}