From b6956a480db5fad6e003300be88fd4ef5c7ef4b8 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 6 Jun 2021 19:26:25 -0700 Subject: [PATCH] Don't include WebKit implementation when not building UI bits --- Sparkle/SULegacyWebView.h | 4 ++++ Sparkle/SULegacyWebView.m | 4 ++++ Sparkle/SUWKWebView.h | 4 ++++ Sparkle/SUWKWebView.m | 4 ++++ Sparkle/SUWebView.h | 4 ++++ Sparkle/SUWebViewCommon.h | 4 ++++ Sparkle/SUWebViewCommon.m | 4 ++++ 7 files changed, 28 insertions(+) diff --git a/Sparkle/SULegacyWebView.h b/Sparkle/SULegacyWebView.h index 90ac25ee..2d0d2205 100644 --- a/Sparkle/SULegacyWebView.h +++ b/Sparkle/SULegacyWebView.h @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import #import "SUWebView.h" @@ -18,3 +20,5 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END + +#endif diff --git a/Sparkle/SULegacyWebView.m b/Sparkle/SULegacyWebView.m index bebf9f6f..2b9a2fe9 100644 --- a/Sparkle/SULegacyWebView.m +++ b/Sparkle/SULegacyWebView.m @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import "SULegacyWebView.h" #import "SUWebViewCommon.h" #import "SULog.h" @@ -159,3 +161,5 @@ } @end + +#endif diff --git a/Sparkle/SUWKWebView.h b/Sparkle/SUWKWebView.h index 2dfb4357..fe818c35 100644 --- a/Sparkle/SUWKWebView.h +++ b/Sparkle/SUWKWebView.h @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import #import "SUWebView.h" @@ -18,3 +20,5 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END + +#endif diff --git a/Sparkle/SUWKWebView.m b/Sparkle/SUWKWebView.m index 8e018d49..15e6fb86 100644 --- a/Sparkle/SUWKWebView.m +++ b/Sparkle/SUWKWebView.m @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import "SUWKWebView.h" #import "SUWebViewCommon.h" #import "SULog.h" @@ -203,3 +205,5 @@ static WKUserScript *_userScriptWithInjectedStyleSource(NSString *styleSource) } @end + +#endif diff --git a/Sparkle/SUWebView.h b/Sparkle/SUWebView.h index 253536ed..a86b4274 100644 --- a/Sparkle/SUWebView.h +++ b/Sparkle/SUWebView.h @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import @class NSView; @@ -27,3 +29,5 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END + +#endif diff --git a/Sparkle/SUWebViewCommon.h b/Sparkle/SUWebViewCommon.h index 0f2e44e0..3755b8b3 100644 --- a/Sparkle/SUWebViewCommon.h +++ b/Sparkle/SUWebViewCommon.h @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import NS_ASSUME_NONNULL_BEGIN @@ -13,3 +15,5 @@ NS_ASSUME_NONNULL_BEGIN BOOL SUWebViewIsSafeURL(NSURL *url, BOOL *isAboutBlankURL); NS_ASSUME_NONNULL_END + +#endif diff --git a/Sparkle/SUWebViewCommon.m b/Sparkle/SUWebViewCommon.m index ff937db8..1d7defba 100644 --- a/Sparkle/SUWebViewCommon.m +++ b/Sparkle/SUWebViewCommon.m @@ -6,6 +6,8 @@ // Copyright © 2020 Sparkle Project. All rights reserved. // +#if SPARKLE_BUILD_UI_BITS + #import "SUWebViewCommon.h" @@ -21,3 +23,5 @@ BOOL SUWebViewIsSafeURL(NSURL *url, BOOL *isAboutBlankURL) return whitelistedSafe; } + +#endif