Horde3D
http://horde3d.org/forums/

getVersionString() behavior
http://horde3d.org/forums/viewtopic.php?f=8&t=447
Page 1 of 1

Author:  Fidora [ 25.07.2008, 20:03 ]
Post subject:  getVersionString() behavior

I don't see why getVersionString should include "Horde3D", I can only see disadvantages with it.
But please enlighten me if there are any reasons for this behavior.

Author:  speeder [ 28.07.2008, 21:19 ]
Post subject:  Re: getVersionString() behavior

Maybe in case someone create a fork, and you are using a DLL? And the game work with both Horde3D and its forks?

Author:  swiftcoder [ 28.07.2008, 22:24 ]
Post subject:  Re: getVersionString() behavior

Fidora wrote:
I don't see why getVersionString should include "Horde3D", I can only see disadvantages with it.
But please enlighten me if there are any reasons for this behavior.
The version string is meant to be human-readable, so not much reason leave it out (apart from localisation issues).

However, I do think we need a setup to detect versions at both compile time and run time, or we wont be able to account for differing versions very well. Something like this:
Code:
#define HORDE3D_MAJOR 1
#define HORDE3D_MINOR 0
#define HORDE3D_PATCH 0

struct Horde3d_version {
   char major;
   char minor;
   char patch;
};

// fill out a version structure at compile time
#define HORDE3D_COMPILED_VERSION(version) { \
version.major = HORDE3D_MAJOR; \
version.minor = HORDE3D_MINOR; \
version.patch = HORDE3D_PATCH; \
}

// fill out a version structure at run time
void Horde3d::version(Horde3d_version &version) {
version.major = HORDE3D_MAJOR;
version.minor = HORDE3D_MINOR;
version.patch = HORDE3D_PATCH;
}
Which would allow us to make sure at run time that we are using the same version we were compiled against.
*note that this scheme is lifted pretty much verbatim from GNU

Author:  Fidora [ 28.07.2008, 22:51 ]
Post subject:  Re: getVersionString() behavior

Yeah swiftcoder, that could come in very handy.

Author:  DDd [ 03.08.2008, 02:22 ]
Post subject:  Re: getVersionString() behavior

Hum... what about embedding the Revision number from svn (local or original). That way would have a more meaningful value as we would have a log of all the changes and fixes applied to that branch, instead of just a couple of numbers that have little significance. Just a thought, i have actually never done this, but does not sound like a bad idea at 2.20 AM

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/