Patch for Ogre 1.8.0

Patch for Ogre 1.8.0

Postby Smilex » 21 Sep 2012, 18:54

Here is the patch, which should make the code Ogre 1.8.0 compatible. It's a small change, but useful.
Note that I've only tested this on my machine, which runs Gentoo Linux, amd64.
Also, the patch does remove the code that loads the OpenDungeonsEditorToolBox.layout file, because it doesn't exist, and I'm using the most recent GIT and SVN versions of OpenDungeons. Feel free to look in the file called Gui.cpp, in the source/ folder, and uncomment the line that mentions that file.

EDIT: I'm not allowed to upload the patch to the forums. I assume it's because this is my first post on these forums, so for now just copy the paste of the file found at this link http://sprunge.us/cCHB
EDIT2: Ok, I have now been approved as legit user here, but I still can't upload the patch file, so the link is the only way to get it currently.
Smilex
 
Posts: 8
Joined: 21 Sep 2012, 18:39

Re: Patch for Ogre 1.8.0

Postby oln » 22 Sep 2012, 19:50

Using this would cause compilation to fail with ogre 1.7 which is still the newest in the official repos for ubuntu (untill 12.10 in 3 weeks)/fedora/openSUSE. Though I don't know how many people here that would affect, so I suppose I could merge it in.

As for the layout file, I don't think it's actually being used, so it's probably fine to comment it out.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Patch for Ogre 1.8.0

Postby Smilex » 22 Sep 2012, 20:15

Ok, then I made a mistake by merging the Ogre 1.8.0 changes into the development branch, should have kept it as a separate branch and then merge it in when everyone had talked about it. I hope it won't cause problems with patches in the future, I try to keep branches pretty separate.
Smilex
 
Posts: 8
Joined: 21 Sep 2012, 18:39

Re: Patch for Ogre 1.8.0

Postby charlie » 22 Sep 2012, 20:25

You should branch the revision before you merged then (so have a legacy Ogre 1.7 branch if anybody wants to maintain it).
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Patch for Ogre 1.8.0

Postby oln » 22 Sep 2012, 20:43

Smilex {l Wrote}:Ok, then I made a mistake by merging the Ogre 1.8.0 changes into the development branch, should have kept it as a separate branch and then merge it in when everyone had talked about it. I hope it won't cause problems with patches in the future, I try to keep branches pretty separate.

Nah, it's probably okay, it's a fast thing to fix anyhow if anyone should have issues with it.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: Patch for Ogre 1.8.0

Postby amuzen » 22 Sep 2012, 21:24

You can support both versions of Ogre relatively easily with preprocessor hacks:

{l Code}: {l Select All Code}
#if OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 8


I guess I was lucky because I only needed to do it in one place in LoS, but I think this patch is still short enough to make it a feasible approach until users have migrated. Of course, you could alternatively tell Ubuntu users to use the Ogre PPA, but it will give you some headaches if you distribute the game through your own PPA. Integrating the patch in some form is probably a good idea regardless because at least Arch has already dropped 1.7 completely, from what I have heard.
User avatar
amuzen
LoS Moderator
 
Posts: 327
Joined: 05 Dec 2009, 02:49

Re: Patch for Ogre 1.8.0

Postby Smilex » 22 Sep 2012, 21:47

And how is that going to work with the name changes from 1.7.0 to 1.8.0 ?
For example Ogre::Singleton<T>::ms_Singleton is now called msSingleton.
Smilex
 
Posts: 8
Joined: 21 Sep 2012, 18:39

Who is online

Users browsing this forum: No registered users and 1 guest