[Patch] OgreNewt on Linux

pjcast

06-05-2006 01:00:31

Sorry if I missed the obvious, the only real topic that came up when searching for this on Linux was a suggestion that it would make compiling on OSX easier.. and that was Mar 05.

So, I am curious if there has been any attempts, headeway, problems, or difficulties that have prevented the porting of OgreNewt over?

If nothing that is know about, I have been playing around with CodeBlocks (I like it better then Autotools on Linux, though it has some caveats).. Anyway, I could take a crack at creating a CB project to build this on Linux..

pjcast

06-05-2006 01:17:00

I am in the process now of doing the project files.. Though, something that may present a problem.. The boost headers inside your indlude directory. I suggest you move them to a directory outside that one, and set the VC project paths accordingly, as, you will run into conflicts if those headers are outof date with the default ones installed on peoples systems.. And, there is no way to selectively not use those headers in the linux build.. Short of having the user deleting that directory, which is an option, but it's usually most peoples habbit to just try to build a project without readding doc's.

pjcast

06-05-2006 02:02:28

Ok, well, after some work, and some minor tweaks, I have managed to get OgreNewt.so o build. As for if it runs, that is another day of testing :) (I just started the process of building my WGE engine on Linux).

http://www.wreckedgames.com/files/ogren ... tch.tar.gz - This is the patch file (generated from a fresh developer checkout of OgreNewt) and the two OgreNewt CD files, placed in their proper directories. THe patch was generated from within the ogrenewt dir.

The changes were:
Replace all newton.h to Newton.h
_cdecl to _CDECL
Add some newlines at end of files (to remove that annoying warning)
(I had to add an include to Newton.h - for size_t, not really part of this patch)
Thats about it I think...

It builds and installs to ~/libs (/home/whateveruser/libs)

pjcast

06-05-2006 04:31:56

Oh, and two things I just noticed.

First, a simple fix to OgreNewt.h: change OgreNewt_Raycast.h to OgreNewt_RayCast.h

And, i commented out the BascFrameListener.h from that file to (and, I did not include that file in the CodeBlcoks project).. As, it seems to depend on an Ogre File (ExampleFramelistener), when, I think it should just inheirit from Ogre::FrameListener. So, anyway, it appeared not to be used anywhere, so I just left it out, and anyone who needs it can fix it :)

walaber

06-05-2006 07:25:24

thanks for your work pjcast. I will try and take a look at this this weekend, and get some of this into the CVS... it would be great if OgreNewt came linux-ready...

pjcast

06-05-2006 17:13:24

I imagine it should run fine, as the changes were just small issues relating to paths, and case sensitive names really.. I am almost ready to test it (not thouroughly, but to make sure it at least loads and does not blow up) as my engine is just about ported over... I just got it compiling (had some serious Squirrel Script Issues).

If I had more time, I would make sure to provide a project file for all the OgreNewt demos, but alas, I do not at the moment. It should not be too hard to do those. I typically do not use the import VC project files, I just take the an already created cbp (codeblock project file) copy it, rename it, and edit the XML itself to remove all the previous files, and alter the project name. Then, add it to the workspace, and edit the target/compiler/linker settings. I find this to be the easiest, and creates less subtle errors.

pjcast

06-05-2006 17:16:13

Oh, and, I'm not exactly sure what this define is for: _OGRENEWT_DEBUGGER_DAGON
But, since I had some issues with the Lin32 class, I just set that define as defined in CodeBlocks.

walaber

06-05-2006 18:26:08

i had 2 versions of the debugger setup as compile-time defines... but if you update CVS or get the newest version from my website (as of yesterday night), the whole line3D thing has been completely removed, it now uses the dagon manualobject system exclusively.

pjcast

06-05-2006 21:48:27

I updated cvs, and only a couple merge conflicts with the OgreNewt_Debugger.cpp and .h. No big deal, i just reverted to the clean copy, and made the _CDECL changes. After that, everything still compiles good :)

I plan on testing it soon enough.. I'm in the process of trying to get my scanner to work at the moment.