mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-27 21:00:59 -07:00
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:
parent
4110ecc968
commit
951fc8e98a
114 changed files with 214 additions and 45 deletions
|
|
@ -818,9 +818,9 @@ void PresetUpdater::priv::sync_tooltip(std::string http_url, std::string languag
|
|||
fs::path cache_root = fs::path(data_dir()) / "resources/tooltip";
|
||||
try {
|
||||
auto vf = cache_root / "common" / "version";
|
||||
if (fs::exists(vf)) load_string_file(vf, common_version);
|
||||
if (fs::exists(vf)) Slic3r::load_string_file(vf, common_version);
|
||||
vf = cache_root / language / "version";
|
||||
if (fs::exists(vf)) load_string_file(vf, language_version);
|
||||
if (fs::exists(vf)) Slic3r::load_string_file(vf, language_version);
|
||||
} catch (...) {}
|
||||
std::map<std::string, Resource> resources
|
||||
{
|
||||
|
|
@ -996,11 +996,11 @@ void PresetUpdater::priv::sync_printer_config(std::string http_url)
|
|||
auto cache_folder = data_dir_path / "ota" / "printers";
|
||||
|
||||
try {
|
||||
load_string_file(config_folder / "version.txt", curr_version);
|
||||
Slic3r::load_string_file(config_folder / "version.txt", curr_version);
|
||||
boost::algorithm::trim(curr_version);
|
||||
} catch (...) {}
|
||||
try {
|
||||
load_string_file(cache_folder / "version.txt", cached_version);
|
||||
Slic3r::load_string_file(cache_folder / "version.txt", cached_version);
|
||||
boost::algorithm::trim(cached_version);
|
||||
} catch (...) {}
|
||||
if (!cached_version.empty()) {
|
||||
|
|
@ -1034,7 +1034,7 @@ void PresetUpdater::priv::sync_printer_config(std::string http_url)
|
|||
|
||||
bool result = false;
|
||||
try {
|
||||
load_string_file(cache_folder / "version.txt", cached_version);
|
||||
Slic3r::load_string_file(cache_folder / "version.txt", cached_version);
|
||||
boost::algorithm::trim(cached_version);
|
||||
result = true;
|
||||
} catch (...) {}
|
||||
|
|
@ -1137,11 +1137,11 @@ Updates PresetUpdater::priv::get_printer_config_updates(bool update) const
|
|||
std::string curr_version;
|
||||
std::string resc_version;
|
||||
try {
|
||||
load_string_file(resc_folder / "version.txt", resc_version);
|
||||
Slic3r::load_string_file(resc_folder / "version.txt", resc_version);
|
||||
boost::algorithm::trim(resc_version);
|
||||
} catch (...) {}
|
||||
try {
|
||||
load_string_file(config_folder / "version.txt", curr_version);
|
||||
Slic3r::load_string_file(config_folder / "version.txt", curr_version);
|
||||
boost::algorithm::trim(curr_version);
|
||||
} catch (...) {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue