From b4b5f3b69d2690f14bb79542f8578608f6345010 Mon Sep 17 00:00:00 2001 From: Yee Cheng Chin Date: Sat, 3 Oct 2020 23:59:03 -0700 Subject: [PATCH] Decouple Sparkle from MMAppController if DISABLE_SPARKLE is set This makes the code buildable if DISABLE_SPARKLE is set, even if the Sparkle framework is removed. This doesn't mean there is a way to build without linking against Sparkle though as Xcode doesn't provide an easy way to control whether a framework is used or not via xcodebuild command line arguemnts, but for situations like Apple Silicon builds we can at least just remove the reference to Sparkle and it should build now. --- src/MacVim/MMAppController.h | 5 +++++ src/MacVim/MMAppController.m | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/MacVim/MMAppController.h b/src/MacVim/MMAppController.h index cd5cfcfa59..991147c104 100644 --- a/src/MacVim/MMAppController.h +++ b/src/MacVim/MMAppController.h @@ -14,7 +14,10 @@ @class MMWindowController; @class MMVimController; + +#if !DISABLE_SPARKLE @class SUUpdater; +#endif @interface MMAppController : NSObject { @@ -36,7 +39,9 @@ NSMutableDictionary *inputQueues; int processingFlag; +#if !DISABLE_SPARKLE SUUpdater *updater; +#endif FSEventStreamRef fsEventStream; } diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index c864da75a0..92338ea10b 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -326,7 +326,9 @@ fsEventCallback(ConstFSEventStreamRef streamRef, [defaultMainMenu release]; defaultMainMenu = nil; currentMainMenu = nil; [appMenuItemTemplate release]; appMenuItemTemplate = nil; +#if !DISABLE_SPARKLE [updater release]; updater = nil; +#endif [super dealloc]; }