mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-26 14:56:39 +00:00 
			
		
		
		
	Merge branch 'feature/7358_mygui_342_req' into 'master'
[#7358] Make MyGui 3.4.2 required for 0.49 See merge request OpenMW/openmw!3261
This commit is contained in:
		
						commit
						3e56f4eaf8
					
				
					 11 changed files with 36 additions and 69 deletions
				
			
		|  | @ -187,7 +187,7 @@ Teal: | |||
| Ubuntu_GCC_Debug: | ||||
|   extends: .Ubuntu | ||||
|   cache: | ||||
|     key: Ubuntu_GCC_Debug.ubuntu_22.04.v1 | ||||
|     key: Ubuntu_GCC_Debug.ubuntu_22.04.v2 | ||||
|   before_script: | ||||
|     - CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic | ||||
|   variables: | ||||
|  | @ -512,7 +512,7 @@ macOS13_Xcode14_arm64: | |||
|   tags: | ||||
|     - saas-macos-medium-m1 | ||||
|   cache: | ||||
|     key: macOS12_Xcode14_arm64.v1 | ||||
|     key: macOS12_Xcode14_arm64.v4 | ||||
|   variables: | ||||
|     CCACHE_SIZE: 3G | ||||
| 
 | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ qmake --version | |||
| 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 | ||||
| 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 | ||||
| 
 | ||||
| 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" | ||||
| 
 | ||||
| 	# 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 | ||||
|  |  | |||
|  | @ -125,8 +125,8 @@ modules: | |||
|       - "-DMYGUI_BUILD_PLUGINS=0" | ||||
|     sources: | ||||
|       - type: archive | ||||
|         url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.1.tar.gz | ||||
|         sha256: bdf730bdeb4ad89e6b8223967db01aa5274d2b93adc2c0d6aa4842faeed4de1a | ||||
|         url: https://github.com/MyGUI/mygui/archive/refs/tags/MyGUI3.4.2.tar.gz | ||||
|         sha256: 1cc45fb96c9438e3476778449af0378443d84794a458978a29c75306e45dd45a | ||||
| 
 | ||||
|   - name: libunshield | ||||
|     buildsystem: cmake-ninja | ||||
|  |  | |||
|  | @ -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) | ||||
|  | @ -791,7 +779,7 @@ if (WIN32) | |||
|     #set_target_properties(openmw PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") | ||||
| endif() | ||||
| 
 | ||||
| if (BUILD_OPENMW AND APPLE) | ||||
| if (APPLE) | ||||
|     target_compile_definitions(components PRIVATE GL_SILENCE_DEPRECATION=1) | ||||
|     target_compile_definitions(openmw PRIVATE GL_SILENCE_DEPRECATION=1) | ||||
| endif() | ||||
|  |  | |||
|  | @ -219,7 +219,6 @@ if(APPLE) | |||
|     target_link_libraries(openmw ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK}) | ||||
| 
 | ||||
|     if (FFmpeg_FOUND) | ||||
|         target_link_libraries(openmw z) | ||||
|         target_link_options(openmw PRIVATE "LINKER:SHELL:-framework CoreVideo" | ||||
|                                            "LINKER:SHELL:-framework CoreMedia" | ||||
|                                            "LINKER:SHELL:-framework VideoToolbox" | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -74,11 +74,23 @@ namespace osgMyGUI | |||
|             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 */ | ||||
|         const MyGUI::IntSize& getViewSize() const override { return mViewSize; } | ||||
|         const MyGUI::IntSize& getViewSize() const override | ||||
|         { | ||||
|             return mViewSize; | ||||
|         } | ||||
| 
 | ||||
|         /** @see RenderManager::getVertexFormat */ | ||||
|         MyGUI::VertexColourType getVertexFormat() const override { return mVertexFormat; } | ||||
|         MyGUI::VertexColourType getVertexFormat() const override | ||||
|         { | ||||
|             return mVertexFormat; | ||||
|         } | ||||
| 
 | ||||
|         /** @see RenderManager::isFormatSupported */ | ||||
|         bool isFormatSupported(MyGUI::PixelFormat format, MyGUI::TextureUsage usage) override; | ||||
|  | @ -111,9 +123,10 @@ namespace osgMyGUI | |||
|         void setInjectState(osg::StateSet* stateSet); | ||||
| 
 | ||||
|         /** @see IRenderTarget::getInfo */ | ||||
|         const MyGUI::RenderTargetInfo& getInfo() const override { return mInfo; } | ||||
| 
 | ||||
|         bool checkTexture(MyGUI::ITexture* _texture); | ||||
|         const MyGUI::RenderTargetInfo& getInfo() const override | ||||
|         { | ||||
|             return mInfo; | ||||
|         } | ||||
| 
 | ||||
|         void setViewSize(int width, int height) override; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,29 +1,9 @@ | |||
| #include "box.hpp" | ||||
| 
 | ||||
| #include <MyGUI_EditText.h> | ||||
| #include <MyGUI_LanguageManager.h> | ||||
| 
 | ||||
| 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(); | ||||
|  |  | |||
|  | @ -11,14 +11,6 @@ | |||
| 
 | ||||
| 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> | ||||
|     { | ||||
|         MYGUI_RTTI_DERIVED(Button) | ||||
|  |  | |||
|  | @ -28,7 +28,6 @@ namespace Gui | |||
|         MyGUI::FactoryManager::getInstance().registerFactory<Gui::NumericEditBox>("Widget"); | ||||
|         MyGUI::FactoryManager::getInstance().registerFactory<Gui::SharedStateButton>("Widget"); | ||||
|         MyGUI::FactoryManager::getInstance().registerFactory<Gui::WindowCaption>("Widget"); | ||||
|         MyGUI::FactoryManager::getInstance().registerFactory<Gui::ComboBox>("Widget"); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue