[#7358] Make MyGui 3.4.2 required for 0.49

macos_ci_fix
psi29a 1 year ago
parent e6cffa5494
commit 8d1a19a6f4

@ -187,7 +187,7 @@ Teal:
Ubuntu_GCC_Debug: Ubuntu_GCC_Debug:
extends: .Ubuntu extends: .Ubuntu
cache: cache:
key: Ubuntu_GCC_Debug.ubuntu_22.04.v1 key: Ubuntu_GCC_Debug.ubuntu_22.04.v2
before_script: before_script:
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic
variables: variables:
@ -512,7 +512,7 @@ macOS13_Xcode14_arm64:
tags: tags:
- saas-macos-medium-m1 - saas-macos-medium-m1
cache: cache:
key: macOS12_Xcode14_arm64.v1 key: macOS12_Xcode14_arm64.v4
variables: variables:
CCACHE_SIZE: 3G CCACHE_SIZE: 3G

@ -32,7 +32,7 @@ qmake --version
if [[ "${MACOS_AMD64}" ]]; then if [[ "${MACOS_AMD64}" ]]; then
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20221113.zip -o ~/openmw-deps.zip curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20221113.zip -o ~/openmw-deps.zip
else else
curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20230223_arm64.zip -o ~/openmw-deps.zip curl -fSL -R -J https://gitlab.com/OpenMW/openmw-deps/-/raw/main/macos/openmw-deps-20230722_arm64.zip -o ~/openmw-deps.zip
fi fi
unzip -o ~/openmw-deps.zip -d /tmp > /dev/null unzip -o ~/openmw-deps.zip -d /tmp > /dev/null

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

@ -125,8 +125,8 @@ modules:
- "-DMYGUI_BUILD_PLUGINS=0" - "-DMYGUI_BUILD_PLUGINS=0"
sources: sources:
- type: archive - 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 sha256: 1cc45fb96c9438e3476778449af0378443d84794a458978a29c75306e45dd45a
- name: libunshield - name: libunshield
buildsystem: cmake-ninja buildsystem: cmake-ninja

@ -333,7 +333,7 @@ endif()
# Required for building the FFmpeg headers # Required for building the FFmpeg headers
add_definitions(-D__STDC_CONSTANT_MACROS) add_definitions(-D__STDC_CONSTANT_MACROS)
# Reqiuired for unity build # Required for unity build
add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR) add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR)
# TinyXML # TinyXML
@ -456,7 +456,7 @@ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0)
endif() endif()
if(OPENMW_USE_SYSTEM_MYGUI) if(OPENMW_USE_SYSTEM_MYGUI)
find_package(MyGUI 3.4.1 REQUIRED) find_package(MyGUI 3.4.2 REQUIRED)
endif() endif()
find_package(SDL2 2.0.9 REQUIRED) find_package(SDL2 2.0.9 REQUIRED)
find_package(OpenAL REQUIRED) find_package(OpenAL REQUIRED)
@ -709,18 +709,6 @@ if (WIN32)
5054 # Deprecated operations between enumerations of different types caused by Qt headers 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}) foreach(d ${WARNINGS_DISABLE})
set(WARNINGS "${WARNINGS} /wd${d}") set(WARNINGS "${WARNINGS} /wd${d}")
endforeach(d) endforeach(d)
@ -791,7 +779,7 @@ if (WIN32)
#set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") #set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
endif() endif()
if (BUILD_OPENMW AND APPLE) if (APPLE)
target_compile_definitions(components PRIVATE GL_SILENCE_DEPRECATION=1) target_compile_definitions(components PRIVATE GL_SILENCE_DEPRECATION=1)
target_compile_definitions(openmw PRIVATE GL_SILENCE_DEPRECATION=1) target_compile_definitions(openmw PRIVATE GL_SILENCE_DEPRECATION=1)
endif() endif()

