/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta_reference/pcsx2/System.h
ViewVC logotype

Diff of /branch/r3113_0.9.7_beta_reference/pcsx2/System.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- branch/r3113_0.9.7_beta_reference/pcsx2/System.h	2010/09/13 17:18:05	173
+++ branch/r3113_0.9.7_beta_reference/pcsx2/System.h	2010/09/13 17:24:24	174
@@ -116,3 +116,75 @@
 	extern int	Assertion( const wxString& text, const wxString& stacktrace );
 }
 
+// BEGIN: SUPPORT FOR LOCAL VERSIONING
+#include "svnrev.h"
+#include <wx/wx.h>
+static const int PCSX2_UPSTREAM_REVISION=3113;
+static const int PCSX2_LOCAL_REVISION=SVN_REV;
+static const char* PCSX2_LOCAL_TAG="";
+__forceinline const char* _PCSX2_PRODUCT_VERSION() {
+	int version_size = (strlen("0.0.0"));
+	char majorBuffer[255];
+	char minorBuffer[255];
+	char buildBuffer[255];
+	char* MAJOR = itoa(PCSX2_VersionHi,majorBuffer,10);
+	char* MINOR = itoa(PCSX2_VersionMid,minorBuffer,10);
+	char* BUILD = itoa(PCSX2_VersionLo,buildBuffer,10);	
+	char* ret = (char*)malloc(version_size);
+	for (int i=0; i<version_size; i++) {
+			ret[i] = 0;    // Initialize all elements to zero.
+	}
+	strcat(ret,MAJOR);
+	strcat(ret,".");
+	strcat(ret,MINOR);
+	strcat(ret,".");
+	strcat(ret,BUILD);
+	return ret;
+}
+__forceinline const char* _PCSX2_UPSTREAM_VERSION() {
+	int version_size = (strlen("0.0.0.0000"));
+	char buffer[255];
+	char* REVISION = itoa(PCSX2_UPSTREAM_REVISION,buffer,10);
+	char* ret = (char*)malloc(version_size);
+	for (int i=0; i<version_size; i++) {
+			ret[i] = 0;    // Initialize all elements to zero.
+	}
+	strcat(ret,_PCSX2_PRODUCT_VERSION());
+	strcat(ret,".");
+	strcat(ret,REVISION);
+	return ret;
+}
+__forceinline const char* _PCSX2_LOCAL_VERSION() {
+	int version_size = (strlen("0.0.0.0000"));
+	char buffer[255];
+	char* REVISION = itoa(PCSX2_LOCAL_REVISION,buffer,10);
+	char* ret = (char*)malloc(version_size);
+	for (int i=0; i<version_size; i++) {
+			ret[i] = 0;    // Initialize all elements to zero.
+	}
+	strcat(ret,_PCSX2_PRODUCT_VERSION());
+	strcat(ret,".");
+	strcat(ret,REVISION);	
+	if ( PCSX2_LOCAL_TAG != "" ) { strcat(ret,"-"); strcat(ret,PCSX2_LOCAL_TAG); }	
+	return ret;
+}
+__forceinline const char* _PCSX2_FULL_VERSION() {
+	int version_size = (strlen("0.0.0.0000 (0.0.0.0000)"));
+	char* ret = (char*)malloc(version_size);
+	for (int i=0; i<version_size; i++) {
+			ret[i] = 0;    // Initialize all elements to zero.
+	}
+	strcat(ret,"v");
+	strcat(ret,_PCSX2_UPSTREAM_VERSION());
+	strcat(ret," (");
+	strcat(ret,"v");
+	strcat(ret,_PCSX2_LOCAL_VERSION());
+	strcat(ret,")");
+	return ret;
+}
+#define PCSX2_PRODUCT_VERSION() (const char*)_PCSX2_PRODUCT_VERSION()
+#define PCSX2_UPSTREAM_VERSION() (const char*)_PCSX2_UPSTREAM_VERSION()
+#define PCSX2_LOCAL_VERSION() (const char*)_PCSX2_LOCAL_VERSION()
+#define PCSX2_FULL_VERSION() (const char*)_PCSX2_FULL_VERSION()
+#define wxPCSX2_FULL_VERSION() wxString(wxString::FromAscii(PCSX2_FULL_VERSION()))
+// END: SUPPORT FOR LOCAL VERSIONING

 

  ViewVC Help
Powered by ViewVC 1.1.22