aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMax Horn2006-04-08 11:36:49 +0000
committerMax Horn2006-04-08 11:36:49 +0000
commit4572d0ba16b36bead1c02ec07b5c7ff357e0bc95 (patch)
tree6b12a6aab16319f1b7ac7ac13c7a902040c7c7d4 /base
parent8cf8acfd633227a55d794d39219c25b6b269d146 (diff)
downloadscummvm-rg350-4572d0ba16b36bead1c02ec07b5c7ff357e0bc95.tar.gz
scummvm-rg350-4572d0ba16b36bead1c02ec07b5c7ff357e0bc95.tar.bz2
scummvm-rg350-4572d0ba16b36bead1c02ec07b5c7ff357e0bc95.zip
Moved version vars from base/main.cpp to base/version.cpp; thus now version.o is always rebuilt on every change, not main.o
svn-id: r21687
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp84
-rw-r--r--base/module.mk3
-rw-r--r--base/version.cpp110
3 files changed, 112 insertions, 85 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 6256da4f5b..2b3ecfabb3 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -33,7 +33,6 @@
#include "base/engine.h"
#include "base/gameDetector.h"
#include "base/plugins.h"
-#include "base/internal_version.h"
#include "base/version.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -59,89 +58,6 @@
#include "gui/Actions.h"
#endif
-/*
- * Version string and build date string. These can be used by anything that
- * wants to display this information to the user (e.g. about dialog).
- *
- * Note: it would be very nice if we could instead of (or in addition to) the
- * build date present a date which corresponds to the date our source files
- * were last changed. To understand the difference, imagine that a user
- * makes a checkout of CVS on January 1, then after a week compiles it
- * (e.g. after doing a 'make clean'). The build date then will say January 8
- * even though the files were last changed on January 1.
- *
- * Another problem is that __DATE__/__TIME__ depend on the local time zone.
- *
- * It's clear that such a "last changed" date would be much more useful to us
- * for feedback purposes. After all, when somebody files a bug report, we
- * don't care about the build date, we want to know which date their checkout
- * was made. This is even more important now since anon CVS lags a few
- * days behind developer CVS.
- *
- * So, how could we implement this? At least on unix systems, a special script
- * could do it. Basically, that script would run over all .cpp/.h files and
- * parse the CVS 'Header' keyword we have in our file headers.
- * That line contains a date/time in GMT. Now, the script just has to collect
- * all these times and find the latest. This time then would be inserted into
- * a header file or so (common/date.h ?) which engine.cpp then could
- * include and put into a global variable analog to gScummVMBuildDate.
- *
- * Drawback: scanning all source/header files will be rather slow. Also, this
- * only works on systems which can run powerful enough scripts (so I guess
- * Visual C++ would be out of the game here? don't know VC enough to be sure).
- *
- * Another approach would be to somehow get CVS to update a global file
- * (e.g. LAST_CHANGED) whenever any checkins are made. That would be
- * faster and work w/o much "logic" on the client side, in particular no
- * scripts have to be run. The problem with this is that I am not even
- * sure it's actually possible! Modifying files during commit time is trivial
- * to setup, but I have no idea if/how one can also change files which are not
- * currently being commit'ed.
- */
-const char *gScummVMVersion = SCUMMVM_VERSION;
-const char *gScummVMBuildDate = __DATE__ " " __TIME__;
-const char *gScummVMVersionDate = SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
-const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
-const char *gScummVMFeatures = ""
-#ifdef USE_TREMOR
- "Tremor "
-#else
-#ifdef USE_VORBIS
- "Vorbis "
-#endif
-#endif
-
-#ifdef USE_FLAC
- "FLAC "
-#endif
-
-#ifdef USE_MAD
- "MP3 "
-#endif
-
-#ifdef USE_ALSA
- "ALSA "
-#endif
-
-#ifdef USE_ZLIB
- "zLib "
-#endif
-
-#ifdef USE_MPEG2
- "MPEG2 "
-#endif
-
-#ifdef USE_FLUIDSYNTH
- "FluidSynth "
-#endif
-
-#ifdef __SYMBIAN32__
-// we want a list of compiled in engines visible in the program,
-// because we also release special builds with only one engine
-#include "backends/symbian/src/main_features.inl"
-#endif
- ;
-
/** List all supported game IDs, i.e. all games which any loaded plugin supports. */
void listGames() {
const PluginList &plugins = PluginManager::instance().getPlugins();
diff --git a/base/module.mk b/base/module.mk
index 07b9a64453..36abe7d7a1 100644
--- a/base/module.mk
+++ b/base/module.mk
@@ -4,7 +4,8 @@ MODULE_OBJS := \
engine.o \
gameDetector.o \
main.o \
- plugins.o
+ plugins.o \
+ version.o
MODULE_DIRS += \
base
diff --git a/base/version.cpp b/base/version.cpp
new file mode 100644
index 0000000000..e10806e265
--- /dev/null
+++ b/base/version.cpp
@@ -0,0 +1,110 @@
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2001 Ludvig Strigeus
+ * Copyright (C) 2001-2006 The ScummVM project
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id: main.cpp 21627 2006-04-05 06:58:18Z sev $
+ *
+ */
+
+#include "common/stdafx.h"
+#include "base/internal_version.h"
+#include "base/version.h"
+
+/*
+ * Version string and build date string. These can be used by anything that
+ * wants to display this information to the user (e.g. about dialog).
+ *
+ * Note: it would be very nice if we could instead of (or in addition to) the
+ * build date present a date which corresponds to the date our source files
+ * were last changed. To understand the difference, imagine that a user
+ * makes a checkout of CVS on January 1, then after a week compiles it
+ * (e.g. after doing a 'make clean'). The build date then will say January 8
+ * even though the files were last changed on January 1.
+ *
+ * Another problem is that __DATE__/__TIME__ depend on the local time zone.
+ *
+ * It's clear that such a "last changed" date would be much more useful to us
+ * for feedback purposes. After all, when somebody files a bug report, we
+ * don't care about the build date, we want to know which date their checkout
+ * was made. This is even more important now since anon CVS lags a few
+ * days behind developer CVS.
+ *
+ * So, how could we implement this? At least on unix systems, a special script
+ * could do it. Basically, that script would run over all .cpp/.h files and
+ * parse the CVS 'Header' keyword we have in our file headers.
+ * That line contains a date/time in GMT. Now, the script just has to collect
+ * all these times and find the latest. This time then would be inserted into
+ * a header file or so (common/date.h ?) which engine.cpp then could
+ * include and put into a global variable analog to gScummVMBuildDate.
+ *
+ * Drawback: scanning all source/header files will be rather slow. Also, this
+ * only works on systems which can run powerful enough scripts (so I guess
+ * Visual C++ would be out of the game here? don't know VC enough to be sure).
+ *
+ * Another approach would be to somehow get CVS to update a global file
+ * (e.g. LAST_CHANGED) whenever any checkins are made. That would be
+ * faster and work w/o much "logic" on the client side, in particular no
+ * scripts have to be run. The problem with this is that I am not even
+ * sure it's actually possible! Modifying files during commit time is trivial
+ * to setup, but I have no idea if/how one can also change files which are not
+ * currently being commit'ed.
+ */
+const char *gScummVMVersion = SCUMMVM_VERSION;
+const char *gScummVMBuildDate = __DATE__ " " __TIME__;
+const char *gScummVMVersionDate = SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
+const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")";
+const char *gScummVMFeatures = ""
+#ifdef USE_TREMOR
+ "Tremor "
+#else
+#ifdef USE_VORBIS
+ "Vorbis "
+#endif
+#endif
+
+#ifdef USE_FLAC
+ "FLAC "
+#endif
+
+#ifdef USE_MAD
+ "MP3 "
+#endif
+
+#ifdef USE_ALSA
+ "ALSA "
+#endif
+
+#ifdef USE_ZLIB
+ "zLib "
+#endif
+
+#ifdef USE_MPEG2
+ "MPEG2 "
+#endif
+
+#ifdef USE_FLUIDSYNTH
+ "FluidSynth "
+#endif
+
+#ifdef __SYMBIAN32__
+// we want a list of compiled in engines visible in the program,
+// because we also release special builds with only one engine
+#include "backends/symbian/src/main_features.inl"
+#endif
+ ;
+