@ -219,7 +219,6 @@ if(APPLE)
target_link_libraries(openmw ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK}) target_link_libraries(openmw ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
if (FFmpeg_FOUND) if (FFmpeg_FOUND)
target_link_libraries(openmw z)
target_link_options(openmw PRIVATE "LINKER:SHELL:-framework CoreVideo" target_link_options(openmw PRIVATE "LINKER:SHELL:-framework CoreVideo"
"LINKER:SHELL:-framework CoreMedia" "LINKER:SHELL:-framework CoreMedia"
"LINKER:SHELL:-framework VideoToolbox" "LINKER:SHELL:-framework VideoToolbox"

@ -769,11 +769,7 @@ namespace MWGui
void reset(float left, float top, MyGUI::Colour colour) 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; mC = MyGUI::texture_utility::toNativeColour(colour, MyGUI::VertexColourType::ColourARGB) | 0xFF000000;
#endif
MyGUI::texture_utility::convertColour(mC, mVertexColourType); MyGUI::texture_utility::convertColour(mC, mVertexColourType);
mCursor.left = mOrigin.left + left; mCursor.left = mOrigin.left + left;

@ -74,11 +74,23 @@ namespace osgMyGUI
return static_cast<RenderManager*>(MyGUI::RenderManager::getInstancePtr()); return static_cast<RenderManager*>(MyGUI::RenderManager::getInstancePtr());
} }
bool checkTexture(MyGUI::ITexture* _texture)
#if MYGUI_DEBUG_MODE == 1 /* needed workaround for MyGUI 3.4.2 */
override
#endif
;
/** @see RenderManager::getViewSize */ /** @see RenderManager::getViewSize */
const MyGUI::IntSize& getViewSize() const override { return mViewSize; } const MyGUI::IntSize& getViewSize() const override
{
return mViewSize;
}
/** @see RenderManager::getVertexFormat */ /** @see RenderManager::getVertexFormat */
MyGUI::VertexColourType getVertexFormat() const override { return mVertexFormat; } MyGUI::VertexColourType getVertexFormat() const override
{
return mVertexFormat;
}
/** @see RenderManager::isFormatSupported */ /** @see RenderManager::isFormatSupported */
bool isFormatSupported(MyGUI::PixelFormat format, MyGUI::TextureUsage usage) override; bool isFormatSupported(MyGUI::PixelFormat format, MyGUI::TextureUsage usage) override;
@ -111,9 +123,10 @@ namespace osgMyGUI
void setInjectState(osg::StateSet* stateSet); void setInjectState(osg::StateSet* stateSet);
/** @see IRenderTarget::getInfo */ /** @see IRenderTarget::getInfo */
const MyGUI::RenderTargetInfo& getInfo() const override { return mInfo; } const MyGUI::RenderTargetInfo& getInfo() const override
{
bool checkTexture(MyGUI::ITexture* _texture); return mInfo;
}
void setViewSize(int width, int height) override; void setViewSize(int width, int height) override;

@ -1,29 +1,9 @@
#include "box.hpp" #include "box.hpp"
#include <MyGUI_EditText.h> #include <MyGUI_EditText.h>
#include <MyGUI_LanguageManager.h>
namespace Gui 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) void AutoSizedWidget::notifySizeChange(MyGUI::Widget* w)
{ {
MyGUI::Widget* parent = w->getParent(); MyGUI::Widget* parent = w->getParent();

@ -11,14 +11,6 @@
namespace Gui namespace Gui
{ {
class ComboBox : public FontWrapper<MyGUI::ComboBox>
{
MYGUI_RTTI_DERIVED(ComboBox)
protected:
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
};
class Button : public FontWrapper<MyGUI::Button> class Button : public FontWrapper<MyGUI::Button>
{ {
MYGUI_RTTI_DERIVED(Button) MYGUI_RTTI_DERIVED(Button)

@ -28,7 +28,6 @@ namespace Gui
MyGUI::FactoryManager::getInstance().registerFactory<Gui::NumericEditBox>("Widget"); MyGUI::FactoryManager::getInstance().registerFactory<Gui::NumericEditBox>("Widget");
MyGUI::FactoryManager::getInstance().registerFactory<Gui::SharedStateButton>("Widget"); MyGUI::FactoryManager::getInstance().registerFactory<Gui::SharedStateButton>("Widget");
MyGUI::FactoryManager::getInstance().registerFactory<Gui::WindowCaption>("Widget"); MyGUI::FactoryManager::getInstance().registerFactory<Gui::WindowCaption>("Widget");
MyGUI::FactoryManager::getInstance().registerFactory<Gui::ComboBox>("Widget");
} }
} }

Loading…
Cancel
Save