mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore: disable broken autoupdater by default
This commit is contained in:
parent
a2feaf3fc6
commit
196529b8e8
|
@ -9,6 +9,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
|||
|
||||
option(PLATFORM_EXTENSIONS "Enable platform specific extensions, requires extra dependencies" ON)
|
||||
option(USE_FILTERAUDIO "Enable the echo canceling backend" ON)
|
||||
# AUTOUPDATE is currently broken and thus disabled
|
||||
option(AUTOUPDATE "Enable the auto updater" OFF)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
@ -270,8 +272,6 @@ set(${PROJECT_NAME}_SOURCES
|
|||
src/model/profile/iprofileinfo.h
|
||||
src/model/profile/profileinfo.cpp
|
||||
src/model/profile/profileinfo.h
|
||||
src/net/autoupdate.cpp
|
||||
src/net/autoupdate.h
|
||||
src/net/avatarbroadcaster.cpp
|
||||
src/net/avatarbroadcaster.h
|
||||
src/net/toxme.cpp
|
||||
|
@ -568,6 +568,14 @@ if(${USE_FILTERAUDIO})
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(${AUTOUPDATE} AND (WIN32 OR APPLE))
|
||||
add_definitions(-DAUTOUPDATE_ENABLED=1)
|
||||
set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
|
||||
src/net/autoupdate.cpp
|
||||
src/net/autoupdate.h)
|
||||
message(STATUS "using autoupdater")
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||
if (CMAKE_BUILD_TYPE_LOWER MATCHES debug)
|
||||
|
|
|
@ -258,7 +258,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
|
||||
// Check whether we have an update waiting to be installed
|
||||
#if AUTOUPDATE_ENABLED
|
||||
#ifdef AUTOUPDATE_ENABLED
|
||||
if (AutoUpdater::isLocalUpdateReady())
|
||||
AutoUpdater::installLocalUpdate(); ///< NORETURN
|
||||
#endif
|
||||
|
|
|
@ -28,14 +28,6 @@
|
|||
#include <functional>
|
||||
#include <sodium.h>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#define AUTOUPDATE_ENABLED 1
|
||||
#elif defined(Q_OS_OSX)
|
||||
#define AUTOUPDATE_ENABLED 1
|
||||
#else
|
||||
#define AUTOUPDATE_ENABLED 0
|
||||
#endif
|
||||
|
||||
class AutoUpdater
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -165,6 +165,7 @@ AboutForm::~AboutForm()
|
|||
*/
|
||||
void AboutForm::showUpdateProgress()
|
||||
{
|
||||
#ifdef AUTOUPDATE_ENABLED
|
||||
QString version = AutoUpdater::getProgressVersion();
|
||||
int value = AutoUpdater::getProgressValue();
|
||||
|
||||
|
@ -182,6 +183,7 @@ void AboutForm::showUpdateProgress()
|
|||
bodyUI->updateProgress->setVisible(value != 0 && value != 100);
|
||||
bodyUI->updateText->setVisible(value != 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AboutForm::hideEvent(QHideEvent*)
|
||||
|
|
|
@ -99,7 +99,11 @@ GeneralForm::GeneralForm(SettingsWidget* myParent)
|
|||
|
||||
Settings& s = Settings::getInstance();
|
||||
|
||||
#ifdef AUTOUPDATE_ENABLED
|
||||
bodyUI->checkUpdates->setVisible(AUTOUPDATE_ENABLED);
|
||||
#else
|
||||
bodyUI->checkUpdates->setVisible(false);
|
||||
#endif
|
||||
bodyUI->checkUpdates->setChecked(s.getCheckUpdates());
|
||||
|
||||
for (int i = 0; i < locales.size(); ++i) {
|
||||
|
|
|
@ -509,7 +509,9 @@ Widget::~Widget()
|
|||
}
|
||||
|
||||
Translator::unregister(this);
|
||||
#ifdef AUTOUPDATE_ENABLED
|
||||
AutoUpdater::abortUpdates();
|
||||
#endif
|
||||
if (icon) {
|
||||
icon->hide();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user