From df656fbf6427abf33f6ea784f6ec4608918a9c4a Mon Sep 17 00:00:00 2001 From: deve Date: Wed, 25 Mar 2015 09:16:15 +0100 Subject: [PATCH 1/2] Allow to compile project using cygwin. Note that you need to have all dependencies in cygwin directory (can be easily installed). Atm. wiimote and joystick events are disabled. --- CMakeLists.txt | 4 ++-- lib/irrlicht/CMakeLists.txt | 4 ++++ lib/irrlicht/source/Irrlicht/COSOperator.cpp | 2 +- src/utils/translation.hpp | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55b30e1ec..4f9ca20ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(SuperTuxKart) set(PROJECT_VERSION "0.8.1") -cmake_minimum_required(VERSION 2.8.1) +cmake_minimum_required(VERSION 2.8.4) if(NOT (CMAKE_MAJOR_VERSION VERSION_LESS 3)) cmake_policy(SET CMP0043 OLD) endif() @@ -32,7 +32,7 @@ else() set(WIIUSE_BUILD ON) endif() -if(MINGW) +if(MINGW OR CYGWIN) set(USE_WIIUSE OFF) endif() diff --git a/lib/irrlicht/CMakeLists.txt b/lib/irrlicht/CMakeLists.txt index 9c9429dc1..8fcd23c92 100644 --- a/lib/irrlicht/CMakeLists.txt +++ b/lib/irrlicht/CMakeLists.txt @@ -35,6 +35,10 @@ if(UNIX AND USE_XRANDR) add_definitions(-D_IRR_LINUX_X11_RANDR_) endif() +if(CYGWIN) + add_definitions(-DNO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) +endif() + set(IRRLICHT_SOURCES source/Irrlicht/CGUIListBox.cpp source/Irrlicht/CZBuffer.cpp diff --git a/lib/irrlicht/source/Irrlicht/COSOperator.cpp b/lib/irrlicht/source/Irrlicht/COSOperator.cpp index 0899d1dd0..5ade8a5b4 100644 --- a/lib/irrlicht/source/Irrlicht/COSOperator.cpp +++ b/lib/irrlicht/source/Irrlicht/COSOperator.cpp @@ -11,7 +11,7 @@ #else #include #include -#ifndef _IRR_SOLARIS_PLATFORM_ +#if !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__CYGWIN__) #include #include #endif diff --git a/src/utils/translation.hpp b/src/utils/translation.hpp index 1067264d5..aecfe18c9 100644 --- a/src/utils/translation.hpp +++ b/src/utils/translation.hpp @@ -28,6 +28,7 @@ # define _(String, ...) (translations->fribidize(StringUtils::insertValues(translations->w_gettext(String), ##__VA_ARGS__))) #undef _C +#undef _P # define _C(Ctx, String, ...) (translations->fribidize(StringUtils::insertValues(translations->w_gettext(String, Ctx), ##__VA_ARGS__))) # define _P(Singular, Plural, Num, ...) (translations->fribidize(StringUtils::insertValues(translations->w_ngettext(Singular, Plural, Num), Num, ##__VA_ARGS__))) # define _CP(Ctx, Singular, Plural, Num, ...) (translations->fribidize(StringUtils::insertValues(translations->w_ngettext(Singular, Plural, Num, Ctx), Num, ##__VA_ARGS__))) From 5828dddde8360a2a5131f41a16f0a329b469c0a9 Mon Sep 17 00:00:00 2001 From: Deve Date: Wed, 25 Mar 2015 18:53:09 +0100 Subject: [PATCH 2/2] Allow to disable popup messages about too old drivers in config.xml --- src/config/user_config.hpp | 3 +++ src/main.cpp | 31 +++++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index 4b75e1e23..7b4454a12 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -482,6 +482,9 @@ namespace UserConfigParams PARAM_PREFIX BoolUserConfigParam m_esm PARAM_DEFAULT(BoolUserConfigParam(false, "enable_esm", &m_video_group, "Enable Exponential Shadow Map (better but slower)")); + PARAM_PREFIX BoolUserConfigParam m_old_driver_popup + PARAM_DEFAULT(BoolUserConfigParam(true, "old_driver_popup", + &m_video_group, "Determines if popup message about too old drivers should be displayed.")); // ---- Debug - not saved to config file /** If gamepad debugging is enabled. */ diff --git a/src/main.cpp b/src/main.cpp index 4b43fc2fb..853a2ae86 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1361,21 +1361,24 @@ int main(int argc, char *argv[] ) exit(0); } - if (!ProfileWorld::isNoGraphics() && GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_DRIVER_RECENT_ENOUGH)) + if (UserConfigParams::m_old_driver_popup) { - MessageDialog *dialog = - new MessageDialog(_("Your driver version is too old. Please install " - "the latest video drivers."), - /*from queue*/ true); - GUIEngine::DialogQueue::get()->pushDialog(dialog); - } - else if (!CVS->isGLSL()) - { - MessageDialog *dialog = - new MessageDialog(_("Your OpenGL version appears to be too old. Please verify " - "if an update for your video driver is available. SuperTuxKart requires OpenGL 3.1 or better."), - /*from queue*/ true); - GUIEngine::DialogQueue::get()->pushDialog(dialog); + if (!ProfileWorld::isNoGraphics() && GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_DRIVER_RECENT_ENOUGH)) + { + MessageDialog *dialog = + new MessageDialog(_("Your driver version is too old. Please install " + "the latest video drivers."), + /*from queue*/ true); + GUIEngine::DialogQueue::get()->pushDialog(dialog); + } + else if (!CVS->isGLSL()) + { + MessageDialog *dialog = + new MessageDialog(_("Your OpenGL version appears to be too old. Please verify " + "if an update for your video driver is available. SuperTuxKart requires OpenGL 3.1 or better."), + /*from queue*/ true); + GUIEngine::DialogQueue::get()->pushDialog(dialog); + } } // Note that on the very first run of STK internet status is set to