BACKENDS: Add use flag for taskbar integration

This commit is contained in:
Littleboy 2011-04-01 01:30:12 -04:00 committed by Julien
parent a523ade332
commit c3d9c6afa5
7 changed files with 38 additions and 5 deletions

View File

@ -85,9 +85,11 @@ void OSystem_Win32::init() {
// Initialize File System Factory
_fsFactory = new WindowsFilesystemFactory();
// Initialize task bar manager
#if defined(USE_TASKBAR)
// Initialize taskbar manager
_taskbarManager = new Win32TaskbarManager();
((Win32TaskbarManager *)_taskbarManager)->init();
#endif
// Invoke parent implementation of this method
OSystem_SDL::init();

View File

@ -23,7 +23,7 @@
*
*/
#if defined(UNIX)
#if defined(UNIX) && defined(USE_TASKBAR)
#include "backends/taskbar/unity/unity-taskbar.h"

View File

@ -26,7 +26,7 @@
#ifndef BACKEND_UNITY_TASKBAR_H
#define BACKEND_UNITY_TASKBAR_H
#if defined(UNIX)
#if defined(UNIX) && defined(USE_TASKBAR)
#include "common/str.h"
#include "common/taskbar.h"

View File

@ -23,7 +23,7 @@
*
*/
#if defined(WIN32)
#if defined(WIN32) && defined(USE_TASKBAR)
// Needed for taskbar functions
#if defined(__GNUC__)

View File

@ -26,7 +26,7 @@
#ifndef BACKEND_WIN32_TASKBAR_H
#define BACKEND_WIN32_TASKBAR_H
#if defined(WIN32)
#if defined(WIN32) && defined(USE_TASKBAR)
#include "common/str.h"
#include "common/taskbar.h"

30
configure vendored
View File

@ -138,6 +138,7 @@ _fluidsynth=auto
_opengl=auto
_opengles=auto
_readline=auto
_taskbar=auto
# Default option behaviour yes/no
_debug_build=auto
_release_build=auto
@ -771,6 +772,9 @@ Optional Libraries:
--with-readline-prefix=DIR Prefix where readline is installed (optional)
--disable-readline disable readline support in text console [autodetect]
--with-unity-prefix=DIR Prefix where libunity is installed (optional)
--disable-unity disable unity[autodetect]
Some influential environment variables:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
@ -818,6 +822,8 @@ for ac_option in $@; do
--disable-fluidsynth) _fluidsynth=no ;;
--enable-readline) _readline=yes ;;
--disable-readline) _readline=no ;;
--enable-taskbar) _taskbar=yes ;;
--disable-taskbar) _taskbar=no ;;
--enable-opengl) _opengl=yes ;;
--disable-opengl) _opengl=no ;;
--enable-verbose-build) _verbose_build=yes ;;
@ -893,6 +899,11 @@ for ac_option in $@; do
READLINE_CFLAGS="-I$arg/include"
READLINE_LIBS="-L$arg/lib"
;;
--with-unity-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
UNITY_CFLAGS="-I$arg/include"
UNITY_LIBS="-L$arg/lib"
;;
--with-opengl-prefix=*)
arg=`echo $ac_option | cut -d '=' -f 2`
OPENGL_CFLAGS="-I$arg/include"
@ -2920,6 +2931,25 @@ define_in_config_h_if_yes "$_readline" 'USE_READLINE'
define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE_FOR_DEBUGGER'
#
# Check for Unity if taskbar integration is enabled
#
echocheck "taskbar"
if test "$_taskbar" = auto ; then
_taskbar=no
cat > $TMPC << EOF
#include <unity.h>
int main(void) { return 0; }
EOF
cc_check $UNITY_CFLAGS $UNITY_LIBS -lunity && _taskbar=yes
fi
if test "$_taskbar" = yes ; then
LIBS="$LIBS $UNITY_LIBS -lunity"
INCLUDES="$INCLUDES $UNITY_CFLAGS"
fi
define_in_config_h_if_yes "$_taskbar" 'USE_TASKBAR'
echo "$_taskbar"
#
# Check for OpenGL (ES)
#

View File

@ -779,6 +779,7 @@ const Feature s_features[] = {
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
{ "nasm", "USE_NASM", "", true, "IA-32 assembly support" }, // This feature is special in the regard, that it needs additional handling.
{ "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" },
{ "taskbar", "USE_TASKBAR", "", true, "Taskbar integration support" },
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there