OK, so finally the (very) step-by-step guide to getting the CEGUI tutorial going on VS 2005 sp1 is here. Maybe it is too step-by-step, I dunno.
For some reason, I couldn't get the executable running in VMware, so if someone could take a look and see if I am missing something, that would be great. Could be a VM thing, though, since it ran fine outside the VM.
If someone thinks something should be done (or spelled
) differently, I am completely open to suggestions. As I have stated earlier, I am not that experienced, but certainly willing to learn.
Ok, enough talk. Tutorial:
During the first steps we will set up Visual Studio 2005 sp1 to work with CEGUI:
1 ) Download the latest stable release of CEGUI from
http://www.cegui.org.uk/. Currently that is version 0.62b. Make sure that you get the “Binary Downloads for Microsoft Visual C++ 8 (2005) - With SP1” . You do not need to download the dependencies package, only the precompiled SDK.
2 ) Extract the contents of the zip archive to a folder on your harddrive. I have chosen to use “C:\libs\” in my example.
3 ) Open Visual Studio and go to “Tools”->”Options”->”Projects and Solutions”->”VC++ Directories”.
Here you will need to add the “\include”, “\dependencies\include”, and “RendererModules\OpenGLGUIRenderer” directories, in the SDK folder, to the list of include directories. In my case, that would be:
C:\libs\CEGUI-SDK-0.6.2-vc8\include
C:\libs\CEGUI-SDK-0.6.2-vc8\dependencies\include
C:\libs\CEGUI-SDK-0.6.2-vc8\RendererModules\OpenGLGUIRenderer
Next you will need to add the SDK's “\lib” and “\dependencies\lib” directories to the list of directories for library files, and click OK. I added:
C:\libs\CEGUI-SDK-0.6.2-vc8\lib
C:\libs\CEGUI-SDK-0.6.2-vc8\dependencies\lib
Now the compiler is all set up for CEGUI. In the following steps, we will set up the tutorial project:
4 ) Select “File”->”New”->”Project...”. In the “New Project” dialog, select “Win32 Project”, and name it “sfmlCEGUI”. Click “OK”, then “Next”, and select “Empty project”. Then click “Finish”.
5 ) Go to “Build”->”Configuration Manager” and change the active solution configuration to “Release”.
6 ) Now copy the source and header files from the tutorial project (located in the “src” and “include” folders) to the new project folder. In my case
My Documents\Visual Studio 2005\sfmlCEGUI\sfmlCEGUI\
And add them into the project (“Project”->”Add Existing Item...”).
7 ) Next we will need to configure CEGUI for static linking. To do this, go to “Project”->”Properties”->"C/C++" -> "Preprocessor" -> "Preprocessor definitions" and add “CEGUI_STATIC” to the list.
8 ) Now go to “Project”->”Properties”->”Linker”->”Input” and add the following to “Additional Dependencies”:
sfml-main.lib sfml-system-s.lib sfml-window-s.lib sfml-graphics-s.lib glu32.lib pcre.lib CEGUIBase_Static.lib CEGUIExpatParser_Static.lib expat.lib CEGUISILLYImageCodec_Static.lib SILLY.lib OpenGLGUIRenderer_Static.lib CEGUIFalagardWRBase_Static.lib winmm.lib OpenGL32.lib freetype.lib
9 ) Finally you can compile the project... Phew. Almost done, but not quite yet..
10 ) Copy the following files from the tutorial project's “bin” folder to the folder where your freshly compiled executable resides:
DejaVuSans-10.font
DejaVuSans.ttf
WindowsLook.imageset
WindowsLook.looknfeel
WindowsLook.scheme
WindowsLook.tga
WindowsLookWidgets.scheme
11 ) Then copy SILLY.dll from the SDK's \bin folder, in my case “C:\libs\CEGUI-SDK-0.6.2-vc8\bin”, into the same folder as the previous step.
Do not use the SILLY.dll file from the tutorial folder, it will not be compatible with your executable.
At this point you should be able to run the program.
Now get out those bongos and have a party! You deserve it!