Fixing compilation portability
+ wscript: now code compiles with apple gcc, clang, and macport's gcc (though not working, but for unrelated reason)
+ adhoc: make it compilable with apple's gcc compiler and replace usage of the deprecated method
+ gui: adding necessary ifdef statement to not add menu item when Sparkle is not available
+ auto-update: with apple's gcc, Sparkle requires additional header include (AppKit)
Change-Id: Ie6137898c3a0ffad5f857bbd4c949c0efbbc89bc
diff --git a/osx/auto-update/sparkle-auto-update.mm b/osx/auto-update/sparkle-auto-update.mm
index 1474775..dda0e79 100644
--- a/osx/auto-update/sparkle-auto-update.mm
+++ b/osx/auto-update/sparkle-auto-update.mm
@@ -21,13 +21,17 @@
#include "sparkle-auto-update.h"
#import <Foundation/Foundation.h>
+#import <AppKit/AppKit.h>
#import <Sparkle/Sparkle.h>
-#include <stdio.h>
+
+#include "logging.h"
+
+INIT_LOGGER ("SparkeAutoUpdate");
class SparkleAutoUpdate::Private
{
- public:
- SUUpdater *updater;
+public:
+ SUUpdater *updater;
};
SparkleAutoUpdate::SparkleAutoUpdate(const QString &updateUrl)
@@ -51,5 +55,5 @@
{
//[d->updater checkForUpdatesInBackground];
[d->updater checkForUpdates : nil];
- printf("++++++++ checking update ++++++\n");
+ _LOG_DEBUG ("++++++++ checking update +++++");
}