From 3a6815ff04b125e1eeeea2b5a7bc133e0ebddc63 Mon Sep 17 00:00:00 2001 From: xiaoyeliu Date: Mon, 17 Nov 2025 14:09:01 +0800 Subject: [PATCH] Fix CICD --- src/CMakeLists.txt | 22 ++++++++++++--------- src/slic3r/GUI/DesktopIntegrationDialog.cpp | 6 +++--- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 40e49d104f..21cc0e882c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -246,18 +246,22 @@ else () set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/../resources") endif () if (CMAKE_MACOSX_BUNDLE) - if (CMAKE_CONFIGURATION_TYPES) - set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/$/Snapmaker Orca.app/Contents/Resources") - else() - set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/Snapmaker Orca.app/Contents/Resources") - endif() set(MACOSX_BUNDLE_ICON_FILE Icon.icns) - set(MACOSX_BUNDLE_BUNDLE_NAME "Snapmaker Orca") - set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${Snapmaker_VERSION}) - set(MACOSX_BUNDLE_COPYRIGHT "Copyright(C) 2022-2024 Li Jiang All Rights Reserved") + set_target_properties(Snapmaker_Orca PROPERTIES + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_BUNDLE_NAME "Snapmaker Orca" + MACOSX_BUNDLE_SHORT_VERSION_STRING ${Snapmaker_VERSION} + MACOSX_BUNDLE_COPYRIGHT "Copyright(C) 2022-2024 Li Jiang All Rights Reserved") + # Get the bundle directory by going up from the executable to the .app bundle + if (CMAKE_CONFIGURATION_TYPES) + set(BIN_RESOURCES_DIR "$/../Resources") + else() + set(BIN_RESOURCES_DIR "$/../Resources") + endif() endif() add_custom_command(TARGET Snapmaker_Orca POST_BUILD - COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${BIN_RESOURCES_DIR}" + COMMAND ${CMAKE_COMMAND} -E make_directory "$/../Resources" + COMMAND ${CMAKE_COMMAND} -E create_symlink "${SLIC3R_RESOURCES_DIR}" "$/../Resources" COMMENT "Symlinking the resources directory into the build tree" VERBATIM) endif () diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp index c2b5d9cafe..c9f1cf67b4 100644 --- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp +++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp @@ -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);