MyGUI Compiling | Ogre Wiki (original) (raw)

Table of contents

     * [Sources](#Sources)
     * [Dependencies](#Dependencies)
     * [Configuring](#Configuring)
     * [Compiling](#Compiling)
     * [Using](#Using)

Sources

First of all, you have to download the source files.
You can get them on sourceforge 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:

Configuring

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

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

Copy to clipboard

-- 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=

set MYGUI_DEPENDENCIES_DIR to path where you have Dependencies.

If you see next message

Copy to clipboard

-- The following OPTIONAL packages could NOT be located on your system. -- Consider installing them to enable more features from this software.

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

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