mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-29 13:52:07 +00:00
Fix CICD
This commit is contained in:
@@ -246,18 +246,22 @@ else ()
|
|||||||
set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/../resources")
|
set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/../resources")
|
||||||
endif ()
|
endif ()
|
||||||
if (CMAKE_MACOSX_BUNDLE)
|
if (CMAKE_MACOSX_BUNDLE)
|
||||||
if (CMAKE_CONFIGURATION_TYPES)
|
|
||||||
set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/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_ICON_FILE Icon.icns)
|
||||||
set(MACOSX_BUNDLE_BUNDLE_NAME "Snapmaker Orca")
|
set_target_properties(Snapmaker_Orca PROPERTIES
|
||||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${Snapmaker_VERSION})
|
MACOSX_BUNDLE TRUE
|
||||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright(C) 2022-2024 Li Jiang All Rights Reserved")
|
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 "$<TARGET_FILE_DIR:Snapmaker_Orca>/../Resources")
|
||||||
|
else()
|
||||||
|
set(BIN_RESOURCES_DIR "$<TARGET_FILE_DIR:Snapmaker_Orca>/../Resources")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
add_custom_command(TARGET Snapmaker_Orca POST_BUILD
|
add_custom_command(TARGET Snapmaker_Orca POST_BUILD
|
||||||
COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${BIN_RESOURCES_DIR}"
|
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:Snapmaker_Orca>/../Resources"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink "${SLIC3R_RESOURCES_DIR}" "$<TARGET_FILE_DIR:Snapmaker_Orca>/../Resources"
|
||||||
COMMENT "Symlinking the resources directory into the build tree"
|
COMMENT "Symlinking the resources directory into the build tree"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
|||||||
// if all failed - try creating default home folder
|
// if all failed - try creating default home folder
|
||||||
if (i == target_candidates.size() - 1) {
|
if (i == target_candidates.size() - 1) {
|
||||||
// create $HOME/.local/share
|
// 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
|
// create desktop file
|
||||||
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
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);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
// save path to desktop file
|
// 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
|
// Repeat for Gcode viewer - use same paths as for slicer files
|
||||||
// Do NOT add gcode viewer desktop file on ChromeOS
|
// 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 all failed - try creating default home folder
|
||||||
if (!candidate_found) {
|
if (!candidate_found) {
|
||||||
// create $HOME/.local/share
|
// 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
|
// create desktop file
|
||||||
target_dir_desktop = GUI::format("%1%/.local/share", wxFileName::GetHomeDir());
|
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);
|
std::string path = GUI::format("%1%/applications/Snapmaker_OrcaURLProtocol-%2%%3%.desktop", target_dir_desktop, url_prefix, version_suffix);
|
||||||
|
|||||||
Reference in New Issue
Block a user