Linux Update

2 views
Skip to first unread message

Andy Miller

unread,
Jun 27, 2008, 7:34:42 PM6/27/08
to python-ogre...@googlegroups.com
So while I stated in a previous email that I would only focus on the Windows release of Python-Ogre I had some spare time (after I put out the last 1.2 release candidate) and have been looking at the Linux release/build...
 
All my testing is on a fresh Ubuntu 8.04 so things may not be as pretty on other systems..
 
My current recommendation is to use the updated instructions on the wiki (strangely enough :) ) ..
 
The only change to the instructions is that I'm recommending you use the latest SVN version of Python-Ogre which has been updated to work (again) on Linux.  Currently it builds using Ogre 1.4.9 (as I wanted to test first with this) which you can easily change to 1.7 SVN later if you want..
 
Libraries that currently build (on my system) are ogre, ois, quickgui, ogreforests, et, caelum, plib, noise, cadunetree and watermesh.
 
CEGUI isn't yet up and running (as I've change to 0.6 and need to update the patch file etc) but will probably be done in the next day or two
 
Please test and let me know if something is broken
 
Regard
Andy
 

Andy Miller

unread,
Jun 27, 2008, 9:50:05 PM6/27/08
to python-ogre...@googlegroups.com
CEGUI is now fixed and should work -- applied a patch form Tim Ansell that forces loading the base cegui library before loading the Python-Ogre CEGUI module..   And this will need some documentation at a later stage :)
 
Andy
 


 
2008/6/28 Andy Miller <nzmi...@gmail.com>:

dermont

unread,
Jun 28, 2008, 1:12:36 AM6/28/08
to Python Ogre Developers
From a quick look at the latest code generation for CEGUI0.60 it looks
as if you may have to update the hand_made_wrappers EventSet
subscription to include CEGUI::Tree and add a dynamic cast for
TreeEventArgs, e.g:

else if (dynamic_cast<CEGUI::TreeEventArgs
*>((CEGUI::EventArgs *)&args))

if (mMethod.length() > 0 )
boost::python::call_method<void>(mSubscriber,
mMethod.c_str(),
static_cast<const
CEGUI::TreeEventArgs&>(args) );

else
boost::python::call<void>(mSubscriber,
static_cast<const
CEGUI::TreeEventArgs&>(args) );

else if (dynamic_cast<CEGUI::WindowEventArgs
*>((CEGUI::EventArgs *)&args))
....



On Jun 28, 9:50 am, "Andy Miller" <nzmill...@gmail.com> wrote:
> CEGUI is now fixed and should work -- applied a patch form Tim Ansell that
> forces loading the base cegui library before loading the Python-Ogre CEGUI
> module..   And this will need some documentation at a later stage :)
>
> Andy
>
> 2008/6/28 Andy Miller <nzmill...@gmail.com>:
>
> > So while I stated in a previous email that I would only focus on the
> > Windows release of Python-Ogre I had some spare time (after I put out the
> > last 1.2 release candidate) and have been looking at the Linux
> > release/build...
>
> > All my testing is on a fresh Ubuntu 8.04 so things may not be as pretty on
> > other systems..
>
> > My current recommendation is to use the updated instructions on the wiki<http://wiki.python-ogre.org/index.php/LinuxBuildV2>(strangely enough :) ) ..
>
> > The only change to the instructions is that I'm recommending you use the
> > latest SVN version of Python-Ogre which has been updated to work (again) on
> > Linux.  Currently it builds using Ogre 1.4.9 (as I wanted to test first with
> > this) which you can easily change to 1.7 SVN later if you want..
>
> > Libraries that currently build (on my system) are *ogre, ois, quickgui,
> > ogreforests, et, caelum, plib, noise, cadunetree* and *watermesh*.

Andy Miller

unread,
Jun 28, 2008, 4:41:39 AM6/28/08
to python-ogre...@googlegroups.com
Thanks Dermont -- change is in the SVN

Andy

2008/6/28 dermont <dermo...@gmail.com>:

dermont

