Horde3D

Next-Generation Graphics Engine
It is currently 22.11.2024, 07:26

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 25.07.2008, 20:03 
Offline

Joined: 23.06.2008, 10:23
Posts: 21
Location: Sweden
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.


Top
 Profile  
Reply with quote  
PostPosted: 28.07.2008, 21:19 
Offline

Joined: 05.07.2008, 21:12
Posts: 26
Maybe in case someone create a fork, and you are using a DLL? And the game work with both Horde3D and its forks?


Top
 Profile  
Reply with quote  
PostPosted: 28.07.2008, 22:24 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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

_________________
Tristam MacDonald - [swiftcoding]


Last edited by swiftcoder on 29.07.2008, 00:42, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 28.07.2008, 22:51 
Offline

Joined: 23.06.2008, 10:23
Posts: 21
Location: Sweden
Yeah swiftcoder, that could come in very handy.


Top
 Profile  
Reply with quote  
PostPosted: 03.08.2008, 02:22 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group