Page 1 of 1

autotools build fix/ogre render samples fix

Posted: Fri Jun 22, 2007 11:44
by ldb
i have provided a link to a patch that fixes the build system in trunk and fixes some other issues. the problem was that the new tree stuff hadnt been added to any Makefile.am files. the object files for the tree code wasnt being linked, and the headers were not being installed. i fixed all this in the patch.

another thing i did in the patch was upgrade the ogre cegui samples to use ois 1.0. i added some macros into acinclude.m4. essentially what happens is when the user wants to build the samples with ogre enabled, it checks for ois using the pkg-config m4 macros. after configure determines if everything is needed to build the ogre renderer samples, it will then check if OIS was found. if it was not, then the entire ogre renderer samples build will be disabled.

i had to make a small change to:
WindowRenderSets/Falagard/src/FalTree.cpp, and
Samples/datafiles/schemes/TaharezLook.scheme.

the scheme file was loading a font which caused problems with one of the demos (it complained the font was being loaded twice, i think it was the FontDemo). the change did not affect the other demos.

ois patch:
http://www.puresimplicity.net/~ldb/ois.patch

makefile patch:
http://www.puresimplicity.net/~ldb/makefile.patch

patch to fix small bug in samples taharezlook.scheme:
http://www.puresimplicity.net/~ldb/taharazlook.scheme.patch

Re: linux patch

Posted: Sat Jun 23, 2007 14:41
by ldb
ldb wrote:i have provided a link to a patch that fixes the build system in trunk and fixes some other issues. the problem was that the new tree stuff hadnt been added to any Makefile.am files. the object files for the tree code wasnt being linked, and the headers were not being installed. i fixed all this in the patch.

another thing i did in the patch was upgrade the ogre cegui samples to use ois 1.0. i added some macros into acinclude.m4. essentially what happens is when the user wants to build the samples with ogre enabled, it checks for ois using the pkg-config m4 macros. after configure determines if everything is needed to build the ogre renderer samples, it will then check if OIS was found. if it was not, then the entire ogre renderer samples build will be disabled.

i had to make a small change to:
WindowRenderSets/Falagard/src/FalTree.cpp, and
Samples/datafiles/schemes/TaharezLook.scheme.

the scheme file was loading a font which caused problems with one of the demos (it complained the font was being loaded twice, i think it was the FontDemo). the change did not affect the other demos.

http://www.puresimplicity.net/~ldb/linux.patch


just wondering -- is anyone reading this stuff that has commit access to the repository?

its a much needed fix that i highly suggest applying. im not trying to be pushy or anything, im just wondering if anyone is interested, if they think its a problem, etc. any kind of response is welcome.

oh, and to be more clear, its not specifically related to linux. its the autotools build system that is fixed.

also, the cegui ogre renderer samples wont work unless you are using ogre 1.2 or below. they wont even compile since they reference old ogre header files when it had an input system. the OIS addition will work with any version of ogre im sure.

Posted: Sat Jun 23, 2007 15:28
by scriptkid
Hi,

patches like these are highly appreciated, thank you! I will forward the message to teammember(s) who have cegui running on linux. I still am busy setting up a linux box myself.

Posted: Sat Jun 23, 2007 16:12
by ldb
scriptkid wrote:Hi,

patches like these are highly appreciated, thank you! I will forward the message to teammember(s) who have cegui running on linux. I still am busy setting up a linux box myself.


cool, thank you!

i was a long time (8 years) linux user/developer before switching to windows. i just installed linux the other day and decided to get all this stuff up and running when i discovered the problems. ive done quite a bit of hacking on projects which use autotools in the pastl; im pretty comfortable with the entire process.

thanks again!

Posted: Fri Jul 06, 2007 16:14
by bull
ldb: thakyou for the patch! I've been trying to compile CEGUI from the svn source and was having problems. It was just luck I found your patch (maintainers: commit this please!).

I still have problem compiling Demo8 (errors below), presumably the difference is that I have Lua installed and you don't? With ./configure --disable-samples everything compiles, and my app works.

Code: Select all

