versioning scheme

Ludwig Nussel ludwig.nussel at suse.de
Sat Nov 19 10:08:23 EST 2005


Hi,

- XQF uses the first bytes of the version cvar to detect the actual
  type of a server that speaks the q3 query protocol. Since ioQ3 !=
  Q3 that doesn't work with this project. If other (Q3 compatible)
  projects use the same designation scheme detecting Q3 becomes
  impossible.

- claiming we are the official successor of Q3 by continuing the
  version scheme of Q3 is probably a bit arrogant (1.32 -> 1.33).

- the pk3 files stay the same as on 1.32, so the game in fact is
  still Q3 1.32

I therefore like to propose to use a new versioning scheme in a new
namespace, e.g. "icculus.org/quake3 0.1" or "ioquake3 0.1". The
latter would be file system friendlier.

cu
Ludwig

Index: code/unix/Makefile
===================================================================
--- code/unix/Makefile	(Revision 367)
+++ code/unix/Makefile	(Arbeitskopie)
@@ -83,10 +83,6 @@
 JPDIR=$(MOUNT_DIR)/jpeg-6
 SPLNDIR=$(MOUNT_DIR)/splines
 
-# extract version info
-VERSION=$(shell grep Q3_VERSION ../qcommon/q_shared.h | \
-  sed -e 's/.*Q3\ \(.*\)"/\1/')
-
 #############################################################################
 # SETUP AND BUILD -- LINUX
 #############################################################################
Index: code/qcommon/q_shared.h
===================================================================
--- code/qcommon/q_shared.h	(Revision 367)
+++ code/qcommon/q_shared.h	(Arbeitskopie)
@@ -26,7 +26,8 @@
 // q_shared.h -- included first by ALL program modules.
 // A user mod should never modify this file
 
-#define	Q3_VERSION		"ioQ3 1.33"
+#define	Q3_VERSION		"Q3 1.32b"
+#define	Q3DERIVATE_VERSION	"icculus.org/quake3 0.1"
 // 1.32 released 7-10-2002
 
 #define MAX_TEAMNAME 32
Index: code/qcommon/qcommon.h
===================================================================
--- code/qcommon/qcommon.h	(Revision 367)
+++ code/qcommon/qcommon.h	(Arbeitskopie)
@@ -828,6 +828,8 @@
 
 void Com_TouchMemory( void );
 
+const char* Com_Q3Version( void );
+
 // commandLine should not include the executable name (argv[0])
 void Com_Init( char *commandLine );
 void Com_Frame( void );
Index: code/qcommon/common.c
===================================================================
--- code/qcommon/common.c	(Revision 367)
+++ code/qcommon/common.c	(Arbeitskopie)
@@ -2351,17 +2351,20 @@
 }
 #endif
 
+const char* Com_Q3Version(void)
+{
+	return Q3_VERSION " " PLATFORM_STRING " " __DATE__ " (" Q3DERIVATE_VERSION 
")";
+}
 
+
 /*
 =================
 Com_Init
 =================
 */
 void Com_Init( char *commandLine ) {
-	char	*s;
+	Com_Printf( "%s\n", Com_Q3Version());
 
-	Com_Printf( "%s %s %s\n", Q3_VERSION, PLATFORM_STRING, __DATE__ );
-
 	if ( setjmp (abortframe) ) {
 		Sys_Error ("Error during initialization");
 	}
@@ -2467,8 +2470,7 @@
 	Cmd_AddCommand ("changeVectors", MSG_ReportChangeVectors_f );
 	Cmd_AddCommand ("writeconfig", Com_WriteConfig_f );
 
-	s = va("%s %s %s", Q3_VERSION, PLATFORM_STRING, __DATE__ );
-	com_version = Cvar_Get ("version", s, CVAR_ROM | CVAR_SERVERINFO );
+	com_version = Cvar_Get ("version", Com_Q3Version(), CVAR_ROM | 
CVAR_SERVERINFO );
 
 	Sys_Init();
 	Netchan_Init( Com_Milliseconds() & 0xffff );	// pick a port value that 
should be nice and random
Index: code/client/cl_console.c
===================================================================
--- code/client/cl_console.c	(Revision 367)
+++ code/client/cl_console.c	(Arbeitskopie)
@@ -586,6 +586,7 @@
 //	qhandle_t		conShader;
 	int				currentColor;
 	vec4_t			color;
+	const char ver[] = Q3_VERSION " (" Q3DERIVATE_VERSION ") ";
 
 	lines = cls.glconfig.vidHeight * frac;
 	if (lines <= 0)
@@ -618,13 +619,13 @@
 
 	re.SetColor( g_color_table[ColorIndex(COLOR_RED)] );
 
-	i = strlen( Q3_VERSION );
+	i = strlen( ver );
 
 	for (x=0 ; x<i ; x++) {
 
 		SCR_DrawSmallChar( cls.glconfig.vidWidth - ( i - x ) * SMALLCHAR_WIDTH, 
 
-			(lines-(SMALLCHAR_HEIGHT+SMALLCHAR_HEIGHT/2)), Q3_VERSION[x] );
+			(lines-(SMALLCHAR_HEIGHT+SMALLCHAR_HEIGHT/2)), ver[x] );
 
 	}
 
-- 
 (o_   Ludwig Nussel
 //\   SUSE LINUX Products GmbH, Development
 V_/_  http://www.suse.de/





More information about the quake3 mailing list