set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_NAME}.app")
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
+ add_definitions(-DBUILD_OWNCLOUD_OSX_BUNDLE)
endif()
qmlRegisterType<WheelHandler>("com.nextcloud.desktopclient", 1, 0, "WheelHandler");
-#ifdef Q_OS_MACOS
+#if defined(Q_OS_MACOS) && defined(BUILD_OWNCLOUD_OSX_BUNDLE)
setUserNotificationCenterDelegate();
checkNotificationAuth(MacNotificationAuthorizationOptions::Default); // No provisional auth, ask user explicitly first time
registerNotificationCategories(QString(tr("Download")));
QDBusConnection::sessionBus().asyncCall(method);
} else
#endif
-#ifdef Q_OS_OSX
+#if defined(Q_OS_MACOS) && defined(BUILD_OWNCLOUD_OSX_BUNDLE)
if (canOsXSendUserNotification()) {
sendOsXUserNotification(title, message);
} else
void Systray::showUpdateMessage(const QString &title, const QString &message, const QUrl &webUrl)
{
-#ifdef Q_OS_MACOS
+#if defined(Q_OS_MACOS) && defined(BUILD_OWNCLOUD_OSX_BUNDLE)
sendOsXUpdateNotification(title, message, webUrl);
#else // TODO: Implement custom notifications (i.e. actionable) for other OSes
Q_UNUSED(webUrl);
return nullptr;
}
-#if defined(Q_OS_MAC) && defined(HAVE_SPARKLE)
+#if defined(Q_OS_MACOS) && defined(HAVE_SPARKLE) && defined(BUILD_OWNCLOUD_OSX_BUNDLE)
return new SparkleUpdater(url);
#elif defined(Q_OS_WIN32)
// Also for MSI