unread,
Jun 28, 2008, 6:25:55 AM6/28/08
to Python Ogre Developers
Sorry for not being specific. I think the the dynamic_cast for
TreeEventArgs needs to come before the dynamic_cast for
WindowEventArgs , otherwise TreeEventArgs is cast to a WindowEventArgs
and "treeItem" won't be available in the Event arguments.

class CEGUIEXPORT TreeEventArgs : public WindowEventArgs
{
public:
TreeEventArgs(Window* wnd) : WindowEventArgs(wnd) { treeItem = 0; }
TreeItem *treeItem;
};


On Jun 28, 4:41 pm, "Andy Miller" <nzmill...@gmail.com> wrote:
> Thanks Dermont -- change is in the SVN
>
> Andy
>
> 2008/6/28 dermont <dermontg...@gmail.com>:

Andy Miller

unread,
Jun 28, 2008, 8:10:36 AM6/28/08
to python-ogre...@googlegroups.com
Ah...  OK Will make the change tomorrow..

Andy

2008/6/28 dermont <dermo...@gmail.com>:

dermont

unread,
Jun 28, 2008, 1:55:10 PM6/28/08
to Python Ogre Developers
You will probably need to update the cegui gui media files for
cegui0.6.0 e.g. TaharezLook.looknfeel etc. I've a simple tree demo
with the media, I'll send to you tomorrow.

Also you can set the default parser in your build scripts with:
./configure ..... --with-default-xml-parser=TinyXMLParser
instead of:
CEGUI.System.setDefaultXMLParserName("TinyXMLParser")


On Jun 28, 8:10 pm, "Andy Miller" <nzmill...@gmail.com> wrote:
> Ah...  OK Will make the change tomorrow..
>
> Andy
>
> 2008/6/28 dermont <dermontg...@gmail.com>:

Andy Miller

unread,
Jun 28, 2008, 7:56:21 PM6/28/08
to python-ogre...@googlegroups.com
I think I'll move the CEGUI media files into Python-Ogre/demos/cegui/media (as I've done with other demo sets)...

Do you think I should include everything from CEGUI-0.6.0/Samples/datafiles, and should I retain the directory structure or flatten it into a single directory ????

Thanks

Andy


2008/6/29 dermont <dermo...@gmail.com>:

Tim Ansell

unread,
Jun 29, 2008, 1:46:23 AM6/29/08
to python-ogre...@googlegroups.com
On Sat, 2008-06-28 at 10:55 -0700, dermont wrote:
> You will probably need to update the cegui gui media files for
> cegui0.6.0 e.g. TaharezLook.looknfeel etc. I've a simple tree demo
> with the media, I'll send to you tomorrow.
>
> Also you can set the default parser in your build scripts with:
> ./configure ..... --with-default-xml-parser=TinyXMLParser
> instead of:
> CEGUI.System.setDefaultXMLParserName("TinyXMLParser")

The second option is preferable as it means you can use a CEGUI which
didn't have that option. Not being dependent on compile time options is
much more reliable.

This is also needed when we try and finish getting the debs and other
package options finished.

Tim 'Mithro' Ansell
PS Once I have a house and Internet I should hopefully have some time to
get back to doing the debs - but that could be a while.

dermont

unread,
Jun 29, 2008, 2:14:33 AM6/29/08
to Python Ogre Developers
>> Do you think I should include everything from CEGUI-0.6.0/Samples/datafiles,
and should I retain the directory structure or flatten it into a
single directory ????

If you retain the current directory structure the problem is that you
end up with 2 directories each with different versions of
TaharezLook.imageset/looknfeel/scheme files:

/media/gui - Ogre gui files (looknfeel no Tree)
/media/datafiles - Cegui gui files (looknfeel with Tree)


resources.cfg
--------------------
1) FileSystem=../media/gui

2) FileSystem=./datafiles
FileSystem=./datafiles/configs
FileSystem=./datafiles/imagesets
FileSystem=./datafiles/looknfeel
FileSystem=./datafiles/fonts
FileSystem=./datafiles/layouts
FileSystem=./datafiles/schemes

