core: move all desmume version #defines to version.h so that less stuff depends on it;
win32: add svn revision detection and print it in console and title etc.
This commit is contained in:
parent
caf0952774
commit
a2897ac198
|
@ -31,6 +31,7 @@
|
||||||
#include "rtc.h"
|
#include "rtc.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "mic.h"
|
#include "mic.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
bool freshMovie = false; //True when a movie loads, false when movie is altered. Used to determine if a movie has been altered since opening
|
bool freshMovie = false; //True when a movie loads, false when movie is altered. Used to determine if a movie has been altered since opening
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "render3D.h"
|
#include "render3D.h"
|
||||||
#include "cp15.h"
|
#include "cp15.h"
|
||||||
#include "GPU_osd.h"
|
#include "GPU_osd.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "memorystream.h"
|
#include "memorystream.h"
|
||||||
#include "readwrite.h"
|
#include "readwrite.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* Copyright (C) 2005 Guillaume Duhamel
|
/* Copyright (C) 2005 Guillaume Duhamel
|
||||||
|
Copyright (C) 2008-2009 DeSmuME team
|
||||||
|
|
||||||
This file is part of DeSmuME
|
This file is part of DeSmuME
|
||||||
|
|
||||||
|
@ -14,7 +15,7 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with DeSmuME; if not, write to the Free Software
|
along with DeSmuME; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef TYPES_HPP
|
#ifndef TYPES_HPP
|
||||||
|
@ -22,65 +23,15 @@
|
||||||
|
|
||||||
//todo - everyone will want to support this eventually, i suppose
|
//todo - everyone will want to support this eventually, i suppose
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include "config.h"
|
#include "svnrev.h"
|
||||||
|
#else
|
||||||
|
#define SVN_REV_STR ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
#define NOSSE2
|
#define NOSSE2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DESMUME_NAME "DeSmuME"
|
|
||||||
|
|
||||||
#ifdef _WIN64
|
|
||||||
#define DESMUME_PLATFORM_STRING " x64"
|
|
||||||
#else
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define DESMUME_PLATFORM_STRING " x86"
|
|
||||||
#else
|
|
||||||
#define DESMUME_PLATFORM_STRING ""
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NOSSE2
|
|
||||||
#define DESMUME_CPUEXT_STRING " NOSSE2"
|
|
||||||
#else
|
|
||||||
#define DESMUME_CPUEXT_STRING ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEVELOPER
|
|
||||||
#define DESMUME_FEATURE_STRING " dev+"
|
|
||||||
#else
|
|
||||||
#define DESMUME_FEATURE_STRING ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define DESMUME_SUBVERSION_STRING " debug"
|
|
||||||
#elif defined(PUBLIC_RELEASE)
|
|
||||||
#define DESMUME_SUBVERSION_STRING ""
|
|
||||||
#else
|
|
||||||
#define DESMUME_SUBVERSION_STRING " svn"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __INTEL_COMPILER
|
|
||||||
#define DESMUME_COMPILER " (Intel) "
|
|
||||||
#define DESMUME_COMPILER_DETAIL " (Intel) "
|
|
||||||
#elif defined(_MSC_VER)
|
|
||||||
#define DESMUME_COMPILER ""
|
|
||||||
#define DESMUME_COMPILER_DETAIL " msvc " _Py_STRINGIZE(_MSC_VER)
|
|
||||||
#define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
|
|
||||||
#define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
|
|
||||||
#define _Py_STRINGIZE2(X) #X
|
|
||||||
//re: http://72.14.203.104/search?q=cache:HG-okth5NGkJ:mail.python.org/pipermail/python-checkins/2002-November/030704.html+_msc_ver+compiler+version+string&hl=en&gl=us&ct=clnk&cd=5
|
|
||||||
#else
|
|
||||||
// TODO: make for others compilers
|
|
||||||
#define DESMUME_COMPILER ""
|
|
||||||
#define DESMUME_COMPILER_DETAIL ""
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DESMUME_VERSION_NUMERIC 90300
|
|
||||||
#define DESMUME_VERSION_STRING " " "0.9.3" DESMUME_SUBVERSION_STRING DESMUME_FEATURE_STRING DESMUME_PLATFORM_STRING DESMUME_CPUEXT_STRING DESMUME_COMPILER
|
|
||||||
#define DESMUME_NAME_AND_VERSION " " DESMUME_NAME DESMUME_VERSION_STRING
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define strcasecmp(x,y) _stricmp(x,y)
|
#define strcasecmp(x,y) _stricmp(x,y)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
/* Copyright (C) 2009 DeSmuME team
|
||||||
|
|
||||||
|
This file is part of DeSmuME
|
||||||
|
|
||||||
|
DeSmuME is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
DeSmuME is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with DeSmuME; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
//todo - everyone will want to support this eventually, i suppose
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#include "svnrev.h"
|
||||||
|
#else
|
||||||
|
#define SVN_REV_STR ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DESMUME_NAME "DeSmuME"
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
#define DESMUME_PLATFORM_STRING " x64"
|
||||||
|
#else
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define DESMUME_PLATFORM_STRING " x86"
|
||||||
|
#else
|
||||||
|
#define DESMUME_PLATFORM_STRING ""
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef NOSSE2
|
||||||
|
#define DESMUME_CPUEXT_STRING " NOSSE2"
|
||||||
|
#else
|
||||||
|
#define DESMUME_CPUEXT_STRING ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEVELOPER
|
||||||
|
#define DESMUME_FEATURE_STRING " dev+"
|
||||||
|
#else
|
||||||
|
#define DESMUME_FEATURE_STRING ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#define DESMUME_SUBVERSION_STRING " debug"
|
||||||
|
#elif defined(PUBLIC_RELEASE)
|
||||||
|
#define DESMUME_SUBVERSION_STRING ""
|
||||||
|
#else
|
||||||
|
#define DESMUME_SUBVERSION_STRING " svn" SVN_REV_STR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __INTEL_COMPILER
|
||||||
|
#define DESMUME_COMPILER " (Intel) "
|
||||||
|
#define DESMUME_COMPILER_DETAIL " (Intel) "
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define DESMUME_COMPILER ""
|
||||||
|
#define DESMUME_COMPILER_DETAIL " msvc " _Py_STRINGIZE(_MSC_VER)
|
||||||
|
#define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
|
||||||
|
#define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
|
||||||
|
#define _Py_STRINGIZE2(X) #X
|
||||||
|
//re: http://72.14.203.104/search?q=cache:HG-okth5NGkJ:mail.python.org/pipermail/python-checkins/2002-November/030704.html+_msc_ver+compiler+version+string&hl=en&gl=us&ct=clnk&cd=5
|
||||||
|
#else
|
||||||
|
// TODO: make for others compilers
|
||||||
|
#define DESMUME_COMPILER ""
|
||||||
|
#define DESMUME_COMPILER_DETAIL ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DESMUME_VERSION_NUMERIC 90300
|
||||||
|
#define DESMUME_VERSION_STRING " " "0.9.3" DESMUME_SUBVERSION_STRING DESMUME_FEATURE_STRING DESMUME_PLATFORM_STRING DESMUME_CPUEXT_STRING DESMUME_COMPILER
|
||||||
|
#define DESMUME_NAME_AND_VERSION " " DESMUME_NAME DESMUME_VERSION_STRING
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#include "AboutBox.h"
|
#include "AboutBox.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="shift_jis"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
|
@ -215,6 +215,7 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="defaultconfig\SubWCRev.exe . ".\defaultconfig\svnrev_template.h" ".\userconfig\svnrev.h""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="defaultconfig\SubWCRev.exe . ".\defaultconfig\svnrev_template.h" ".\userconfig\svnrev.h""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
@ -115,6 +116,7 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="defaultconfig\SubWCRev.exe . ".\defaultconfig\svnrev_template.h" ".\userconfig\svnrev.h""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
@ -207,6 +209,7 @@
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine="defaultconfig\SubWCRev.exe . ".\defaultconfig\svnrev_template.h" ".\userconfig\svnrev.h""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include "types.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////// Console
|
///////////////////////////////////////////////////////////////// Console
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,5 @@
|
||||||
|
//this should be overridden with one generated in userconfig
|
||||||
|
//but it is here just in case to prevent compiler errors
|
||||||
|
|
||||||
|
#define SVN_REV 0
|
||||||
|
#define SVN_REV_STR "0"
|
|
@ -0,0 +1,2 @@
|
||||||
|
#define SVN_REV $WCREV$
|
||||||
|
#define SVN_REV_STR "$WCREV$"
|
|
@ -34,6 +34,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
|
#include "version.h"
|
||||||
#include "CWindow.h"
|
#include "CWindow.h"
|
||||||
#include "../MMU.h"
|
#include "../MMU.h"
|
||||||
#include "../armcpu.h"
|
#include "../armcpu.h"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
see the defaultconfig directory for more information on what this is all about
|
Loading…
Reference in New Issue