MyGUI Compiling        
Print

Sources

First of all, you have to download the source files.
You can get them on sourceforge(external link) or download the fresh version from svn e.g. using TortoiseSVN from next repository:
http://svn.code.sf.net/p/my-gui/code/trunk
Or if you using Linux type
svn co http://svn.code.sf.net/p/my-gui/code/trunk my-gui

Dependencies

You need to have MyGUI's dependencies. The only dependency is FreeType.
GNU/Linux users need to install libfreetype6-dev (and libois-dev if you want to build demos/tools).
Non linux users:

  • Download MyGUI's dependencies (either from OGRE website(external link) or here (Visual Studio only)(external link) ). (If you have downloaded the OGRE dependencies, you don't need to download any extra MyGUI dependencies.)
  • Build dependencies before trying to configure MyGUI with CMake. Remember that you need to build both Release and Debug versions.

 

Configuring

After getting sources you need to install CMake ( http://www.cmake.org/cmake/resources/software.html(external link) ).

Run CMake-gui, set sources directory to directory where you downloaded sources (directory, that contain MyGUIEngine and other folders, but not MyGUIEngine itself).
Also you can (and it's recommended to) set CMake build directory not same as sources directory - this is usually convenient.
Press Configure if you use Cmake-gui. Select proper generator for your compiler/IDE. That will probably cause some CMake errors, because we also should set where Ogre and dependencies are.

If you see next message

-- The following REQUIRED packages could NOT be located on your system.
  -- Please install them before continuing this software installation.
  -- If you are in Windows, try passing -DMYGUI_DEPENDENCIES_DIR=<path to
  dependencies>

set MYGUI_DEPENDENCIES_DIR to path where you have Dependencies.

If you see next message

-- The following OPTIONAL packages could NOT be located on your system.
  -- Consider installing them to enable more features from this software.
  + ogre: Support for the Ogre render system <>

this mean that CMake can't find where your Ogre sources is:

  • if you use old OGRE (< 1.7) set OGRE_DIR option manually.
  • otherwise set OGRE_SOURCE_DIR (or OGRE_SOURCE for MyGUI 3.2.0 or lower version) directory (that contain OgreMain and other OGRE directories, not OgreMain itself) and OGRE_BUILD directory (that was used as build directory in CMake - contain bin and lib directories).
  • if Ogre was built with boost fill BOOST_ROOT option manually.

 
Press Configure until all settings are not red.

Also you can look through options with MYGUI_ prefix, that might be interesting for you. Most commonly used is MYGUI_STATIC (this option would also require define MYGUI_STATIC in your project as well), also you can enable/disable tools, demos and unit tests if you need/don't need them.

Press Configure until all settings are not red.

Then press Generate and you'll get makefiles/project files for your IDE.

Compiling

Open generated solution/use makefiles and compile MyGUIEngine and MyGUI.OgrePlatform targets.
You also may run demos or tools. You don't need to do anything other than starting compilation process.

Using

To use MyGUI in your project, add to your project next settings:

Insert in include files:
(PathToMyGUI)\MyGUIEngine\include
(PathToMyGUI)\Platforms\Ogre\OgrePlatform\include

Insert in lib path:
(PathToMyGUI)\lib\Release
(PathToMyGUI)\lib\Debug

In linker additional dependencies add
MyGUI.OgrePlatform.lib, MyGUIEngine.lib or MyGUI.OgrePlatform_d.lib, MyGUIEngine_d.lib


Alias: MyGUI_Compiling


Contributors to this page: sercero1 points  , JustBoo , jacmoe180265 points  , Hronom14 points  and Altren791 points  .
Page last modified on Monday 16 of May, 2016 03:34:01 UTC by sercero1 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.