From ef1ac290cd40b0cde4223e2d57f73a40d2cbc6a1 Mon Sep 17 00:00:00 2001 From: David Helkowski Date: Thu, 22 Jan 2026 14:58:06 +0900 Subject: [PATCH] Refactor Sparkle update configuration in Info.plist and CMakeLists.txt This commit updates the Info.plist.in file to use configurable placeholders for the Sparkle feed URL and public key, allowing downstream builders to customize these values. The CMakeLists.txt file is modified to define default values for these placeholders, enhancing flexibility for third-party builds while preserving upstream behavior. --- dist/CMakeLists.txt | 15 +++++++++++++++ dist/macos/Info.plist.in | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index 47876d443..4fce209f5 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -9,6 +9,21 @@ if(APPLE) else() set(LSMinimumSystemVersion 12.0) endif() + + # Sparkle (macOS updates) + # These values are embedded into Info.plist and control where the app checks for updates. + # Downstream builders can override on the CMake command line: + # -DSPARKLE_FEED_URL="https://example.com/appcast.xml" + # -DSPARKLE_PUBLIC_ED25519_KEY="base64==" + # + # Defaults preserve upstream behavior, but are intentionally configurable for third-party builds. + if(NOT DEFINED SPARKLE_FEED_URL) + set(SPARKLE_FEED_URL "https://www.strawberrymusicplayer.org/sparkle-macos-@ARCH@") + endif() + if(NOT DEFINED SPARKLE_PUBLIC_ED25519_KEY) + set(SPARKLE_PUBLIC_ED25519_KEY "/OydhYVfypuO2Mf7G6DUqVZWW9G19eFV74qaDCBTOUk=") + endif() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/macos/Info.plist) endif() diff --git a/dist/macos/Info.plist.in b/dist/macos/Info.plist.in index abfcd4dfe..607cfe952 100644 --- a/dist/macos/Info.plist.in +++ b/dist/macos/Info.plist.in @@ -35,9 +35,9 @@ LSMinimumSystemVersion @LSMinimumSystemVersion@ SUFeedURL - https://www.strawberrymusicplayer.org/sparkle-macos-@ARCH@ + @SPARKLE_FEED_URL@ SUPublicEDKey - /OydhYVfypuO2Mf7G6DUqVZWW9G19eFV74qaDCBTOUk= + @SPARKLE_PUBLIC_ED25519_KEY@ CFBundleURLTypes