MACOSX/UPDATES: Streamline UpdateManager
Moved UpdateManager related code from backends/modular-backend.* to common/system.*. Added switch --enable/disable-updates to be able to disable updates support generally.
This commit is contained in:
parent
828f1884b4
commit
f60d6f7a97
6 changed files with 65 additions and 11 deletions
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include "backends/graphics/graphics.h"
|
#include "backends/graphics/graphics.h"
|
||||||
#include "backends/mutex/mutex.h"
|
#include "backends/mutex/mutex.h"
|
||||||
#include "common/updates.h"
|
|
||||||
|
|
||||||
#include "audio/mixer.h"
|
#include "audio/mixer.h"
|
||||||
#include "graphics/pixelformat.h"
|
#include "graphics/pixelformat.h"
|
||||||
|
@ -35,8 +34,7 @@ ModularBackend::ModularBackend()
|
||||||
:
|
:
|
||||||
_mutexManager(0),
|
_mutexManager(0),
|
||||||
_graphicsManager(0),
|
_graphicsManager(0),
|
||||||
_mixer(0),
|
_mixer(0) {
|
||||||
_updateManager(0) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +43,6 @@ ModularBackend::~ModularBackend() {
|
||||||
_graphicsManager = 0;
|
_graphicsManager = 0;
|
||||||
delete _mixer;
|
delete _mixer;
|
||||||
_mixer = 0;
|
_mixer = 0;
|
||||||
delete _updateManager;
|
|
||||||
_updateManager = 0;
|
|
||||||
delete _mutexManager;
|
delete _mutexManager;
|
||||||
_mutexManager = 0;
|
_mutexManager = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#define BACKENDS_MODULAR_BACKEND_H
|
#define BACKENDS_MODULAR_BACKEND_H
|
||||||
|
|
||||||
#include "backends/base-backend.h"
|
#include "backends/base-backend.h"
|
||||||
#include "common/updates.h"
|
|
||||||
|
|
||||||
class GraphicsManager;
|
class GraphicsManager;
|
||||||
class MutexManager;
|
class MutexManager;
|
||||||
|
@ -142,10 +141,9 @@ protected:
|
||||||
/** @name Managers variables */
|
/** @name Managers variables */
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
MutexManager *_mutexManager;
|
MutexManager *_mutexManager;
|
||||||
GraphicsManager *_graphicsManager;
|
GraphicsManager *_graphicsManager;
|
||||||
Audio::Mixer *_mixer;
|
Audio::Mixer *_mixer;
|
||||||
Common::UpdateManager *_updateManager;
|
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "common/savefile.h"
|
#include "common/savefile.h"
|
||||||
#include "common/str.h"
|
#include "common/str.h"
|
||||||
#include "common/taskbar.h"
|
#include "common/taskbar.h"
|
||||||
|
#include "common/updates.h"
|
||||||
#include "common/textconsole.h"
|
#include "common/textconsole.h"
|
||||||
|
|
||||||
#include "backends/audiocd/default/default-audiocd.h"
|
#include "backends/audiocd/default/default-audiocd.h"
|
||||||
|
@ -43,6 +44,9 @@ OSystem::OSystem() {
|
||||||
_savefileManager = 0;
|
_savefileManager = 0;
|
||||||
#if defined(USE_TASKBAR)
|
#if defined(USE_TASKBAR)
|
||||||
_taskbarManager = 0;
|
_taskbarManager = 0;
|
||||||
|
#endif
|
||||||
|
#if defined(USE_UPDATES)
|
||||||
|
_updateManager = 0;
|
||||||
#endif
|
#endif
|
||||||
_fsFactory = 0;
|
_fsFactory = 0;
|
||||||
}
|
}
|
||||||
|
@ -62,6 +66,11 @@ OSystem::~OSystem() {
|
||||||
_taskbarManager = 0;
|
_taskbarManager = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_UPDATES)
|
||||||
|
delete _updateManager;
|
||||||
|
_updateManager = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
delete _savefileManager;
|
delete _savefileManager;
|
||||||
_savefileManager = 0;
|
_savefileManager = 0;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,9 @@ class String;
|
||||||
#if defined(USE_TASKBAR)
|
#if defined(USE_TASKBAR)
|
||||||
class TaskbarManager;
|
class TaskbarManager;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(USE_UPDATES)
|
||||||
|
class UpdateManager;
|
||||||
|
#endif
|
||||||
class TimerManager;
|
class TimerManager;
|
||||||
class SeekableReadStream;
|
class SeekableReadStream;
|
||||||
class WriteStream;
|
class WriteStream;
|
||||||
|
@ -161,6 +164,15 @@ protected:
|
||||||
Common::TaskbarManager *_taskbarManager;
|
Common::TaskbarManager *_taskbarManager;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_UPDATES)
|
||||||
|
/**
|
||||||
|
* No default value is provided for _updateManager by OSystem.
|
||||||
|
*
|
||||||
|
* @note _updateManager is deleted by the OSystem destructor.
|
||||||
|
*/
|
||||||
|
Common::UpdateManager *_updateManager;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No default value is provided for _fsFactory by OSystem.
|
* No default value is provided for _fsFactory by OSystem.
|
||||||
*
|
*
|
||||||
|
@ -1071,6 +1083,18 @@ public:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_UPDATES)
|
||||||
|
/**
|
||||||
|
* Returns the UpdateManager, used to handle auto-updating,
|
||||||
|
* and updating of ScummVM in general.
|
||||||
|
*
|
||||||
|
* @return the UpdateManager for the current architecture
|
||||||
|
*/
|
||||||
|
virtual Common::UpdateManager *getUpdateManager() {
|
||||||
|
return _updateManager;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the FilesystemFactory object, depending on the current architecture.
|
* Returns the FilesystemFactory object, depending on the current architecture.
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,6 +23,8 @@
|
||||||
#ifndef BACKENDS_UPDATES_ABSTRACT_H
|
#ifndef BACKENDS_UPDATES_ABSTRACT_H
|
||||||
#define BACKENDS_UPDATES_ABSTRACT_H
|
#define BACKENDS_UPDATES_ABSTRACT_H
|
||||||
|
|
||||||
|
#if defined(USE_UPDATES)
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -95,4 +97,6 @@ public:
|
||||||
|
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // BACKENDS_UPDATES_ABSTRACT_H
|
#endif // BACKENDS_UPDATES_ABSTRACT_H
|
||||||
|
|
25
configure
vendored
25
configure
vendored
|
@ -143,6 +143,7 @@ _opengl=auto
|
||||||
_opengles=auto
|
_opengles=auto
|
||||||
_readline=auto
|
_readline=auto
|
||||||
_taskbar=yes
|
_taskbar=yes
|
||||||
|
_updates=yes
|
||||||
_libunity=auto
|
_libunity=auto
|
||||||
# Default option behaviour yes/no
|
# Default option behaviour yes/no
|
||||||
_debug_build=auto
|
_debug_build=auto
|
||||||
|
@ -773,6 +774,7 @@ Optional Features:
|
||||||
--disable-hq-scalers exclude HQ2x and HQ3x scalers
|
--disable-hq-scalers exclude HQ2x and HQ3x scalers
|
||||||
--disable-translation don't build support for translated messages
|
--disable-translation don't build support for translated messages
|
||||||
--disable-taskbar don't build support for taskbar and launcher integration
|
--disable-taskbar don't build support for taskbar and launcher integration
|
||||||
|
--disable-updates don't build support for updates
|
||||||
--enable-text-console use text console instead of graphical console
|
--enable-text-console use text console instead of graphical console
|
||||||
--enable-verbose-build enable regular echoing of commands during build
|
--enable-verbose-build enable regular echoing of commands during build
|
||||||
process
|
process
|
||||||
|
@ -880,6 +882,8 @@ for ac_option in $@; do
|
||||||
--disable-readline) _readline=no ;;
|
--disable-readline) _readline=no ;;
|
||||||
--enable-taskbar) _taskbar=yes ;;
|
--enable-taskbar) _taskbar=yes ;;
|
||||||
--disable-taskbar) _taskbar=no ;;
|
--disable-taskbar) _taskbar=no ;;
|
||||||
|
--enable-updates) _updates=yes ;;
|
||||||
|
--disable-updates) _updates=no ;;
|
||||||
--enable-libunity) _libunity=yes ;;
|
--enable-libunity) _libunity=yes ;;
|
||||||
--disable-libunity) _libunity=no ;;
|
--disable-libunity) _libunity=no ;;
|
||||||
--enable-opengl) _opengl=yes ;;
|
--enable-opengl) _opengl=yes ;;
|
||||||
|
@ -2982,9 +2986,12 @@ if test `get_engine_build sword25` = yes && test ! "$_zlib" = yes ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for Sparkle
|
# Check for Sparkle if updates support is enabled
|
||||||
#
|
#
|
||||||
echocheck "Sparkle"
|
echocheck "Sparkle"
|
||||||
|
if test "$_updates" = no; then
|
||||||
|
_sparkle=no
|
||||||
|
else
|
||||||
if test "$_sparkle" = auto ; then
|
if test "$_sparkle" = auto ; then
|
||||||
_sparkle=no
|
_sparkle=no
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
|
@ -2999,6 +3006,7 @@ if test "$_sparkle" = yes ; then
|
||||||
INCLUDES="$INCLUDES $SPARKLE_CFLAGS"
|
INCLUDES="$INCLUDES $SPARKLE_CFLAGS"
|
||||||
fi
|
fi
|
||||||
define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
|
define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
|
||||||
|
fi
|
||||||
echo "$_sparkle"
|
echo "$_sparkle"
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -3307,6 +3315,21 @@ echo_n "Building Bink video support... "
|
||||||
define_in_config_if_yes $_bink 'USE_BINK'
|
define_in_config_if_yes $_bink 'USE_BINK'
|
||||||
echo "$_bink"
|
echo "$_bink"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check whether to build updates support
|
||||||
|
#
|
||||||
|
echo_n "Building updates support... "
|
||||||
|
define_in_config_if_yes $_updates 'USE_UPDATES'
|
||||||
|
if test "$_updates" = yes; then
|
||||||
|
if test "$_sparkle" = yes; then
|
||||||
|
echo "Sparkle"
|
||||||
|
else
|
||||||
|
echo "$_updates"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$_updates"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Figure out installation directories
|
# Figure out installation directories
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue