[Scummvm-cvs-logs] SF.net SVN: scummvm: [32710] residual/trunk
aquadran at users.sourceforge.net
aquadran at users.sourceforge.net
Sun Jun 15 16:28:42 CEST 2008
Revision: 32710
http://scummvm.svn.sourceforge.net/scummvm/?rev=32710&view=rev
Author: aquadran
Date: 2008-06-15 07:28:41 -0700 (Sun, 15 Jun 2008)
Log Message:
-----------
added version framework based on scummvm
Modified Paths:
--------------
residual/trunk/Makefile.common
residual/trunk/README
residual/trunk/dists/residual.rc
residual/trunk/engine/module.mk
Added Paths:
-----------
residual/trunk/dists/residual.rc.in
residual/trunk/engine/internal_version.h
residual/trunk/engine/internal_version.h.in
residual/trunk/engine/version.cpp
residual/trunk/engine/version.h
Property Changed:
----------------
residual/trunk/Makefile.common
residual/trunk/README
Modified: residual/trunk/Makefile.common
===================================================================
--- residual/trunk/Makefile.common 2008-06-15 13:22:18 UTC (rev 32709)
+++ residual/trunk/Makefile.common 2008-06-15 14:28:41 UTC (rev 32710)
@@ -44,6 +44,11 @@
DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS))
DEPFILES =
+# Make engine/version.o depend on all other object files. This way if anything is
+# changed, it causes version.cpp to be recompiled. This in turn ensures that
+# the build date in gResidualBuildDate is correct.
+engine/version.o: $(filter-out engine/libengine.a,$(OBJS))
+
# The build rule for the Residual executable
$(EXECUTABLE): $(OBJS)
$(CXX) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
@@ -85,7 +90,27 @@
# Create the files that depend on the version
######################################################################
+VERSION_FILES =
+#$(srcdir)/dists/iphone/Info.plist \
+#$(srcdir)/dists/macosx/Info.plist
+VERSION = $(shell cat "${srcdir}/engine/internal_version.h" | cut -d\" -f2)
+VER_MAJOR = $(shell echo $(VERSION) | cut -d. -f 1)
+VER_MINOR = $(shell echo $(VERSION) | cut -d. -f 2)
+VER_PATCH = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c1)
+VER_EXTRA = $(shell echo $(VERSION) | cut -d. -f 3 | cut -c2-)
+
+$(VERSION_FILES): %: %.in
+ @echo "Creating $@"
+ @cat $< | sed \
+ -e "s/@VER_MAJOR@/$(VER_MAJOR)/g" \
+ -e "s/@VER_MINOR@/$(VER_MINOR)/g" \
+ -e "s/@VER_PATCH@/$(VER_PATCH)/g" \
+ -e "s/@VER_EXTRA@/$(VER_EXTRA)/g" \
+ -e "s/@VERSION@/$(VERSION)/g" \
+ > $@
+
+
######################################################################
# Distribution settings
######################################################################
@@ -98,6 +123,7 @@
DISTNAME := residual-$(DISTVERSION)
DISTDIR := dist
+VERFILE := $(DISTDIR)/$(DISTNAME)/engine/internal_version.h
ifeq ($(shell svn stat $(srcdir) 2>&1 | grep "is not a working copy"),)
SVNROOT := $(srcdir)
@@ -105,6 +131,10 @@
SVNROOT := https://scummvm.svn.sourceforge.net/svnroot/scummvm/residual/trunk/
endif
+$(VERFILE): $(srcdir)/engine/internal_version.h
+ @$(RM_REC) $(DISTDIR)
+ @$(MKDIR) $(DISTDIR)
+ svn export $(SVNROOT) $(DISTDIR)/$(DISTNAME)
$(DISTDIR)/$(DISTNAME).tar.gz:
cd $(DISTDIR); tar zcf $(DISTNAME).tar.gz $(DISTNAME)
Property changes on: residual/trunk/Makefile.common
___________________________________________________________________
Name: svn:keywords
- Date Rev Author URL Id
+ Date Revision Author URL Id
Modified: residual/trunk/README
===================================================================
--- residual/trunk/README 2008-06-15 13:22:18 UTC (rev 32709)
+++ residual/trunk/README 2008-06-15 14:28:41 UTC (rev 32710)
@@ -1,5 +1,6 @@
-Residual: A LucasArts 3D game interpreter Version: 0.06a-CVS
-(C) 2003-2008 The ScummVM-Residual team Last Updated: 13 Jun 2008
+Residual: A LucasArts 3D game interpreter
+
+Last updated: $Date$
------------------------------------------------------------------------------
What is Residual?
Property changes on: residual/trunk/README
___________________________________________________________________
Name: svn:keywords
- Date Rev Author URL Id
+ Date Revision Author URL Id
Modified: residual/trunk/dists/residual.rc
===================================================================
--- residual/trunk/dists/residual.rc 2008-06-15 13:22:18 UTC (rev 32709)
+++ residual/trunk/dists/residual.rc 2008-06-15 14:28:41 UTC (rev 32710)
@@ -1,10 +1,14 @@
#include "winresrc.h"
-//IDI_ICON ICON DISCARDABLE "residual.ico"
+#if defined (__MINGW32__) || defined(__CYGWIN32__)
+//IDI_ICON ICON DISCARDABLE "icons/residual.ico"
+#else
+//IDI_ICON ICON DISCARDABLE "../../icons/residual.ico"
+#endif
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,0,0
- PRODUCTVERSION 0,0,0,0
+ FILEVERSION 0,0,6,0
+ PRODUCTVERSION 0,0,6,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -22,14 +26,14 @@
VALUE "Comments", "\0"
VALUE "CompanyName", "ScummVM-Residual\0"
VALUE "FileDescription", "http://www.scummvm.org/\0"
- VALUE "FileVersion", "SVN\0"
+ VALUE "FileVersion", "0.0.6svn\0"
VALUE "InternalName", "residual\0"
VALUE "LegalCopyright", "Copyright \xA9 2003-2008 The ScummVM-Residual\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "residual.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Residual\0"
- VALUE "ProductVersion", "SVN\0"
+ VALUE "ProductVersion", "0.0.6svn\0"
VALUE "SpecialBuild", "\0"
END
END
Added: residual/trunk/dists/residual.rc.in
===================================================================
--- residual/trunk/dists/residual.rc.in (rev 0)
+++ residual/trunk/dists/residual.rc.in 2008-06-15 14:28:41 UTC (rev 32710)
@@ -0,0 +1,44 @@
+#include "winresrc.h"
+
+#if defined (__MINGW32__) || defined(__CYGWIN32__)
+//IDI_ICON ICON DISCARDABLE "icons/residual.ico"
+#else
+//IDI_ICON ICON DISCARDABLE "../../icons/residual.ico"
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @VER_MAJOR@, at VER_MINOR@, at VER_PATCH@,0
+ PRODUCTVERSION @VER_MAJOR@, at VER_MINOR@, at VER_PATCH@,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "\0"
+ VALUE "CompanyName", "ScummVM-Residual\0"
+ VALUE "FileDescription", "http://www.scummvm.org/\0"
+ VALUE "FileVersion", "@VERSION@\0"
+ VALUE "InternalName", "residual\0"
+ VALUE "LegalCopyright", "Copyright \xA9 2003-2008 The ScummVM-Residual\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "residual.exe\0"
+ VALUE "PrivateBuild", "\0"
+ VALUE "ProductName", "Residual\0"
+ VALUE "ProductVersion", "@VERSION@\0"
+ VALUE "SpecialBuild", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
Property changes on: residual/trunk/dists/residual.rc.in
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: residual/trunk/engine/internal_version.h
===================================================================
--- residual/trunk/engine/internal_version.h (rev 0)
+++ residual/trunk/engine/internal_version.h 2008-06-15 14:28:41 UTC (rev 32710)
@@ -0,0 +1 @@
+#define RESIDUAL_VERSION "0.0.6svn"
Property changes on: residual/trunk/engine/internal_version.h
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author URL Id
Name: svn:eol-style
+ native
Added: residual/trunk/engine/internal_version.h.in
===================================================================
--- residual/trunk/engine/internal_version.h.in (rev 0)
+++ residual/trunk/engine/internal_version.h.in 2008-06-15 14:28:41 UTC (rev 32710)
@@ -0,0 +1 @@
+#define RESIDUAL_VERSION "@VERSION@"
Property changes on: residual/trunk/engine/internal_version.h.in
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author URL Id
Name: svn:eol-style
+ native
Modified: residual/trunk/engine/module.mk
===================================================================
--- residual/trunk/engine/module.mk 2008-06-15 13:22:18 UTC (rev 32709)
+++ residual/trunk/engine/module.mk 2008-06-15 14:28:41 UTC (rev 32710)
@@ -22,6 +22,7 @@
scene.o \
textobject.o \
textsplit.o \
+ version.o \
walkplane.o
# Include common rules
Added: residual/trunk/engine/version.cpp
===================================================================
--- residual/trunk/engine/version.cpp (rev 0)
+++ residual/trunk/engine/version.cpp 2008-06-15 14:28:41 UTC (rev 32710)
@@ -0,0 +1,58 @@
+/* Residual - Virtual machine to run LucasArts' 3D adventure games
+ *
+ * Residual is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the AUTHORS
+ * file distributed with this source distribution.
+
+ * This library 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
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#include "common/sys.h"
+#include "engine/internal_version.h"
+#include "engine/version.h"
+
+const char *gResidualVersion = RESIDUAL_VERSION;
+const char *gResidualBuildDate = __DATE__ " " __TIME__;
+const char *gResidualVersionDate = RESIDUAL_VERSION " (" __DATE__ " " __TIME__ ")";
+const char *gResidualFullVersion = "Residual " RESIDUAL_VERSION " (" __DATE__ " " __TIME__ ")";
+const char *gResidualFeatures = ""
+#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
+ ;
+
Property changes on: residual/trunk/engine/version.cpp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author URL Id
Name: svn:eol-style
+ native
Added: residual/trunk/engine/version.h
===================================================================
--- residual/trunk/engine/version.h (rev 0)
+++ residual/trunk/engine/version.h 2008-06-15 14:28:41 UTC (rev 32710)
@@ -0,0 +1,29 @@
+/* Residual - Virtual machine to run LucasArts' 3D adventure games
+ *
+ * Residual is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the AUTHORS
+ * file distributed with this source distribution.
+
+ * This library 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
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ * $URL$
+ * $Id$
+ */
+
+#ifndef BASE_VERSION_H
+#define BASE_VERSION_H
+
+extern const char *gResidualVersion; // e.g. "0.0.6"
+extern const char *gResidualBuildDate; // e.g. "2008-06-15"
+extern const char *gResidualVersionDate; // e.g. "0.0.6 (2008-06-15)"
+extern const char *gResidualFullVersion; // e.g. "Residual 0.0.6 (2008-06-15)"
+extern const char *gResidualFeatures; // e.g. "ALSA MPEG2 zLib"
+
+#endif
Property changes on: residual/trunk/engine/version.h
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Date Revision Author URL Id
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list