diff --git a/cmake/modules/MacOSXBundleInfo.plist.in b/cmake/modules/MacOSXBundleInfo.plist.in index 15979c4822..5d645c61b7 100644 --- a/cmake/modules/MacOSXBundleInfo.plist.in +++ b/cmake/modules/MacOSXBundleInfo.plist.in @@ -131,13 +131,22 @@ NSHumanReadableCopyright ${MACOSX_BUNDLE_COPYRIGHT} - NSAppTransportSecurity + NSAppTransportSecurity NSAllowsArbitraryLoads - + NSAllowsArbitraryLoadsInWebContent + + SUFeedURL + https://check-version.orcaslicer.com/appcast.xml + SUPublicEDKey + eLFARgt9i0VZQR4FtXiTL6jdwjkGr2RMPjfYCCfBWeM= + SUEnableAutomaticChecks + + SUAllowsAutomaticUpdates + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1eed269efe..61df95dac6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -105,7 +105,6 @@ endif() # Process mainfests for various platforms. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/msw/OrcaSlicer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/OrcaSlicer.rc @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/msw/OrcaSlicer.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/OrcaSlicer.manifest @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY) if (WIN32) add_library(OrcaSlicer SHARED OrcaSlicer.cpp OrcaSlicer.hpp) else () diff --git a/src/dev-utils/platform/osx/Info.plist.in b/src/dev-utils/platform/osx/Info.plist.in deleted file mode 100644 index a443861421..0000000000 --- a/src/dev-utils/platform/osx/Info.plist.in +++ /dev/null @@ -1,148 +0,0 @@ - - - - - CFBundleExecutable - @SLIC3R_APP_KEY@ - CFBundleGetInfoString - @SLIC3R_APP_NAME@ Copyright(C) 2021-2023 Lunkuo All Rights Reserved - CFBundleIconFile - images/OrcaSlicer.icns - CFBundleName - @SLIC3R_APP_KEY@ - CFBundleShortVersionString - @SLIC3R_APP_NAME@ @SLIC3R_BUILD_ID@ - CFBundleIdentifier - com.softfever3d.orca-slic3r/ - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - @SLIC3R_BUILD_ID@ - CFBundleURLTypes - ATSApplicationFontsPath - fonts/ - - - CFBundleURLName - orcasliceropen url - CFBundleURLSchemes - - orcasliceropen - orcaslicer - - - - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - stl - STL - - CFBundleTypeIconFile - images/stl.icns - CFBundleTypeName - STL - CFBundleTypeRole - Viewer - LISsAppleDefaultForType - - LSHandlerRank - Alternate - - - CFBundleTypeExtensions - - obj - OBJ - - CFBundleTypeIconFile - images/OrcaSlicer.icns - CFBundleTypeName - STL - CFBundleTypeRole - Viewer - LISsAppleDefaultForType - - LSHandlerRank - Alternate - - - CFBundleTypeExtensions - - amf - AMF - - CFBundleTypeIconFile - images/OrcaSlicer.icns - CFBundleTypeName - AMF - CFBundleTypeRole - Viewer - LISsAppleDefaultForType - - LSHandlerRank - Alternate - - - CFBundleTypeExtensions - - 3mf - 3MF - - CFBundleTypeIconFile - images/OrcaSlicer.icns - CFBundleTypeName - 3MF - CFBundleTypeRole - Viewer - LISsAppleDefaultForType - - LSHandlerRank - Alternate - - - CFBundleTypeExtensions - - gcode - GCODE - - CFBundleTypeIconFile - images/gcode.icns - CFBundleTypeName - GCODE - CFBundleTypeRole - Viewer - LISsAppleDefaultForType - - LSHandlerRank - Alternate - - - LSMinimumSystemVersion - 10.10 - NSPrincipalClass - NSApplication - NSHighResolutionCapable - - LSEnvironment - - ASAN_OPTIONS - detect_container_overflow=0 - - - SUFeedURL - https://check-version.orcaslicer.com/appcast.xml - SUPublicEDKey - eLFARgt9i0VZQR4FtXiTL6jdwjkGr2RMPjfYCCfBWeM= - SUEnableAutomaticChecks - - SUAllowsAutomaticUpdates - - - diff --git a/src/slic3r/GUI/UpdateManagerMac.mm b/src/slic3r/GUI/UpdateManagerMac.mm index 9c74678844..c22e7d7095 100644 --- a/src/slic3r/GUI/UpdateManagerMac.mm +++ b/src/slic3r/GUI/UpdateManagerMac.mm @@ -88,21 +88,39 @@ void UpdateManager::init(const std::string& appcast_url, const std::string& publ BOOST_LOG_TRIVIAL(info) << "UpdateManager: Initializing Sparkle 2"; @autoreleasepool { - // Create the delegate - s_updater_delegate = [[OrcaSparkleDelegate alloc] init]; + @try { + // Create the delegate + s_updater_delegate = [[OrcaSparkleDelegate alloc] init]; - // Create the standard updater controller - // This reads SUFeedURL and SUPublicEDKey from Info.plist - s_updater_controller = [[SPUStandardUpdaterController alloc] - initWithStartingUpdater:YES - updaterDelegate:s_updater_delegate - userDriverDelegate:nil]; + // Create the standard updater controller + // Use startingUpdater:NO to defer startup and avoid immediate XPC errors + // This allows the app to start even if code signing prevents XPC communication + s_updater_controller = [[SPUStandardUpdaterController alloc] + initWithStartingUpdater:NO + updaterDelegate:s_updater_delegate + userDriverDelegate:nil]; - if (s_updater_controller) { - s_initialized = true; - BOOST_LOG_TRIVIAL(info) << "UpdateManager: Sparkle 2 initialized successfully"; - } else { - BOOST_LOG_TRIVIAL(error) << "UpdateManager: Failed to initialize Sparkle 2"; + if (s_updater_controller) { + // Try to start the updater - may fail on ad-hoc signed builds + NSError *error = nil; + if ([s_updater_controller.updater startUpdater:&error]) { + s_initialized = true; + BOOST_LOG_TRIVIAL(info) << "UpdateManager: Sparkle 2 initialized successfully"; + } else { + BOOST_LOG_TRIVIAL(warning) << "UpdateManager: Sparkle updater failed to start: " + << [[error localizedDescription] UTF8String]; + BOOST_LOG_TRIVIAL(warning) << "UpdateManager: This is expected for ad-hoc signed builds. " + << "Auto-update will work in properly signed release builds."; + // Keep controller alive for potential future use + s_initialized = true; + } + } else { + BOOST_LOG_TRIVIAL(error) << "UpdateManager: Failed to create Sparkle controller"; + } + } + @catch (NSException *exception) { + BOOST_LOG_TRIVIAL(error) << "UpdateManager: Exception during Sparkle init: " + << [[exception reason] UTF8String]; } } }