Allow to specifiy server url via CMAKE
authorRoeland Jago Douma <roeland@famdouma.nl>
Thu, 31 Jan 2019 10:10:47 +0000 (11:10 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 31 Jan 2019 10:28:46 +0000 (11:28 +0100)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
NEXTCLOUD.cmake
config.h.in
src/libsync/theme.cpp

index 80e48b533916fb4f749d84efe5847503d6b05785..7cc321c140fe8d2fae45967710554798d2c4c2a3 100644 (file)
@@ -6,6 +6,7 @@ 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( APPLICATION_SERVER_URL "" CACHE string "URL for the server to use. If entered the server can only connect to this instance" )
 
 set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
 
index 55c5f619a3486b0c2ef0e41d9f8f7c40551e86c6..3805dc2353e6e304fce9552e880a759fc81bb456 100644 (file)
@@ -20,6 +20,7 @@
 #cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@"
 #cmakedefine APPLICATION_HELP_URL "@APPLICATION_HELP_URL@"
 #cmakedefine APPLICATION_ICON_NAME "@APPLICATION_ICON_NAME@"
+#cmakedefine APPLICATION_SERVER_URL "@APPLICATION_SERVER_URL@"
 #cmakedefine APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "@APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR@"
 #cmakedefine APPLICATION_WIZARD_HEADER_TITLE_COLOR "@APPLICATION_WIZARD_HEADER_TITLE_COLOR@"
 #cmakedefine APPLICATION_WIZARD_USE_CUSTOM_LOGO "@APPLICATION_WIZARD_USE_CUSTOM_LOGO@"
index 4f306c38fa9e434ec948b00fc7f179609471cf19..f68b61e2ea2027602419b8573e642a4d6844d0fd 100644 (file)
@@ -244,7 +244,11 @@ QString Theme::conflictHelpUrl() const
 
 QString Theme::overrideServerUrl() const
 {
+#ifdef APPLICATION_SERVER_URL
+    return QString::fromLatin1(APPLICATION_SERVER_URL);
+#else
     return QString();
+#endif
 }
 
 QString Theme::forceConfigAuthType() const