diff --git a/CMakeLists.txt b/CMakeLists.txt index 842c96c39..f885da34b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,13 +68,17 @@ else() endif() set(AUTO_DEPENDENCIES_DEFAULT OFF) +set(AUTOUPDATE_DEFAULT OFF) if(TARGET_OS STREQUAL "windows") set(AUTO_DEPENDENCIES_DEFAULT ON) + set(AUTOUPDATE_DEFAULT ON) +elseif(TARGET_OS STREQUAL "linux") + set(AUTOUPDATE_DEFAULT ON) endif() option(WEBSOCKETS "Enable websockets support" OFF) option(MYSQL "Enable mysql support" OFF) -option(AUTOUPDATE "Enable the autoupdater" ON) +option(AUTOUPDATE "Enable the autoupdater" ${AUTOUPDATE_DEFAULT}) option(CLIENT "Compile client" ON) option(DOWNLOAD_GTEST "Download and compile GTest" ${AUTO_DEPENDENCIES_DEFAULT}) option(PREFER_BUNDLED_LIBS "Prefer bundled libraries over system libraries" ${AUTO_DEPENDENCIES_DEFAULT}) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 333cf302d..a3bd8df0a 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2617,7 +2617,7 @@ void CClient::RegisterInterfaces() Kernel()->RegisterInterface(static_cast(&m_GhostRecorder), false); Kernel()->RegisterInterface(static_cast(&m_GhostLoader), false); Kernel()->RegisterInterface(static_cast(&m_ServerBrowser), false); -#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__) +#if defined(CONF_AUTOUPDATE) Kernel()->RegisterInterface(static_cast(&m_Updater), false); #endif Kernel()->RegisterInterface(static_cast(&m_Friends), false); @@ -2635,7 +2635,7 @@ void CClient::InitInterfaces() m_pInput = Kernel()->RequestInterface(); m_pMap = Kernel()->RequestInterface(); m_pMasterServer = Kernel()->RequestInterface(); -#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__) +#if defined(CONF_AUTOUPDATE) m_pUpdater = Kernel()->RequestInterface(); #endif m_pStorage = Kernel()->RequestInterface(); @@ -2646,7 +2646,7 @@ void CClient::InitInterfaces() HttpInit(m_pStorage); -#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__) +#if defined(CONF_AUTOUPDATE) m_Updater.Init(); #endif @@ -2832,7 +2832,7 @@ void CClient::Run() // update input if(Input()->Update()) break; // SDL_QUIT -#if defined(CONF_AUTOUPDATE) && !defined(CONF_PLATFORM_MACOSX) && !defined(__ANDROID__) +#if defined(CONF_AUTOUPDATE) Updater()->Update(); #endif