зеркало из https://github.com/nextcloud/desktop.git
Do not compile things that require the app bundle when building the client without the app bundle on macOS
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
This commit is contained in:
Родитель
5c326c2caa
Коммит
9dd9c46493
|
@ -105,6 +105,7 @@ if(APPLE AND BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_NAME}.app")
|
set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_NAME}.app")
|
||||||
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||||
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||||
|
add_definitions(-DBUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ Systray::Systray()
|
||||||
|
|
||||||
qmlRegisterType<WheelHandler>("com.nextcloud.desktopclient", 1, 0, "WheelHandler");
|
qmlRegisterType<WheelHandler>("com.nextcloud.desktopclient", 1, 0, "WheelHandler");
|
||||||
|
|
||||||
#ifdef Q_OS_MACOS
|
#if defined(Q_OS_MACOS) && defined(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
setUserNotificationCenterDelegate();
|
setUserNotificationCenterDelegate();
|
||||||
checkNotificationAuth(MacNotificationAuthorizationOptions::Default); // No provisional auth, ask user explicitly first time
|
checkNotificationAuth(MacNotificationAuthorizationOptions::Default); // No provisional auth, ask user explicitly first time
|
||||||
registerNotificationCategories(QString(tr("Download")));
|
registerNotificationCategories(QString(tr("Download")));
|
||||||
|
@ -307,7 +307,7 @@ void Systray::showMessage(const QString &title, const QString &message, MessageI
|
||||||
QDBusConnection::sessionBus().asyncCall(method);
|
QDBusConnection::sessionBus().asyncCall(method);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_OSX
|
#if defined(Q_OS_MACOS) && defined(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
if (canOsXSendUserNotification()) {
|
if (canOsXSendUserNotification()) {
|
||||||
sendOsXUserNotification(title, message);
|
sendOsXUserNotification(title, message);
|
||||||
} else
|
} else
|
||||||
|
@ -319,7 +319,7 @@ void Systray::showMessage(const QString &title, const QString &message, MessageI
|
||||||
|
|
||||||
void Systray::showUpdateMessage(const QString &title, const QString &message, const QUrl &webUrl)
|
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);
|
sendOsXUpdateNotification(title, message, webUrl);
|
||||||
#else // TODO: Implement custom notifications (i.e. actionable) for other OSes
|
#else // TODO: Implement custom notifications (i.e. actionable) for other OSes
|
||||||
Q_UNUSED(webUrl);
|
Q_UNUSED(webUrl);
|
||||||
|
|
|
@ -141,7 +141,7 @@ Updater *Updater::create()
|
||||||
return nullptr;
|
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);
|
return new SparkleUpdater(url);
|
||||||
#elif defined(Q_OS_WIN32)
|
#elif defined(Q_OS_WIN32)
|
||||||
// Also for MSI
|
// Also for MSI
|
||||||
|
|
Загрузка…
Ссылка в новой задаче