From 58fd57fdcd7b69ccd44dd05f997bad8d3eef7746 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Tue, 28 Jan 2014 13:33:33 +0100 Subject: [PATCH] Make update URL a compile time option --- OWNCLOUD.cmake | 2 ++ config.h.in | 1 + src/mirall/updater.cpp | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OWNCLOUD.cmake b/OWNCLOUD.cmake index d0beb9c16..666895143 100644 --- a/OWNCLOUD.cmake +++ b/OWNCLOUD.cmake @@ -3,6 +3,8 @@ set( APPLICATION_NAME "ownCloud" ) set( APPLICATION_EXECUTABLE "owncloud" ) set( APPLICATION_DOMAIN "owncloud.com" ) set( APPLICATION_VENDOR "ownCloud, Inc" ) +set( APPLICATION_UPDATE_URL "https://updates.owncloud.com/client/" ) + set( THEME_CLASS "ownCloudTheme" ) set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" ) set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" ) diff --git a/config.h.in b/config.h.in index e66fa9b1b..1f2bcbe41 100644 --- a/config.h.in +++ b/config.h.in @@ -12,6 +12,7 @@ #cmakedefine APPLICATION_NAME "@APPLICATION_NAME@" #cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@" #cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@" +#cmakedefine APPLICATION_UPDATE_URL "@APPLICATION_UPDATE_URL@" #cmakedefine SYSCONFDIR "@SYSCONFDIR@" #cmakedefine DATADIR "@DATADIR@" diff --git a/src/mirall/updater.cpp b/src/mirall/updater.cpp index dc74c2571..296ce3354 100644 --- a/src/mirall/updater.cpp +++ b/src/mirall/updater.cpp @@ -15,6 +15,8 @@ #include "mirall/sparkleupdater.h" #include "mirall/ocupdater.h" +#include "config.h" + namespace Mirall { Updater *Updater::_instance = 0; @@ -29,7 +31,7 @@ Updater * Updater::instance() Updater *Updater::create() { - QString updateBaseUrl(QLatin1String("http://update.thinkpad/")); + QString updateBaseUrl(QLatin1String(APPLICATION_UPDATE_URL)); #ifdef Q_OS_MAC return new SparkleUpdater(updateBaseUrl+QLatin1String("/rss/"); #elif defined (Q_OS_WIN32)