half baked auto update (won't affect compile anyway)
update wscript, fix typos in c and mm files
Change-Id: I5eab74662c53d39cd91d621b20c0506da019c09b
diff --git a/osx/auto-update/sparkle-auto-update.mm b/osx/auto-update/sparkle-auto-update.mm
new file mode 100644
index 0000000..be49b55
--- /dev/null
+++ b/osx/auto-update/sparkle-auto-update.mm
@@ -0,0 +1,28 @@
+#include "sparkle-auto-update.h"
+#import <Sparkle/Sparkle.h>
+
+class SparkleAutoUpdate::Private
+{
+ public:
+ SUUpdater *updater;
+};
+
+SparkleAutoUpdate::SparkleAutoUpdate(const QString &updateUrl)
+{
+ d = new Private;
+ d->updater = [SUUpdater sharedUpdater];
+ [d->updater setAutomaticallyChecksForUpdates:YES];
+ NSURL *url = [NSURL URLWithString: [NSString stringWithUTF8String: updateUrl.toUtf8().data()]];
+ [d->updater setFeedURL: url];
+}
+
+SparkleAutoUpdate::~SparkleAutoUpdate()
+{
+ delete d;
+ // presummably SUUpdater handles garbage collection
+}
+
+void SparkleAutoUpdate::checkForUpdates()
+{
+ [d->updater checkForUpdatesInBackground];
+}