summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-11-17 11:07:38 (GMT)
committerTobias Markmann <tm@ayena.de>2016-11-17 14:13:56 (GMT)
commitdd6f025037faa6b946d71bbd21c729a931178176 (patch)
tree1dfc992571d6361b4b1641dbd16bd9159934660d /SwifTools
parent8743d5714244a63d301d73fca622f648ac374771 (diff)
downloadswift-dd6f025037faa6b946d71bbd21c729a931178176.zip
swift-dd6f025037faa6b946d71bbd21c729a931178176.tar.bz2
Fix version strings generated by GenerateAppCastFeeds.py
Check for updates on start. Test-Information: Manually verified a random sample of 50 Swift version string pairs, that Sparkle currently compares them and detects the new version. Change-Id: Ic88a5fdc5feab42cdcb4cc3c2740d4c24718eb7b
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/AutoUpdater/SparkleAutoUpdater.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
index ed5f094..0c296ee 100644
--- a/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
+++ b/SwifTools/AutoUpdater/SparkleAutoUpdater.mm
@@ -24,39 +24,39 @@ class SparkleAutoUpdater::Private {
SparkleAutoUpdater::SparkleAutoUpdater(const std::string& appcastFeed) : d(new Private()) {
d->updater = [SUUpdater sharedUpdater];
[d->updater retain];
d->delegate = boost::intrusive_ptr<SparkleAutoUpdaterDelegate>([[SparkleAutoUpdaterDelegate alloc] init], false);
[d->delegate.get() setUpdateDownloadFinished: [&](){
d->restartToUpdate = true;
onSuggestRestartToUserToUpdate();
}];
[d->updater setDelegate: d->delegate.get()];
[d->updater setAutomaticallyChecksForUpdates: true];
// Automatically check for an update after a day.
[d->updater setUpdateCheckInterval: 86400];
[d->updater setAutomaticallyDownloadsUpdates: true];
NSURL* nsurl = [NSURL URLWithString: std2NSString(appcastFeed)];
[d->updater setFeedURL: nsurl];
}
SparkleAutoUpdater::~SparkleAutoUpdater() {
[d->updater release];
}
void SparkleAutoUpdater::setAppcastFeed(const std::string& appcastFeed) {
NSURL* nsurl = [NSURL URLWithString: std2NSString(appcastFeed)];
[d->updater setFeedURL: nsurl];
}
void SparkleAutoUpdater::checkForUpdates() {
- //[d->updater resetUpdateCycle]; // This is useful for testing to force a check ot start.
+ [d->updater resetUpdateCycle];
[d->updater checkForUpdatesInBackground];
}
bool SparkleAutoUpdater::recommendRestartToUpdate() {
return d->restartToUpdate;
}
}