summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp')
-rw-r--r--SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp b/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp
index 90c27bd..4f591f5 100644
--- a/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp
+++ b/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp
@@ -1,19 +1,27 @@
#include "SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.h"
+#include <cassert>
+
#ifdef HAVE_SPARKLE
#include "SwifTools/AutoUpdater/SparkleAutoUpdater.h"
-#else
-#include "SwifTools/AutoUpdater/DummyAutoUpdater.h"
#endif
namespace Swift {
+bool PlatformAutoUpdaterFactory::isSupported() const {
+#ifdef HAVE_SPARKLE
+ return true;
+#else
+ return false;
+#endif
+}
+
AutoUpdater* PlatformAutoUpdaterFactory::createAutoUpdater(const String& appcastURL) {
#ifdef HAVE_SPARKLE
return new SparkleAutoUpdater(appcastURL);
#else
(void) appcastURL;
- return new DummyAutoUpdater();
+ return NULL;
#endif
}