mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-21 11:23:37 +00:00
cherry pick Linux specific changes from 2.3 (#13205)
- add a new mode to build in docker - Improve AppImage 1. fix libbz2 soname differeence issue on appimage 2. Downgrade to 22.04 for better compatibility 3. improve appimage overall
This commit is contained in:
@@ -209,7 +209,7 @@ bool DesktopIntegrationDialog::is_integrated()
|
||||
if (path.empty())
|
||||
return false;
|
||||
|
||||
// confirmation that OrcaSlicer.desktop exists
|
||||
// confirmation that com.orcaslicer.OrcaSlicer.desktop exists
|
||||
struct stat buffer;
|
||||
return (stat (path.c_str(), &buffer) == 0);
|
||||
}
|
||||
@@ -342,13 +342,13 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
||||
"StartupNotify=false\n"
|
||||
"StartupWMClass=orca-slicer\n", name_suffix, version_suffix, excutable_path);
|
||||
|
||||
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||
std::string path = GUI::format("%1%/applications/com.orcaslicer.OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||
if (create_desktop_file(path, desktop_file)){
|
||||
BOOST_LOG_TRIVIAL(debug) << "OrcaSlicer.desktop file installation success.";
|
||||
BOOST_LOG_TRIVIAL(debug) << "com.orcaslicer.OrcaSlicer.desktop file installation success.";
|
||||
break;
|
||||
} else {
|
||||
// write failed - try another path
|
||||
BOOST_LOG_TRIVIAL(debug) << "Attempt to OrcaSlicer.desktop file installation failed. failed path: " << target_candidates[i];
|
||||
BOOST_LOG_TRIVIAL(debug) << "Attempt to com.orcaslicer.OrcaSlicer.desktop file installation failed. failed path: " << target_candidates[i];
|
||||
target_dir_desktop.clear();
|
||||
}
|
||||
// if all failed - try creating default home folder
|
||||
@@ -357,7 +357,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
||||
create_path(into_u8(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||
// create desktop file
|
||||
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
||||
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||
std::string path = GUI::format("%1%/applications/com.orcaslicer.OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||
if (contains_path_dir(target_dir_desktop, "applications")) {
|
||||
if (!create_desktop_file(path, desktop_file)) {
|
||||
// Desktop file not written - end desktop integration
|
||||
@@ -379,7 +379,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
||||
return;
|
||||
}
|
||||
// save path to desktop file
|
||||
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix));
|
||||
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/com.orcaslicer.OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix));
|
||||
|
||||
// Repeat for Gcode viewer - use same paths as for slicer files
|
||||
// Do NOT add gcode viewer desktop file on ChromeOS
|
||||
|
||||
Reference in New Issue
Block a user