Help with MyGUI setup

Anonymous

18-08-2012 02:54:03

Win 7 OS
Visual Studio C++ 2010 Express
MyGUI v3.2.0
Dependencies w/freetype v2.3.11
CMake v2.8.9

i have been trying to figure out for quite a few hours now, how to instal and use MyGUI. I have searched this forum for hours and still was not able to find a clear answer to my question. I also went to the wiki page where i was able to figure out at least what files i need but I'm still confused on what to do :( (Probably due to my lack of programming experience, so please bear with me).

I guess my confusion starts with how do i build MyGUI dependencies? Do i need to build all files in dependency folder or just freetype file?
dependency folder came with freetype v2.3.11 but found a newer version freetype 2.4.9, does it matter which one i use?

I did find in one post a link to prebuilt solutions but I'm not sure if this means i no longer have to go through the building of the dependencies and configuration process with CMake. If so, what do i next with these prebuilt solutions?

Please someone help me with this first part, then hopefully with the rest the MyGUI setup. Thank you.

Apostate

20-08-2012 13:57:02

I just did this recently for the OpenGL Platform. If you're using Ogre it might be a little different, but it should mostly be the same. I think the CMake config step looks for a specific name for freetype, so I would just stick with their dependencies zip for now.

1) Build the dependencies. Just build all of them, it shouldn't hurt anything. Make sure to build both Debug and Release or the CMake config step won't work.
2) Configure MyGUI with CMake. There's a lot of options, but most of them you don't need to worry about. They have directions for you to follow already. I used Visual Studio 2010 and it complained about not being able to find Freetype. The build output folder got borked when converting the VS2008 solution for me, so I just copied the Freetype libs to where the OIS ones ended up (I think it's /Dependencies/lib/Release and /Dependencies/lib/Debug) and it worked.
3) Build MyGUI.
4) Integrate it with whatever you're using (I can't really help that much with this step if you're using Ogre). They've got directions and a Quickstart Guide for this.

Altren

20-08-2012 14:16:16

Few things to add: it doesn't matter which freetype version do you use, MyGUI works fine with all recent freetype versions. But we recommend to use freetype 2.4+, since they improved hinting (if you don't know what is it, just use any freetype version you have).

Anonymous

21-08-2012 20:43:13

I was able to build dependencies and configure/generate with CMake.

The instructions in the MyGUI wiki then says to open and compile MyGUIEngine and MyGUI.OgrePlatform.

MyGUIEngine compiles but i keep getting an error when compiling MyGUI.OgrePlatform. Here is the output when i compile it:


1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
2>------ Build started: Project: MyGUI.OgrePlatform, Configuration: Debug Win32 ------
2> MyGUI_OgreDataManager.cpp
2>c:\ogresdk\ogresdk_vc10_v1-8-0\include\ogre\threading\OgreThreadHeadersBoost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> MyGUI_OgreDataStream.cpp
2>c:\ogresdk\ogresdk_vc10_v1-8-0\include\ogre\threading\OgreThreadHeadersBoost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> MyGUI_OgreRenderManager.cpp
2>c:\ogresdk\ogresdk_vc10_v1-8-0\include\ogre\threading\OgreThreadHeadersBoost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> MyGUI_OgreRTTexture.cpp
2>c:\ogresdk\ogresdk_vc10_v1-8-0\include\ogre\threading\OgreThreadHeadersBoost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> MyGUI_OgreTexture.cpp
2>c:\ogresdk\ogresdk_vc10_v1-8-0\include\ogre\threading\OgreThreadHeadersBoost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> MyGUI_OgreVertexBuffer.cpp
2>c:\ogresdk\ogresdk_vc10_v1-8-0\include\ogre\threading\OgreThreadHeadersBoost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> Generating Code...
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


The file that is says it cannot find is at C:\OgreSDK\OgreSDK_vc10_v1-8-0\boost\boost\thread\tss.hpp

Not sure what to do next. :?: The wiki has the following solution:

Solve compile problems with BOOST
If you use OgreSDK do this:
Create a new variable called "CMAKE_CXX_FLAGS" with type string and enter value "/I [PATH_TO_BOOST] "(If this variable exist just add value). The result is likely: "/Ic:/OgreSDK_vc10_v1-7-4/boost_1_47". Than create a new variable "CMAKE_EXE_LINKER_FLAGS" and set value "/LIBPATH: [PATH_TO_BOOST_LIBS] "(If this variable exist just add value). The result is likely: "/Ic:/OgreSDK_vc10_v1-7-4/boost_1_47/lib".
If you have a separate boost installed, just change the path to include and lib.


but i don't know if this solution is regards to the issue that i am having compiling MyGUI.OgrePlatform or some other compiling issue. If it is the answer to my problem i am not clear where i should create the new variables that it says to create. :?: :?:

Altren

21-08-2012 22:09:33

if Ogre was built with boost set BOOST_ROOT option manuallyDid you tried to do this first? This is mentioned at that wiki page as well.

Anonymous

22-08-2012 01:42:02

It worked! :D

Had to type in path for OGRE_SOURCE in CMAKE. Only then when i tried to configure did it show me the BOOST_ROOT option. Typed in the path to boost directory, hit configure and then generate and it worked without any problems. :D

I was then able to build MyGUIEngine and MyGUI_OgrePlatform without any errors. :D

It took me a while but i finally figured it out. Thanks so much Altren for your help.

Now to use it, if i understand correctly i have to do the following when starting a new project:

Switching to 'All Configurations'

Configuration Properties - C/C++ - General - Additional Include Directories
add: (PathToMyGUI)\MyGUIEngine\include and (PathToMyGUI)\Platforms\Ogre\OgrePlatform\include

then Switching to 'Active(Debug)'

Configuration Properties - Linker - General - Additional Dependencies - Debug
add: (PathToMyGUI)\lib\Debug

Configuration Properties - Linker - Input - Additional Dependencies - Debug
add: MyGUIEngine_d.lib and MyGUI.OgrePlatform_d.lib

then Switching to 'Release'

Configuration Properties - Linker - General - Additional Dependencies - Release
add:(PathToMyGUI)\lib\Release

Configuration Properties - Linker - Input - Additional Dependencies - Release
add: MyGUIEngine.lib and MyGUI.OgrePlatform.lib

Is this correct?

Altren

22-08-2012 09:01:26

Yes, it is correct. And also you need to copy MyGUIEngine_d.dll and MyGUIEngine.dll to your executable.

Anonymous

23-08-2012 03:55:11

I'm a little confused about what you mean 'copying to executable'. Does it mean that i need to copy and past files to where MyGUI executable file is located?

Also, why is it necessary to copy these files to executable?

Apostate

24-08-2012 23:04:15

You need to copy the mygui DLL files to the same directory as your Ogre exe so the exe can find and use the mygui DLLs.

Anonymous

25-08-2012 06:21:18

Oh ok. Got it. Thanks very much for your help.