If you swap the the order of (1) and (2) in resources.cfg, ogre's
looknfeel is loaded and the ogre cegui demos run fine but tree demo
crashes:

In short you have several options:

a) update Ogre's gui media files

b) Remove ../media/gui from resources.cfg and override
_loadResources / _setUpResources to change the load order of Ogre's/
CEGUI's gui media:

ogre.ResourceGroupManager.getSingleton().addResourceLocation("../media/
gui", "FileSystem", "General", False)

c) Update the demos to use the TaharezLook.scheme, e.g

# Load Cegui Scheme

cegui.SchemeManager.getSingleton().loadScheme("TaharezLook.scheme")
self.system.setDefaultMouseCursor("TaharezLook", "MouseArrow")

SCHEME_FONT = {}

SCHEME_FONT['Commonwealth-10'] = "Commonwealth-10.font"
SCHEME_FONT['BlueHighway-12'] = "bluehighway-12.font"
SCHEME_FONT['BlueHighway-10'] = "bluehighway-10.font"
SCHEME_FONT['BlueHighway-8'] = "bluehighway-8.font"
for f in SCHEME_FONT.keys():
if not CEGUI.FontManager.getSingleton().isFontPresent(f):


CEGUI.FontManager.getSingleton().createFont(SCHEME_FONT[f])
self.system.setDefaultFont("BlueHighway-12")
....

d) As (c) and remove the /media/gui/*Taharez* files


If you are looking at compatibility for Cegui 0.50 / 0.60 then
probably retaining the cegui/ogre directory structure and (b)/(c) with
a flag to check for version of cegui in use is the way to go.


On Jun 29, 7:56 am, "Andy Miller" <nzmill...@gmail.com> wrote:
> I think I'll move the CEGUI media files into Python-Ogre/demos/cegui/media
> (as I've done with other demo sets)...
>
> Do you think I should include everything from CEGUI-0.6.0/Samples/datafiles,
> and should I retain the directory structure or flatten it into a single
> directory ????
>
> Thanks
>
> Andy
>
> 2008/6/29 dermont <dermontg...@gmail.com>:

dermont

unread,
Jun 29, 2008, 2:25:21 AM6/29/08
to Python Ogre Developers
>> The second option is preferable as it means you can use a CEGUI which
didn't have that option.

Don't really understand why that option is preferable. If you don't
specify "--with-default-xml-parser" then CEGUI will be built with
default XML Parser - ExpatParser.

Tim Ansell

unread,
Jun 29, 2008, 7:39:36 PM6/29/08
to python-ogre...@googlegroups.com
On Sat, 2008-06-28 at 23:25 -0700, dermont wrote:
> >> The second option is preferable as it means you can use a CEGUI which
> didn't have that option.
>
> Don't really understand why that option is preferable. If you don't
> specify "--with-default-xml-parser" then CEGUI will be built with
> default XML Parser - ExpatParser.

Nope, it will be built with the Xerces which is unable to handled CEGUI
XML GUI files (god knows why they support a parser which is unable to
handle their own format).

Forcing the default at run time is a lot more reliable for a wide
variety of CEGUI libraries (and is not dependent on the compile
configuration).

Tim 'Mithro' Ansell

dermont

unread,
Jun 30, 2008, 4:54:33 AM6/30/08
to Python Ogre Developers
Yes you are correct if Xerces is installed it will be the default
parser. With 0.6.0 setDefaultXMLParserName didn't work properly for
me. With the 0.6.1 release it works fine.

As for configuring with a default parser I don't think there is any
problem switching at run time. I don't use the build scripts so I'll
leave that to the developers to decide.

From:
http://www.cegui.org.uk/phpBB2/viewtopic.php?t=3344

Between the 0.5.0 and 0.6.0 releases the
System::setDefaultXMLParserName function was bastardised to perform a
function other than its intended purpose. This fix restores the
intended behaviour of setDefaultXMLParserName and adds functions for
setting the XML parser after System instantiation correctly.
Reply all
Reply to author
Forward
0 new messages