summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-27 23:37:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-27 23:37:37 (GMT)
commit91570ab79252b37afeae3b230cb6023c5b52547a (patch)
tree011d77857557a28671a63a444dcf8e10db64ab3f /SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp
parentba717874781a33ea40a1aea1ad8b9efce3580fc2 (diff)
downloadswift-91570ab79252b37afeae3b230cb6023c5b52547a.zip
swift-91570ab79252b37afeae3b230cb6023c5b52547a.tar.bz2
Integrated Sparkle auto-updater.
Diffstat (limited to 'SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp')
-rw-r--r--SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp b/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp
new file mode 100644
index 0000000..2049a4e
--- /dev/null
+++ b/SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp
@@ -0,0 +1,19 @@
+#include "SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.h"
+
+#ifdef HAVE_SPARKLE
+#include "SwifTools/AutoUpdater/SparkleAutoUpdater.h"
+#else
+#include "SwifTools/AutoUpdater/DummyAutoUpdater.h"
+#endif
+
+namespace Swift {
+
+AutoUpdater* PlatformAutoUpdaterFactory::createAutoUpdater(const String& appcastURL) {
+#ifdef HAVE_SPARKLE
+ return new SparkleAutoUpdater(appcastURL);
+#else
+ return new DummyAutoUpdater();
+#endif
+}
+
+}