BACKENDS: Add use flag for taskbar integration
This commit is contained in:
parent
a523ade332
commit
c3d9c6afa5
7 changed files with 38 additions and 5 deletions
|
@ -85,9 +85,11 @@ void OSystem_Win32::init() {
|
||||||
// Initialize File System Factory
|
// Initialize File System Factory
|
||||||
_fsFactory = new WindowsFilesystemFactory();
|
_fsFactory = new WindowsFilesystemFactory();
|
||||||
|
|
||||||
|
#if defined(USE_TASKBAR)
|
||||||
// Initialize taskbar manager
|
// Initialize taskbar manager
|
||||||
_taskbarManager = new Win32TaskbarManager();
|
_taskbarManager = new Win32TaskbarManager();
|
||||||
((Win32TaskbarManager *)_taskbarManager)->init();
|
((Win32TaskbarManager *)_taskbarManager)->init();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Invoke parent implementation of this method
|
// Invoke parent implementation of this method
|
||||||
OSystem_SDL::init();
|
OSystem_SDL::init();
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(UNIX)
|
#if defined(UNIX) && defined(USE_TASKBAR)
|
||||||
|
|
||||||
#include "backends/taskbar/unity/unity-taskbar.h"
|
#include "backends/taskbar/unity/unity-taskbar.h"
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#ifndef BACKEND_UNITY_TASKBAR_H
|
#ifndef BACKEND_UNITY_TASKBAR_H
|
||||||
#define BACKEND_UNITY_TASKBAR_H
|
#define BACKEND_UNITY_TASKBAR_H
|
||||||
|
|
||||||
#if defined(UNIX)
|
#if defined(UNIX) && defined(USE_TASKBAR)
|
||||||
|
|
||||||
#include "common/str.h"
|
#include "common/str.h"
|
||||||
#include "common/taskbar.h"
|
#include "common/taskbar.h"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && defined(USE_TASKBAR)
|
||||||
|
|
||||||
// Needed for taskbar functions
|
// Needed for taskbar functions
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#ifndef BACKEND_WIN32_TASKBAR_H
|
#ifndef BACKEND_WIN32_TASKBAR_H
|
||||||
#define BACKEND_WIN32_TASKBAR_H
|
#define BACKEND_WIN32_TASKBAR_H
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32) && defined(USE_TASKBAR)
|
||||||
|
|
||||||
#include "common/str.h"
|
#include "common/str.h"
|
||||||
#include "common/taskbar.h"
|
#include "common/taskbar.h"
|
||||||
|
|
30
configure
vendored
30
configure
vendored
|
@ -138,6 +138,7 @@ _fluidsynth=auto
|
||||||
_opengl=auto
|
_opengl=auto
|
||||||
_opengles=auto
|
_opengles=auto
|
||||||
_readline=auto
|
_readline=auto
|
||||||
|
_taskbar=auto
|
||||||
# Default option behaviour yes/no
|
# Default option behaviour yes/no
|
||||||
_debug_build=auto
|
_debug_build=auto
|
||||||
_release_build=auto
|
_release_build=auto
|
||||||
|
@ -771,6 +772,9 @@ Optional Libraries:
|
||||||
--with-readline-prefix=DIR Prefix where readline is installed (optional)
|
--with-readline-prefix=DIR Prefix where readline is installed (optional)
|
||||||
--disable-readline disable readline support in text console [autodetect]
|
--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:
|
Some influential environment variables:
|
||||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||||
nonstandard directory <lib dir>
|
nonstandard directory <lib dir>
|
||||||
|
@ -818,6 +822,8 @@ for ac_option in $@; do
|
||||||
--disable-fluidsynth) _fluidsynth=no ;;
|
--disable-fluidsynth) _fluidsynth=no ;;
|
||||||
--enable-readline) _readline=yes ;;
|
--enable-readline) _readline=yes ;;
|
||||||
--disable-readline) _readline=no ;;
|
--disable-readline) _readline=no ;;
|
||||||
|
--enable-taskbar) _taskbar=yes ;;
|
||||||
|
--disable-taskbar) _taskbar=no ;;
|
||||||
--enable-opengl) _opengl=yes ;;
|
--enable-opengl) _opengl=yes ;;
|
||||||
--disable-opengl) _opengl=no ;;
|
--disable-opengl) _opengl=no ;;
|
||||||
--enable-verbose-build) _verbose_build=yes ;;
|
--enable-verbose-build) _verbose_build=yes ;;
|
||||||
|
@ -893,6 +899,11 @@ for ac_option in $@; do
|
||||||
READLINE_CFLAGS="-I$arg/include"
|
READLINE_CFLAGS="-I$arg/include"
|
||||||
READLINE_LIBS="-L$arg/lib"
|
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=*)
|
--with-opengl-prefix=*)
|
||||||
arg=`echo $ac_option | cut -d '=' -f 2`
|
arg=`echo $ac_option | cut -d '=' -f 2`
|
||||||
OPENGL_CFLAGS="-I$arg/include"
|
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'
|
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)
|
# Check for OpenGL (ES)
|
||||||
#
|
#
|
||||||
|
|
|
@ -779,6 +779,7 @@ const Feature s_features[] = {
|
||||||
{ "mt32emu", "USE_MT32EMU", "", true, "integrated MT-32 emulator" },
|
{ "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.
|
{ "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" },
|
{ "opengl", "USE_OPENGL", "opengl32", true, "OpenGL support" },
|
||||||
|
{ "taskbar", "USE_TASKBAR", "", true, "Taskbar integration support" },
|
||||||
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
|
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
|
||||||
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
|
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
|
||||||
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there
|
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue