This commit is contained in:
xiaoyeliu
2025-11-17 14:09:01 +08:00
parent 69cf2a1964
commit 3a6815ff04
2 changed files with 16 additions and 12 deletions

View File

@@ -354,7 +354,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
// if all failed - try creating default home folder
if (i == target_candidates.size() - 1) {
// create $HOME/.local/share
create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/applications");
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/Snapmaker_Orca%2%.desktop", target_dir_desktop, version_suffix);
@@ -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/Snapmaker_Orca%2%.desktop", target_dir_desktop, version_suffix));
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/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
@@ -562,7 +562,7 @@ void DesktopIntegrationDialog::perform_downloader_desktop_integration(std::strin
// if all failed - try creating default home folder
if (!candidate_found) {
// create $HOME/.local/share
create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/applications");
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/Snapmaker_OrcaURLProtocol-%2%%3%.desktop", target_dir_desktop, url_prefix, version_suffix);