From 51bfda937d47837ed426150ed6f43a60b4ca0ce1 Mon Sep 17 00:00:00 2001
From: seth <getchoo@tuta.io>
Date: Thu, 27 Jul 2023 00:59:01 -0400
Subject: chore: don't include sparkle when not enabled
Signed-off-by: seth <getchoo@tuta.io>
---
launcher/Application.cpp | 4 ++--
launcher/CMakeLists.txt | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index aeea90f1..27a8756d 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -131,7 +131,7 @@
#include "MangoHud.h"
#endif
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && defined(SPARKLE_ENABLED)
#include "updater/MacSparkleUpdater.h"
#endif
@@ -776,7 +776,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
if(BuildConfig.UPDATER_ENABLED)
{
qDebug() << "Initializing updater";
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && defined(SPARKLE_ENABLED)
m_updater.reset(new MacSparkleUpdater());
#endif
qDebug() << "<> Updater started.";
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index af82464a..74a93909 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -1146,6 +1146,7 @@ if(APPLE)
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/Sparkle.tar.xz DESTINATION ${CMAKE_BINARY_DIR}/frameworks/Sparkle)
find_library(SPARKLE_FRAMEWORK Sparkle "${CMAKE_BINARY_DIR}/frameworks/Sparkle")
+ add_compile_definitions(SPARKLE_ENABLED)
endif()
target_link_libraries(Launcher_logic
--
cgit