/home/pypgcm/svn/cegui/trunk/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `CEGUI::ScriptWindowHelper::getWindow(CEGUI::String&)'
/home/pypgcm/svn/cegui/trunk/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `CEGUI::ScriptWindowHelper::ScriptWindowHelper(CEGUI::Window*)'
/home/pypgcm/svn/cegui/trunk/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `CEGUI::ScriptWindowHelper::getWindow()'

Posted: Fri Jul 06, 2007 16:17
by ldb
bull wrote:ldb: thakyou for the patch! I've been trying to compile CEGUI from the svn source and was having problems. It was just luck I found your patch (maintainers: commit this please!).

I still have problem compiling Demo8 (errors below), presumably the difference is that I have Lua installed and you don't? With ./configure --disable-samples everything compiles, and my app works.

Code: Select all

/home/pypgcm/svn/cegui/trunk/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `CEGUI::ScriptWindowHelper::getWindow(CEGUI::String&)'
/home/pypgcm/svn/cegui/trunk/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `CEGUI::ScriptWindowHelper::ScriptWindowHelper(CEGUI::Window*)'
/home/pypgcm/svn/cegui/trunk/ScriptingModules/CEGUILua/LuaScriptModule/src/.libs/libCEGUILuaScriptModule.so: undefined reference to `CEGUI::ScriptWindowHelper::getWindow()'


hmm, i will investigate that. looks like i missed something.

glad i could help.

Posted: Fri Jul 06, 2007 17:00
by bull
This could be my fault actually -- I'm compiling against Lua 5.1.2 which CEGUI doesn't ostensibly support. I'll let you know if the problem persists after I've done a bit more digging. This thread: http://www.cegui.org.uk/phpBB2/viewtopic.php?p=12416 mentions what I've done.

Posted: Fri Jul 06, 2007 19:48
by bull
OK, here's what was missing, just one line from src/Makefile.am:

Code: Select all

@@ -42,6 +42,7 @@
                       CEGUISchemeManager.cpp \
                       CEGUIScheme_xmlHandler.cpp \
                       CEGUIScriptModule.cpp \
+                      CEGUIScriptWindowHelper.cpp \
                       CEGUISize.cpp \
                       CEGUIString.cpp \
                       CEGUISubscriberSlot.cpp \

Posted: Fri Jul 06, 2007 20:08
by ldb
bull wrote:OK, here's what was missing, just one line from src/Makefile.am:

Code: Select all

@@ -42,6 +42,7 @@
                       CEGUISchemeManager.cpp \
                       CEGUIScheme_xmlHandler.cpp \
                       CEGUIScriptModule.cpp \
+                      CEGUIScriptWindowHelper.cpp \
                       CEGUISize.cpp \
                       CEGUIString.cpp \
                       CEGUISubscriberSlot.cpp \


ive made a new patch and included your addition. thanks.

this patch is just a patch for the makefiles, and FalTree.cpp. FalTree.cpp barfed on gcc, and with this change compiles on both vs2005 and gcc.

http://www.puresimplicity.net/~ldb/makefile.patch

could somebody please apply this patch before it gets forgotten, lost, whatever...

Posted: Sat Jul 07, 2007 09:11
by scriptkid
Okay i have applied the patch from your last post :) Do i still need the OIS one from your first post? Just to be sure.

Thanks again!

Posted: Sun Jul 08, 2007 15:13
by ldb
scriptkid wrote:Okay i have applied the patch from your last post :) Do i still need the OIS one from your first post? Just to be sure.

Thanks again!


thanks.

i updated my first post. it now has a link to the ois.patch, and the makefile.patch.

all that needs done now is to apply the ois.patch, and the taharezlook.scheme patch.

this will update the CEGuiOgreBaseApplication to use OIS.

the other patch fixes a bug in the Samples/datafiles/schemes/TaharezLook.scheme where its loading a default font and this causes problems with the font demo sample. appears its not necessary to load that commonwealth font in a scheme i guess. im not entirely sure. but, it makes all the demos work.

ive noticed the TabControl sample still bombs out with the following error:

WindowManager::getWindow - A Window object with the name 'TabControlDemo/TabControl' does not exist within the system

this should probably be fixed at some point. but im not sure how to fix it at the moment.

here are the 2 new patches:

http://www.puresimplicity.net/~ldb/ois.patch
http://www.puresimplicity.net/~ldb/taha ... heme.patch

i checked out a fresh svn trunk and these 2 patches will apply cleanly to the current source (revision 1479).

the only thing that might be left to do is update the premake scripts to use ois in the visual studio samples projects. if i manage to do this, i will submit another patch.

thank you scriptkid.

Posted: Mon Jul 16, 2007 16:56
by ldb
any word on the ois patch? someone recently came on irc and couldnt build the samples with ogre support, due to the old ogre input code.

Posted: Mon Jul 16, 2007 19:58
by scriptkid
Sorry! :oops: I have applied the OIS patch, but svn seems not accessible right now. I'll keep trying...

Posted: Wed Aug 08, 2007 19:05
by scriptkid
The patch is in and the references to the (apparently new) svn URL have been updated.