[vlc-commits] macosx/sparkle: set feed URL based on architecture and add debug

Felix Paul Kühne git at videolan.org
Mon Dec 7 06:01:56 UTC 2020


vlc/vlc-3.0 | branch: master | Felix Paul Kühne <felix at feepk.net> | Mon Nov 30 19:12:16 2020 +0100| [4fec28243a48c7a7b6cf1da598297f7274eabf2f] | committer: Felix Paul Kühne

macosx/sparkle: set feed URL based on architecture and add debug

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=4fec28243a48c7a7b6cf1da598297f7274eabf2f
---

 modules/gui/macosx/VLCMain.m | 29 ++++++++++++++++++++++++++++-
 share/Info.plist.in          |  2 --
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/VLCMain.m b/modules/gui/macosx/VLCMain.m
index 3e08c48da9..ef1f6f7c0e 100644
--- a/modules/gui/macosx/VLCMain.m
+++ b/modules/gui/macosx/VLCMain.m
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * VLCMain.m: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2016 VLC authors and VideoLAN
+ * Copyright (C) 2002-2020 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan.org>
@@ -385,6 +385,33 @@ static VLCMain *sharedInstance = nil;
 
     return YES;
 }
+
+/* use the correct feed depending on the hardware architecture */
+- (nullable NSString *)feedURLStringForUpdater:(SUUpdater *)updater
+{
+#ifdef __x86_64__
+    return @"https://update.videolan.org/vlc/sparkle/vlc-intel64.xml";
+#elif __arm64__
+    return @"https://update.videolan.org/vlc/sparkle/vlc-arm64.xml";
+#else
+    #warning unsupported architecture
+#endif
+}
+
+- (void)updaterDidNotFindUpdate:(SUUpdater *)updater
+{
+    msg_Dbg(p_intf, "No update found");
+}
+
+- (void)updater:(SUUpdater *)updater failedToDownloadUpdate:(SUAppcastItem *)item error:(NSError *)error
+{
+    msg_Warn(p_intf, "Failed to download update with error %li", error.code);
+}
+
+- (void)updater:(SUUpdater *)updater didAbortWithError:(NSError *)error
+{
+    msg_Err(p_intf, "Updater aborted with error %li", error.code);
+}
 #endif
 
 #pragma mark -
diff --git a/share/Info.plist.in b/share/Info.plist.in
index 0fe1a4682d..711721fdee 100644
--- a/share/Info.plist.in
+++ b/share/Info.plist.in
@@ -1520,8 +1520,6 @@
 	<string>VLCApplication</string>
 	<key>NSSupportsAutomaticGraphicsSwitching</key>
 	<true/>
-	<key>SUFeedURL</key>
-	<string>https://update.videolan.org/vlc/sparkle/vlc-intel64.xml</string>
 	<key>SUPublicDSAKeyFile</key>
 	<string>dsa_pub.pem</string>
 	<key>UTExportedTypeDeclarations</key>



More information about the vlc-commits mailing list