1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-30 09:18:26 +00:00

[#7358] Make MyGui 3.4.2 required for 0.49

This commit is contained in:
Bret Curtis 2023-07-22 16:44:03 +02:00
parent 2a4440e5b1
commit fc40c925db
7 changed files with 13 additions and 56 deletions

View file

@ -607,14 +607,14 @@ if [ -z $SKIP_DOWNLOAD ]; then
"ffmpeg-${FFMPEG_VER}-dev-win${BITS}.zip"
# MyGUI
download "MyGUI 3.4.1" \
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" \
"MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z"
download "MyGUI 3.4.2" \
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" \
"MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z"
if [ -n "$PDBS" ]; then
download "MyGUI symbols" \
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" \
"MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z"
"https://gitlab.com/OpenMW/openmw-deps/-/raw/main/windows/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" \
"MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z"
fi
# OpenAL
@ -778,20 +778,20 @@ printf "FFmpeg ${FFMPEG_VER}... "
}
cd $DEPS
echo
printf "MyGUI 3.4.1... "
printf "MyGUI 3.4.2... "
{
cd $DEPS_INSTALL
if [ -d MyGUI ] && \
grep "MYGUI_VERSION_MAJOR 3" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
grep "MYGUI_VERSION_MINOR 4" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null && \
grep "MYGUI_VERSION_PATCH 1" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null
grep "MYGUI_VERSION_PATCH 2" MyGUI/include/MYGUI/MyGUI_Prerequest.h > /dev/null
then
printf "Exists. "
elif [ -z $SKIP_EXTRACT ]; then
rm -rf MyGUI
eval 7z x -y "${DEPS}/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" $STRIP
[ -n "$PDBS" ] && eval 7z x -y "${DEPS}/MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" $STRIP
mv "MyGUI-3.4.1-msvc${MYGUI_MSVC_YEAR}-win${BITS}" MyGUI
eval 7z x -y "${DEPS}/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}.7z" $STRIP
[ -n "$PDBS" ] && eval 7z x -y "${DEPS}/MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}-sym.7z" $STRIP
mv "MyGUI-3.4.2-msvc${MYGUI_MSVC_YEAR}-win${BITS}" MyGUI
fi
export MYGUI_HOME="$(real_pwd)/MyGUI"
for CONFIGURATION in ${CONFIGURATIONS[@]}; do

View file

@ -125,7 +125,7 @@ modules:
- "-DMYGUI_BUILD_PLUGINS=0"
sources:
- type: archive
url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz
url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.2.tar.gz
sha256: bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a
- name: libunshield

View file

@ -333,7 +333,7 @@ endif()
# Required for building the FFmpeg headers
add_definitions(-D__STDC_CONSTANT_MACROS)
# Reqiuired for unity build
# Required for unity build
add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR)
# TinyXML
@ -456,7 +456,7 @@ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0)
endif()
if(OPENMW_USE_SYSTEM_MYGUI)
find_package(MyGUI 3.4.1 REQUIRED)
find_package(MyGUI 3.4.2 REQUIRED)
endif()
find_package(SDL2 2.0.9 REQUIRED)
find_package(OpenAL REQUIRED)
@ -709,18 +709,6 @@ if (WIN32)
5054 # Deprecated operations between enumerations of different types caused by Qt headers
)
if( "${MyGUI_VERSION}" VERSION_LESS_EQUAL "3.4.0" )
set(WARNINGS_DISABLE ${WARNINGS_DISABLE}
4866 # compiler may not enforce left-to-right evaluation order for call
)
endif()
if( "${MyGUI_VERSION}" VERSION_LESS_EQUAL "3.4.1" )
set(WARNINGS_DISABLE ${WARNINGS_DISABLE}
4275 # non dll-interface class 'MyGUI::delegates::IDelegateUnlink' used as base for dll-interface class 'MyGUI::Widget'
)
endif()
foreach(d ${WARNINGS_DISABLE})
set(WARNINGS "${WARNINGS} /wd${d}")
endforeach(d)

View file

@ -769,11 +769,7 @@ namespace MWGui
void reset(float left, float top, MyGUI::Colour colour)
{
#if MYGUI_VERSION <= MYGUI_DEFINE_VERSION(3, 4, 1)
mC = MyGUI::texture_utility::toColourARGB(colour) | 0xFF000000;
#else
mC = MyGUI::texture_utility::toNativeColour(colour, MyGUI::VertexColourType::ColourARGB) | 0xFF000000;
#endif
MyGUI::texture_utility::convertColour(mC, mVertexColourType);
mCursor.left = mOrigin.left + left;

View file

@ -73,11 +73,7 @@ namespace LuaUi
w->eventMouseButtonPressed.clear();
w->eventMouseButtonReleased.clear();
w->eventMouseMove.clear();
#if MYGUI_VERSION <= MYGUI_DEFINE_VERSION(3, 4, 2)
w->eventMouseDrag.m_event.clear();
#else
w->eventMouseDrag.clear();
#endif
w->eventMouseSetFocus.clear();
w->eventMouseLostFocus.clear();

View file

@ -16,11 +16,7 @@ namespace LuaUi
for (auto& [w, _] : mActionWidgets)
{
w->eventMouseButtonPressed.clear();
#if MYGUI_VERSION <= MYGUI_DEFINE_VERSION(3, 4, 2)
w->eventMouseDrag.m_event.clear();
#else
w->eventMouseDrag.clear();
#endif
}
mActionWidgets.clear();

View file

@ -5,25 +5,6 @@
namespace Gui
{
// TODO: Since 3.4.2 MyGUI is supposed to automatically translate tags
// If the 3.4.2 become a required minimum version, the ComboBox class may be removed.
void ComboBox::setPropertyOverride(const std::string& _key, const std::string& _value)
{
#if MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3, 4, 2)
MyGUI::ComboBox::setPropertyOverride(_key, _value);
#else
if (_key == "AddItem")
{
const std::string value = MyGUI::LanguageManager::getInstance().replaceTags(_value);
MyGUI::ComboBox::setPropertyOverride(_key, value);
}
else
{
MyGUI::ComboBox::setPropertyOverride(_key, _value);
}
#endif
}
void AutoSizedWidget::notifySizeChange(MyGUI::Widget* w)
{
MyGUI::Widget* parent = w->getParent();