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

Sean McGovern gseanmcg at gmail.com
Sun Dec 6 18:43:14 CET 2020


Hi Felix,

No super strong feeling on this, but maybe the arm64 should be an #elif
test and leave the else to trigger an #error.

-- Sean McGovern

On Sun., Dec. 6, 2020, 12:30 Felix Paul Kühne, <fkuehne at videolan.org> wrote:

> From: Felix Paul Kühne <felix at feepk.net>
>
> ---
>  modules/gui/macosx/VLCMain.m | 25 +++++++++++++++++++++++++
>  share/Info.plist.in          |  2 --
>  2 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/modules/gui/macosx/VLCMain.m b/modules/gui/macosx/VLCMain.m
> index 3e08c48da9..f0b1d6d4a9 100644
> --- a/modules/gui/macosx/VLCMain.m
> +++ b/modules/gui/macosx/VLCMain.m
> @@ -385,6 +385,31 @@ - (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle
>
>      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";
> +#else
> +    return @"https://update.videolan.org/vlc/sparkle/vlc-arm64.xml";
> +#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>
> --
> 2.24.3 (Apple Git-128)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201206/74d794c5/attachment.html>


More information about the vlc-devel mailing list