diff options
Diffstat (limited to 'SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp')
-rw-r--r-- | SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.cpp | 19 |
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 +} + +} |