vs200x: print svn revision number in version string.

This commit is contained in:
gocha 2009-10-08 13:48:15 +00:00
parent 449d62e0a8
commit 493e086850
22 changed files with 97 additions and 9 deletions

View File

@ -6,6 +6,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "types.h" #include "types.h"
#include "version.h"
#include "fceu.h" #include "fceu.h"
#include "driver.h" #include "driver.h"

View File

@ -29,6 +29,7 @@
#include "sdl-opengl.h" #include "sdl-opengl.h"
#include "../common/vidblit.h" #include "../common/vidblit.h"
#include "../../fceu.h" #include "../../fceu.h"
#include "../../version.h"
#include "sdl-icon.h" #include "sdl-icon.h"
#include "dface.h" #include "dface.h"

View File

@ -21,6 +21,7 @@
#include "../common/cheat.h" #include "../common/cheat.h"
#include "../../fceu.h" #include "../../fceu.h"
#include "../../movie.h" #include "../../movie.h"
#include "../../version.h"
#ifdef _S9XLUA_H #ifdef _S9XLUA_H
#include "../../fceulua.h" #include "../../fceulua.h"
#endif #endif

View File

@ -1,3 +1,4 @@
#include "../../version.h"
#include "common.h" #include "common.h"
#include "main.h" #include "main.h"
#include "window.h" #include "window.h"

View File

@ -21,6 +21,8 @@
// For commctrl.h below // For commctrl.h below
#define _WIN32_IE 0x0300 #define _WIN32_IE 0x0300
#include "../../version.h"
#include "common.h" #include "common.h"
#include "dinput.h" #include "dinput.h"
#include <windows.h> #include <windows.h>

View File

@ -35,6 +35,7 @@
#include <fstream> #include <fstream>
#include "../../version.h"
#include "../../types.h" #include "../../types.h"
#include "../../fceu.h" #include "../../fceu.h"
#include "../../state.h" #include "../../state.h"

View File

@ -1,3 +1,4 @@
#include "../../version.h"
#include "common.h" #include "common.h"
#include "main.h" #include "main.h"
#include "window.h" #include "window.h"

View File

@ -1,4 +1,5 @@
#include "common.h" #include "common.h"
#include "../../version.h"
#include "../../state.h" #include "../../state.h"
#include <string> #include <string>
#include <string.h> #include <string.h>

View File

@ -28,6 +28,7 @@
#include "../../file.h" #include "../../file.h"
#include "../../debug.h" #include "../../debug.h"
#include "../../asm.h" #include "../../asm.h"
#include "../../version.h"
#include "cdlogger.h" #include "cdlogger.h"
#include "tracer.h" #include "tracer.h"
#include "memview.h" #include "memview.h"

View File

@ -24,6 +24,7 @@
#include "../../input.h" #include "../../input.h"
#include "../../state.h" #include "../../state.h"
#include "../../cheat.h" //adelikat: For FCEU_LoadGameCheats() #include "../../cheat.h" //adelikat: For FCEU_LoadGameCheats()
#include "../../version.h"
#include "window.h" #include "window.h"
#include "main.h" #include "main.h"
#include "state.h" #include "state.h"

View File

@ -9,6 +9,7 @@
#include <stdarg.h> #include <stdarg.h>
#include "version.h"
#include "types.h" #include "types.h"
#include "utils/endian.h" #include "utils/endian.h"
#include "palette.h" #include "palette.h"

View File

@ -1,3 +1,4 @@
#include "version.h"
#include "types.h" #include "types.h"
#include "fceu.h" #include "fceu.h"
#include "driver.h" #include "driver.h"

View File

@ -29,6 +29,7 @@
#include <vector> #include <vector>
#include <fstream> #include <fstream>
#include "version.h"
#include "types.h" #include "types.h"
#include "x6502.h" #include "x6502.h"
#include "fceu.h" #include "fceu.h"

View File

