diff --git a/src/config.cpp b/src/config.cpp index 28d6701f..233cb9d4 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -6,6 +6,7 @@ #include #include "types.h" +#include "version.h" #include "fceu.h" #include "driver.h" diff --git a/src/drivers/sdl/sdl-video.cpp b/src/drivers/sdl/sdl-video.cpp index 7e58436a..079c1ac2 100644 --- a/src/drivers/sdl/sdl-video.cpp +++ b/src/drivers/sdl/sdl-video.cpp @@ -29,6 +29,7 @@ #include "sdl-opengl.h" #include "../common/vidblit.h" #include "../../fceu.h" +#include "../../version.h" #include "sdl-icon.h" #include "dface.h" diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index 800ba816..b89ac57d 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -21,6 +21,7 @@ #include "../common/cheat.h" #include "../../fceu.h" #include "../../movie.h" +#include "../../version.h" #ifdef _S9XLUA_H #include "../../fceulua.h" #endif diff --git a/src/drivers/win/directories.cpp b/src/drivers/win/directories.cpp index 4319c3ae..538284c7 100644 --- a/src/drivers/win/directories.cpp +++ b/src/drivers/win/directories.cpp @@ -1,3 +1,4 @@ +#include "../../version.h" #include "common.h" #include "main.h" #include "window.h" diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp index 17344779..a1b45c5b 100644 --- a/src/drivers/win/input.cpp +++ b/src/drivers/win/input.cpp @@ -21,6 +21,8 @@ // For commctrl.h below #define _WIN32_IE 0x0300 +#include "../../version.h" + #include "common.h" #include "dinput.h" #include diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index 067210e7..bb3785f8 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -35,6 +35,7 @@ #include +#include "../../version.h" #include "../../types.h" #include "../../fceu.h" #include "../../state.h" diff --git a/src/drivers/win/palette.cpp b/src/drivers/win/palette.cpp index e1e534a5..b7b917d4 100644 --- a/src/drivers/win/palette.cpp +++ b/src/drivers/win/palette.cpp @@ -1,3 +1,4 @@ +#include "../../version.h" #include "common.h" #include "main.h" #include "window.h" diff --git a/src/drivers/win/state.cpp b/src/drivers/win/state.cpp index 741121fe..f4fd87a7 100644 --- a/src/drivers/win/state.cpp +++ b/src/drivers/win/state.cpp @@ -1,4 +1,5 @@ #include "common.h" +#include "../../version.h" #include "../../state.h" #include #include diff --git a/src/drivers/win/tracer.cpp b/src/drivers/win/tracer.cpp index f67e93a9..93d9117d 100644 --- a/src/drivers/win/tracer.cpp +++ b/src/drivers/win/tracer.cpp @@ -28,6 +28,7 @@ #include "../../file.h" #include "../../debug.h" #include "../../asm.h" +#include "../../version.h" #include "cdlogger.h" #include "tracer.h" #include "memview.h" diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index d4ef61fb..fc28a324 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -24,6 +24,7 @@ #include "../../input.h" #include "../../state.h" #include "../../cheat.h" //adelikat: For FCEU_LoadGameCheats() +#include "../../version.h" #include "window.h" #include "main.h" #include "state.h" diff --git a/src/movie.cpp b/src/movie.cpp index 5228d1f7..e6c86ca5 100644 --- a/src/movie.cpp +++ b/src/movie.cpp @@ -9,6 +9,7 @@ #include +#include "version.h" #include "types.h" #include "utils/endian.h" #include "palette.h" diff --git a/src/oldmovie.cpp b/src/oldmovie.cpp index 8121e271..1b415b56 100644 --- a/src/oldmovie.cpp +++ b/src/oldmovie.cpp @@ -1,3 +1,4 @@ +#include "version.h" #include "types.h" #include "fceu.h" #include "driver.h" diff --git a/src/state.cpp b/src/state.cpp index 7a6a0f48..b0835988 100644 --- a/src/state.cpp +++ b/src/state.cpp @@ -29,6 +29,7 @@ #include #include +#include "version.h" #include "types.h" #include "x6502.h" #include "fceu.h" diff --git a/src/types.h b/src/types.h index 88d7a764..2520235e 100644 --- a/src/types.h +++ b/src/types.h @@ -22,11 +22,6 @@ #ifndef __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 #ifdef FCEUDEF_DEBUGGER #define DEBUG(X) X; diff --git a/src/version.h b/src/version.h new file mode 100644 index 00000000..b831f141 --- /dev/null +++ b/src/version.h @@ -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 diff --git a/vc/defaultconfig/SubWCRev.bat b/vc/defaultconfig/SubWCRev.bat new file mode 100644 index 00000000..07fb657a --- /dev/null +++ b/vc/defaultconfig/SubWCRev.bat @@ -0,0 +1,2 @@ +defaultconfig\SubWCRev.exe ..\.. ".\defaultconfig\svnrev_template.h" ".\userconfig\svnrev.h" +exit 0 \ No newline at end of file diff --git a/vc/defaultconfig/SubWCRev.exe b/vc/defaultconfig/SubWCRev.exe new file mode 100644 index 00000000..e46e23d2 Binary files /dev/null and b/vc/defaultconfig/SubWCRev.exe differ diff --git a/vc/defaultconfig/svnrev.h b/vc/defaultconfig/svnrev.h new file mode 100644 index 00000000..e2669fba --- /dev/null +++ b/vc/defaultconfig/svnrev.h @@ -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" \ No newline at end of file diff --git a/vc/defaultconfig/svnrev_template.h b/vc/defaultconfig/svnrev_template.h new file mode 100644 index 00000000..d7a944d4 --- /dev/null +++ b/vc/defaultconfig/svnrev_template.h @@ -0,0 +1,2 @@ +#define SVN_REV $WCREV$ +#define SVN_REV_STR "$WCREV$" \ No newline at end of file diff --git a/vc/userconfig/readme.txt b/vc/userconfig/readme.txt new file mode 100644 index 00000000..39031a77 --- /dev/null +++ b/vc/userconfig/readme.txt @@ -0,0 +1 @@ +see the defaultconfig directory for more information on what this is all about \ No newline at end of file diff --git a/vc/vc8_fceux.vcproj b/vc/vc8_fceux.vcproj index ed31ed3f..41f1a7c0 100644 --- a/vc/vc8_fceux.vcproj +++ b/vc/vc8_fceux.vcproj @@ -27,6 +27,7 @@ >