Friday, October 30, 2009

cegui ogre and theora plugin work

For past few days, i was struggling with cegui theora and ogre plugin work. Today i got it working with help from Vamsi...

This documentation is for windows operating system. I specifically tried on window XP but i am not sure if this work on other versions or not. However if we have operating system compatible libraries for each required component of setup then we can hope that it'll work.

First we should get OGRE installed on the machine. Set the (OGRE_HOME) variable.
Get the CEGUI setup working on machine. So make sure that CEGUI and OGRE based dll and lib files are present on the system. If possible, try one CEGUI-OGRE based hello world kind of program.... This is an appropriate application to start and test OGRE and CEGUI...

http://www.ogre3d.org/wiki/index.php/Basic_Tutorial_7


Once we have CEGUI and OGRE working then open this page and try to compile the theora-videoplugin...

The bad part about this video plug-in is that there is very less to no documentation available on internet...

For compiling.. Following points need to be kept in mind...
1. Create a folder TheoraPluginThingy
2. cd into the folder

[...All steps in this "TheoraPluginThingy" directory...]
1. Get libogg
2. Get libtheora
3. Get libvorbis
4. Get ptypes
5. Install tortoiseSVN [if you don't have] and get the Theora-Videoplugin code

Start with libogg...
Search for dynamic solution file and compile it...
Check for the size of .dll created in output directory... This directory is set in properties... so check there...

Now cd to libvorbis directory
Search for dynamic solution file and compile it...
There is a readme file so dont forget to read that..
Also you may need to correctly specify the version of "libogg" that you use in file "libogg.vsprops".

Now one problem here is with file vorbis.def...
In this file you may need to modify one line...
_analysis_always_output One may need to put a semicolon before this line...


Now cd to libtheora directory
Search for dynamic solution file and compile it...
Don't forget to read the readme file and set the versions of both libogg and libvorbis in the corresponding .vsprops files...

Also one file lib/theora.def might be missing so get it from this location http://svn.xiph.org/trunk/theora/lib/theora.def

Now enter the ptypes folder and create a static multi-threaded library...
for this.. there are multiple solution files so pick ptypes_lib and compile and build it... Check for generated static lib in output folder...

In project settings.. make sure that in configuration properties... it is set to static lib
and C++/code generation is set to "multithreaded dll"

Now follow the instruction on the "theoraplugin" compilation web page and copy all the includes, dll and lib files to appropriate locations...
also copy ogremain.lib and ceguibase.lib files to appropriate folder in TheoraVideoPLugin folders lib directory...

Now change the project setting and include the Ogre_home/include location as well...
Mine looks like this... for all for solution files ....
..\..\TheoraVideoPlugin\include;..\include;"$(OGRE_HOME)\include";"$(OGRE_HOME)\samples\include"

Now theoraplugin dll will be ready after compiling....

Now to run the demos in demos/player folder...
Check the properties...
Change the resources.cfg file.... put it at appropriate location..
points to media folder at appropriate place...
Change the plugins.cfg file and get TheoraVideoPlugin and other dlls like libogg, libhteora and libvorbis..
Run the application... Debug a little and read the log files generated ...

Hopefully this will make your things work....

Will refine this draft later... SJ

No comments:

Post a Comment