mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-10 03:44:16 +00:00
Add ENABLE_UPDATER flag to disable the automatic updater.
This commit is contained in:
parent
cf9a296e5d
commit
d22d46fd2b
@ -26,8 +26,10 @@ set(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}" CACHE INTERNAL "internal")
|
||||
project(aseprite C CXX)
|
||||
|
||||
######################################################################
|
||||
# Options (these can be specified in cmake command line or modifying CMakeCache.txt)
|
||||
# Options (these can be specified in cmake command line or modifying
|
||||
# CMakeCache.txt)
|
||||
|
||||
option(ENABLE_UPDATER "Enable automatic check for updates" on)
|
||||
option(USE_STATIC_LIBC "Use static version of C and C++ runtimes" off)
|
||||
option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off)
|
||||
option(USE_SHARED_ZLIB "Use your installed copy of zlib" off)
|
||||
|
@ -9,7 +9,7 @@ if(MSVC)
|
||||
endif(MSVC)
|
||||
|
||||
# Third-party libraries
|
||||
set(libs3rdparty libcurl freetype libart_lgpl loadpng tinyxml giflib)
|
||||
set(libs3rdparty freetype libart_lgpl loadpng tinyxml giflib)
|
||||
|
||||
if(USE_SHARED_JPEGLIB)
|
||||
find_package(JPEG)
|
||||
@ -50,9 +50,18 @@ if (CMAKE_USE_PTHREADS_INIT)
|
||||
set(sys_libs ${sys_libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
# Libraries in this directory
|
||||
set(aseprite_libraries aseprite-library undo-lib filters-lib gui-lib
|
||||
gfx-lib net-lib base-lib)
|
||||
|
||||
if(ENABLE_UPDATER)
|
||||
set(libs3rdparty ${libs3rdparty} libcurl)
|
||||
set(aseprite_libraries ${aseprite_libraries} updater-lib)
|
||||
add_definitions(-DENABLE_UPDATER)
|
||||
endif()
|
||||
|
||||
# All libraries for .exe files
|
||||
set(all_libs aseprite-library undo-lib updater-lib filters-lib gui-lib gfx-lib net-lib base-lib
|
||||
${libs3rdparty} allegro ${sys_libs})
|
||||
set(all_libs ${aseprite_libraries} ${libs3rdparty} allegro ${sys_libs})
|
||||
|
||||
# Directories where .h files can be found
|
||||
include_directories(
|
||||
@ -76,7 +85,9 @@ add_subdirectory(gfx)
|
||||
add_subdirectory(gui)
|
||||
add_subdirectory(net)
|
||||
add_subdirectory(undo)
|
||||
add_subdirectory(updater)
|
||||
if(ENABLE_UPDATER)
|
||||
add_subdirectory(updater)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# aseprite library
|
||||
|
@ -162,7 +162,9 @@ App::App(int argc, char* argv[])
|
||||
|
||||
int App::run()
|
||||
{
|
||||
#ifdef ENABLE_UPDATER
|
||||
app::CheckUpdateThreadLauncher checkUpdate;
|
||||
#endif
|
||||
|
||||
// Initialize GUI interface
|
||||
if (isGui()) {
|
||||
@ -287,8 +289,10 @@ int App::run()
|
||||
// Support to drop files from Windows explorer
|
||||
install_drop_files();
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
// Launch the thread to check for updates.
|
||||
checkUpdate.launch();
|
||||
#endif
|
||||
|
||||
// Run the GUI main message loop
|
||||
gui_run();
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
|
||||
#include "app/check_update.h"
|
||||
|
||||
#include "app.h"
|
||||
@ -182,3 +184,5 @@ void CheckUpdateThreadLauncher::checkForUpdates()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // ENABLE_UPDATER
|
||||
|
@ -19,6 +19,8 @@
|
||||
#ifndef APP_CHECK_UPDATE_H_INCLUDED
|
||||
#define APP_CHECK_UPDATE_H_INCLUDED
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
|
||||
#include "base/thread.h"
|
||||
#include "base/unique_ptr.h"
|
||||
#include "updater/check_update.h"
|
||||
@ -64,5 +66,6 @@ namespace app {
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // ENABLE_UPDATER
|
||||
|
||||
#endif // APP_CHECK_UPDATE_H_INCLUDED
|
||||
|
4
third_party/CMakeLists.txt
vendored
4
third_party/CMakeLists.txt
vendored
@ -21,7 +21,9 @@ if(NOT USE_SHARED_LIBPNG)
|
||||
add_subdirectory(libpng)
|
||||
endif()
|
||||
|
||||
add_subdirectory(curl)
|
||||
if(ENABLE_UPDATER)
|
||||
add_subdirectory(curl)
|
||||
endif()
|
||||
add_subdirectory(giflib)
|
||||
add_subdirectory(gtest)
|
||||
add_subdirectory(freetype)
|
||||
|
Loading…
x
Reference in New Issue
Block a user