From b34708da29992b0daa9f373f3b2fd78af980fa5f Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 31 Jan 2019 11:03:51 +0100 Subject: [PATCH] Move help URL also to CMAKE Signed-off-by: Roeland Jago Douma --- NEXTCLOUD.cmake | 2 ++ config.h.in | 1 + src/libsync/theme.cpp | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/NEXTCLOUD.cmake b/NEXTCLOUD.cmake index 011c41d10..80e48b533 100644 --- a/NEXTCLOUD.cmake +++ b/NEXTCLOUD.cmake @@ -4,6 +4,7 @@ set( APPLICATION_EXECUTABLE "nextcloud" ) set( APPLICATION_DOMAIN "nextcloud.com" ) set( APPLICATION_VENDOR "Nextcloud GmbH" ) set( APPLICATION_UPDATE_URL "https://updates.nextcloud.org/client/" CACHE string "URL for updater" ) +set( APPLICATION_HELP_URL "" CACHE string "URL for the help menu" ) set( APPLICATION_ICON_NAME "Nextcloud" ) set( LINUX_PACKAGE_SHORTNAME "nextcloud" ) @@ -28,3 +29,4 @@ option( WITH_PROVIDERS "Build with providers list" ON ) set( APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "#0082c9" CACHE string "Hex color of the wizard header background") set( APPLICATION_WIZARD_HEADER_TITLE_COLOR "#ffffff" CACHE string "Hex color of the text in the wizard header") option( APPLICATION_WIZARD_USE_CUSTOM_LOGO "Use the logo from ':/client/theme/colored/wizard_logo.png' else the default application icon is used" ON ) + diff --git a/config.h.in b/config.h.in index 1223b0cfc..55c5f619a 100644 --- a/config.h.in +++ b/config.h.in @@ -18,6 +18,7 @@ #cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@" #cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@" #cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@" +#cmakedefine APPLICATION_HELP_URL "@APPLICATION_HELP_URL@" #cmakedefine APPLICATION_ICON_NAME "@APPLICATION_ICON_NAME@" #cmakedefine APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "@APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR@" #cmakedefine APPLICATION_WIZARD_HEADER_TITLE_COLOR "@APPLICATION_WIZARD_HEADER_TITLE_COLOR@" diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp index c049f7d7f..4f306c38f 100644 --- a/src/libsync/theme.cpp +++ b/src/libsync/theme.cpp @@ -225,7 +225,11 @@ QString Theme::defaultServerFolder() const QString Theme::helpUrl() const { +#ifdef APPLICATION_HELP_URL + return QString::fromLatin1(APPLICATION_HELP_URL); +#else return QString::fromLatin1("https://docs.nextcloud.com/desktop/%1.%2/").arg(MIRALL_VERSION_MAJOR).arg(MIRALL_VERSION_MINOR); +#endif } QString Theme::conflictHelpUrl() const