@ -22,11 +22,6 @@
#ifndef __FCEU_TYPES #ifndef __FCEU_TYPES
#define __FCEU_TYPES #define __FCEU_TYPES
#define FCEU_NAME "FCEUX"
#define FCEU_VERSION_STRING "2.1.2-interim"
#define FCEU_VERSION_NUMERIC 21020
#define FCEU_NAME_AND_VERSION FCEU_NAME " " FCEU_VERSION_STRING
///causes the code fragment argument to be compiled in if the build includes debugging ///causes the code fragment argument to be compiled in if the build includes debugging
#ifdef FCEUDEF_DEBUGGER #ifdef FCEUDEF_DEBUGGER
#define DEBUG(X) X; #define DEBUG(X) X;

65
src/version.h Normal file
View File

@ -0,0 +1,65 @@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2001 Aaron Oneal
* Copyright (C) 2002 Xodnizel
*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __FCEU_VERSION
#define __FCEU_VERSION
//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 FCEU_NAME "FCEUX"
#define FCEU_FEATURE_STRING ""
#ifdef _DEBUG
#define FCEU_SUBVERSION_STRING " debug"
#elif defined(PUBLIC_RELEASE)
#define FCEU_SUBVERSION_STRING ""
#else
#define FCEU_SUBVERSION_STRING "-interim svn" SVN_REV_STR
#endif
#if defined(_MSC_VER)
#define FCEU_COMPILER ""
#define FCEU_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 FCEU_COMPILER ""
#define FCEU_COMPILER_DETAIL ""
#endif
#define FCEU_VERSION_NUMERIC 21020
#define FCEU_VERSION_STRING "2.1.2" FCEU_SUBVERSION_STRING FCEU_FEATURE_STRING FCEU_COMPILER
#define FCEU_NAME_AND_VERSION FCEU_NAME " " FCEU_VERSION_STRING
#endif

View File

@ -0,0 +1,2 @@
defaultconfig\SubWCRev.exe ..\.. ".\defaultconfig\svnrev_template.h" ".\userconfig\svnrev.h"
exit 0

Binary file not shown.

View File

@ -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"

View File

@ -0,0 +1,2 @@
#define SVN_REV $WCREV$
#define SVN_REV_STR "$WCREV$"

1
vc/userconfig/readme.txt Normal file
View File

@ -0,0 +1 @@
see the defaultconfig directory for more information on what this is all about

View File

@ -27,6 +27,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="defaultconfig\SubWCRev.bat"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -43,7 +44,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include" AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include;userconfig;defaultconfig"
PreprocessorDefinitions="WIN32;_DEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H" PreprocessorDefinitions="WIN32;_DEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -195,6 +196,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="defaultconfig\SubWCRev.bat"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -215,7 +217,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include" AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include;userconfig;defaultconfig"
PreprocessorDefinitions="WIN32;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H" PreprocessorDefinitions="WIN32;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H"
RuntimeLibrary="0" RuntimeLibrary="0"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"

View File

@ -28,6 +28,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="defaultconfig\SubWCRev.bat"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -44,7 +45,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include" AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include;userconfig;defaultconfig"
PreprocessorDefinitions="WIN32;_DEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H" PreprocessorDefinitions="WIN32;_DEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
@ -193,6 +194,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="defaultconfig\SubWCRev.bat"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
@ -213,7 +215,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include" AdditionalIncludeDirectories="../src/drivers/win/zlib;../src/drivers/win/directx;../src;../src/drivers/win/lua/include;userconfig;defaultconfig"
PreprocessorDefinitions="WIN32;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H" PreprocessorDefinitions="WIN32;NDEBUG;MSVC;_CRT_SECURE_NO_DEPRECATE;_WIN32_WINDOWS=0x0410;WINVER=0x0410;NETWORK;LSB_FIRST;_USE_32BIT_TIME_T;FCEUDEF_DEBUGGER;_USE_SHARED_MEMORY_;NOMINMAX;LUA_BUILD_AS_DLL;HAS_vsnprintf;_S9XLUA_H"
RuntimeLibrary="0" RuntimeLibrary="0"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"