/[pcsx2_0.9.7]/trunk/pcsx2/SysForwardDefs.h
ViewVC logotype

Contents of /trunk/pcsx2/SysForwardDefs.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 290 - (show annotations) (download)
Sat Dec 25 02:51:30 2010 UTC (9 years ago) by william
File MIME type: text/plain
File size: 3467 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4139 local: v0.9.7.283-latest) in ./trunk
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 #pragma once
17
18 static const int PCSX2_VersionHi = 0;
19 static const int PCSX2_VersionMid = 9;
20 static const int PCSX2_VersionLo = 7;
21
22 class SysCoreThread;
23 class CpuInitializerSet;
24
25 struct Game_Data;
26 // BEGIN: SUPPORT FOR LOCAL VERSIONING
27 #include "svnrev.h"
28 #include <wx/wx.h>
29 static const int PCSX2_UPSTREAM_REVISION=4139;
30 static const int PCSX2_LOCAL_REVISION=SVN_REV;
31 static const char* PCSX2_LOCAL_TAG="latest";
32 __forceinline const char* _PCSX2_PRODUCT_VERSION() {
33 int version_size = (strlen("0.0.0"));
34 char majorBuffer[255];
35 char minorBuffer[255];
36 char buildBuffer[255];
37 char* MAJOR = itoa(PCSX2_VersionHi,majorBuffer,10);
38 char* MINOR = itoa(PCSX2_VersionMid,minorBuffer,10);
39 char* BUILD = itoa(PCSX2_VersionLo,buildBuffer,10);
40 char* ret = (char*)malloc(version_size);
41 for (int i=0; i<version_size; i++) {
42 ret[i] = 0; // Initialize all elements to zero.
43 }
44 strcat(ret,MAJOR);
45 strcat(ret,".");
46 strcat(ret,MINOR);
47 strcat(ret,".");
48 strcat(ret,BUILD);
49 return ret;
50 }
51 __forceinline const char* _PCSX2_UPSTREAM_VERSION() {
52 int version_size = (strlen("0.0.0.0000"));
53 char buffer[255];
54 char* REVISION = itoa(PCSX2_UPSTREAM_REVISION,buffer,10);
55 char* ret = (char*)malloc(version_size);
56 for (int i=0; i<version_size; i++) {
57 ret[i] = 0; // Initialize all elements to zero.
58 }
59 strcat(ret,_PCSX2_PRODUCT_VERSION());
60 strcat(ret,".");
61 strcat(ret,REVISION);
62 return ret;
63 }
64 __forceinline const char* _PCSX2_LOCAL_VERSION() {
65 int version_size = (strlen("0.0.0.0000-") + strlen(PCSX2_LOCAL_TAG));
66 char buffer[255];
67 char* REVISION = itoa(PCSX2_LOCAL_REVISION,buffer,10);
68 char* ret = (char*)malloc(version_size);
69 for (int i=0; i<version_size; i++) {
70 ret[i] = 0; // Initialize all elements to zero.
71 }
72 strcat(ret,_PCSX2_PRODUCT_VERSION());
73 strcat(ret,".");
74 strcat(ret,REVISION);
75 if ( PCSX2_LOCAL_TAG != "" ) { strcat(ret,"-"); strcat(ret,PCSX2_LOCAL_TAG); }
76 return ret;
77 }
78 __forceinline const char* _PCSX2_FULL_VERSION() {
79 int version_size = (strlen("v0.0.0.0000 (v0.0.0.0000-") + strlen(PCSX2_LOCAL_TAG) + strlen(")"));
80 char* ret = (char*)malloc(version_size);
81 for (int i=0; i<version_size; i++) {
82 ret[i] = 0; // Initialize all elements to zero.
83 }
84 strcat(ret,"v");
85 strcat(ret,_PCSX2_UPSTREAM_VERSION());
86 strcat(ret," (");
87 strcat(ret,"v");
88 strcat(ret,_PCSX2_LOCAL_VERSION());
89 strcat(ret,")");
90 return ret;
91 }
92 #define PCSX2_PRODUCT_VERSION() (const char*)_PCSX2_PRODUCT_VERSION()
93 #define PCSX2_UPSTREAM_VERSION() (const char*)_PCSX2_UPSTREAM_VERSION()
94 #define PCSX2_LOCAL_VERSION() (const char*)_PCSX2_LOCAL_VERSION()
95 #define PCSX2_FULL_VERSION() (const char*)_PCSX2_FULL_VERSION()
96 #define wxPCSX2_FULL_VERSION() wxString(wxString::FromAscii(PCSX2_FULL_VERSION()))
97 // END: SUPPORT FOR LOCAL VERSIONING

  ViewVC Help
Powered by ViewVC 1.1.22