try to rebuild fewer files when svn version changes

This commit is contained in:
zeromus 2009-12-04 06:49:24 +00:00
parent ccf7dfb10c
commit d5382702c2
10 changed files with 112 additions and 74 deletions

View File

@ -4,12 +4,14 @@ General/Core:
bug: emulate keypad interrupt
bug: fix dma address reloading
bug: fix rom close memory corruption
bug: fix div and sqrt busy flag bug
Graphics:
bug: fix a mistakenly rendered OBJ window
Windows:
bug: fix 16bpp display
bug: more fixes to multi-gamepads
enh: add EPX and EPX1.5X resize filters
0.9.4 -> 0.9.5 (r2437-r3075)

View File

@ -52,7 +52,7 @@ libdesmume_a_SOURCES = \
cheatSystem.cpp cheatSystem.h \
texcache.cpp texcache.h rasterize.cpp rasterize.h \
metaspu/metaspu.cpp metaspu/metaspu.h \
version.h
version.cpp version.h
if HAVE_ALSA
libdesmume_a_SOURCES += mic_alsa.cpp

View File

@ -167,7 +167,7 @@ void MovieRecord::dump(MovieData* md, EMUFILE* fp, int index)
MovieData::MovieData()
: version(MOVIE_VERSION)
, emuVersion(DESMUME_VERSION_NUMERIC)
, emuVersion(EMU_DESMUME_VERSION_NUMERIC())
, romChecksum(0)
, rerecordCount(0)
, binaryFlag(false)

View File

@ -983,7 +983,7 @@ bool savestate_save(EMUFILE* outstream, int compressionLevel)
outstream->fseek(0,SEEK_SET);
outstream->fwrite(magic,16);
write32le(SAVESTATE_VERSION,outstream);
write32le(DESMUME_VERSION_NUMERIC,outstream); //desmume version
write32le(EMU_DESMUME_VERSION_NUMERIC(),outstream); //desmume version
write32le(len,outstream); //uncompressed length
write32le(comprlen,outstream); //compressed length (-1 if it is not compressed)

92
desmume/src/version.cpp Normal file
View File

@ -0,0 +1,92 @@
/* 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
*/
#include <types.h>
//todo - everyone will want to support this eventually, i suppose
#ifdef _MSC_VER
#include "svnrev.h"
#else
#ifdef SVN_REV
#define SVN_REV_STR SVN_REV
#else
#define SVN_REV_STR ""
#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
#ifndef ENABLE_SSE2
#ifndef ENABLE_SSE
#define DESMUME_CPUEXT_STRING " NOSSE"
#else
#define DESMUME_CPUEXT_STRING " NOSSE2"
#endif
#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 90600
#define DESMUME_VERSION_STRING " " "0.9.6" DESMUME_SUBVERSION_STRING DESMUME_FEATURE_STRING DESMUME_PLATFORM_STRING DESMUME_CPUEXT_STRING DESMUME_COMPILER
#define DESMUME_NAME_AND_VERSION " " DESMUME_NAME DESMUME_VERSION_STRING
u32 EMU_DESMUME_VERSION_NUMERIC() { return DESMUME_VERSION_NUMERIC; }
const char* EMU_DESMUME_VERSION_STRING() { return DESMUME_VERSION_STRING; }
const char* EMU_DESMUME_NAME_AND_VERSION() { return DESMUME_NAME_AND_VERSION; }
const char* EMU_DESMUME_COMPILER_DETAIL() { return DESMUME_COMPILER_DETAIL; }

View File

@ -17,70 +17,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <string>
#include <types.h>
//todo - everyone will want to support this eventually, i suppose
#ifdef _MSC_VER
#include "svnrev.h"
#else
#ifdef SVN_REV
#define SVN_REV_STR SVN_REV
#else
#define SVN_REV_STR ""
#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
#ifndef ENABLE_SSE2
#ifndef ENABLE_SSE
#define DESMUME_CPUEXT_STRING " NOSSE"
#else
#define DESMUME_CPUEXT_STRING " NOSSE2"
#endif
#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 90600
#define DESMUME_VERSION_STRING " " "0.9.6" DESMUME_SUBVERSION_STRING DESMUME_FEATURE_STRING DESMUME_PLATFORM_STRING DESMUME_CPUEXT_STRING DESMUME_COMPILER
#define DESMUME_NAME_AND_VERSION " " DESMUME_NAME DESMUME_VERSION_STRING
u32 EMU_DESMUME_VERSION_NUMERIC();
const char* EMU_DESMUME_VERSION_STRING();
const char* EMU_DESMUME_NAME_AND_VERSION();
const char* EMU_DESMUME_COMPILER_DETAIL();

View File

@ -87,8 +87,8 @@ BOOL CALLBACK AboutBox_Proc (HWND dialog, UINT message,WPARAM wparam,LPARAM lpar
{
char buf[2048];
memset(buf, 0, sizeof(buf));
wsprintf(buf, "version %s", DESMUME_VERSION_STRING DESMUME_COMPILER_DETAIL);
SetDlgItemText(dialog, IDC_TXT_VERSION, buf);
std::string version = (std::string)"version " + EMU_DESMUME_VERSION_STRING() + EMU_DESMUME_COMPILER_DETAIL();
SetDlgItemText(dialog, IDC_TXT_VERSION, version.c_str());
memset(buf, 0, sizeof(buf));
wsprintf(buf, "compiled: %s %s", __DATE__,__TIME__);

View File

@ -1654,6 +1654,10 @@
RelativePath="..\types.h"
>
</File>
<File
RelativePath="..\version.cpp"
>
</File>
<File
RelativePath="..\version.h"
>

View File

@ -78,7 +78,7 @@ void OpenConsole()
*stderr = *fp;
memset(buf,0,256);
sprintf(buf,"%s OUTPUT", DESMUME_NAME_AND_VERSION);
sprintf(buf,"%s OUTPUT", EMU_DESMUME_NAME_AND_VERSION());
SetConsoleTitle(TEXT(buf));
csize.X = 60;
csize.Y = 800;
@ -91,7 +91,7 @@ void OpenConsole()
SetConsoleCP(GetACP());
SetConsoleOutputCP(GetACP());
if(attached) printlog("\n");
printlog("%s\n",DESMUME_NAME_AND_VERSION);
printlog("%s\n",EMU_DESMUME_NAME_AND_VERSION());
printlog("- compiled: %s %s\n\n",__DATE__,__TIME__);

View File

@ -2292,7 +2292,7 @@ int _main()
SetProcessAffinityMask(GetCurrentProcess(),1);
MainWindow = new WINCLASS(CLASSNAME, hAppInst);
if (!MainWindow->create(DESMUME_NAME_AND_VERSION, WndX, WndY, video.width,video.height+video.screengap,
if (!MainWindow->create((char*)EMU_DESMUME_NAME_AND_VERSION(), WndX, WndY, video.width,video.height+video.screengap,
WS_CAPTION| WS_SYSMENU | WS_SIZEBOX | WS_MINIMIZEBOX | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
NULL))
{