[Scummvm-cvs-logs] SF.net SVN: scummvm: [28950] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Sep 18 23:34:57 CEST 2007
Revision: 28950
http://scummvm.svn.sourceforge.net/scummvm/?rev=28950&view=rev
Author: fingolfin
Date: 2007-09-18 14:34:57 -0700 (Tue, 18 Sep 2007)
Log Message:
-----------
Fix linker issues when doing a plugin build, and (hopefully) also on Windows
Modified Paths:
--------------
scummvm/trunk/backends/fs/abstract-fs-factory.h
scummvm/trunk/backends/fs/dc/dc-fs.cpp
scummvm/trunk/backends/fs/gp32/gp32-fs.cpp
scummvm/trunk/backends/fs/palmos/palmos-fs.cpp
scummvm/trunk/backends/fs/posix/posix-fs.cpp
scummvm/trunk/backends/fs/psp/psp_fs.cpp
scummvm/trunk/backends/fs/symbian/symbian-fs.cpp
scummvm/trunk/backends/fs/windows/windows-fs.cpp
scummvm/trunk/backends/module.mk
scummvm/trunk/common/fs.cpp
Added Paths:
-----------
scummvm/trunk/backends/fs/abstract-fs-factory.cpp
Removed Paths:
-------------
scummvm/trunk/backends/fs/fs-factory-maker.cpp
Copied: scummvm/trunk/backends/fs/abstract-fs-factory.cpp (from rev 28948, scummvm/trunk/backends/fs/fs-factory-maker.cpp)
===================================================================
--- scummvm/trunk/backends/fs/abstract-fs-factory.cpp (rev 0)
+++ scummvm/trunk/backends/fs/abstract-fs-factory.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -0,0 +1,87 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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$
+ */
+
+#include "backends/fs/abstract-fs-factory.h"
+
+/*
+ * All the following includes choose, at compile time, which specific backend will be used
+ * during the execution of the ScummVM.
+ *
+ * It has to be done this way because not all the necessary libraries will be available in
+ * all build environments. Additionally, this results in smaller binaries.
+ */
+#if defined(__amigaos4__)
+ #include "backends/fs/amigaos4/amigaos4-fs-factory.cpp"
+#elif defined(__DC__)
+ #include "backends/fs/dc/ronincd-fs-factory.cpp"
+#elif defined(__DS__)
+ #include "backends/fs/ds/ds-fs-factory.cpp"
+#elif defined(__GP32__)
+ #include "backends/fs/gp32/gp32-fs-factory.cpp"
+#elif defined(__MORPHOS__)
+ #include "backends/fs/morphos/abox-fs-factory.cpp"
+#elif defined(PALMOS_MODE)
+ #include "backends/fs/palmos/palmos-fs-factory.cpp"
+#elif defined(__PLAYSTATION2__)
+ #include "backends/fs/ps2/ps2-fs-factory.cpp"
+#elif defined(__PSP__)
+ #include "backends/fs/psp/psp-fs-factory.cpp"
+#elif defined(__SYMBIAN32__)
+ #include "backends/fs/symbian/symbian-fs-factory.cpp"
+#elif defined(UNIX)
+ #include "backends/fs/posix/posix-fs-factory.cpp"
+#elif defined(WIN32)
+ #include "backends/fs/windows/windows-fs-factory.cpp"
+#endif
+
+/**
+ * Creates concrete FilesystemFactory objects depending on the current architecture.
+ *
+ * @return AbstractFilesystemFactory* The specific factory for the current architecture.
+ */
+AbstractFilesystemFactory *AbstractFilesystemFactory::makeFSFactory() {
+ #if defined(__amigaos4__)
+ return &AmigaOSFilesystemFactory::instance();
+ #elif defined(__DC__)
+ return &RoninCDFilesystemFactory::instance();
+ #elif defined(__DS__)
+ return &DSFilesystemFactory::instance();
+ #elif defined(__GP32__)
+ return &GP32FilesystemFactory::instance();
+ #elif defined(__MORPHOS__)
+ return &ABoxFilesystemFactory::instance();
+ #elif defined(PALMOS_MODE)
+ return &PalmOSFilesystemFactory::instance();
+ #elif defined(__PLAYSTATION2__)
+ return &Ps2FilesystemFactory::instance();
+ #elif defined(__PSP__)
+ return &PSPFilesystemFactory::instance();
+ #elif defined(__SYMBIAN32__)
+ return &SymbianFilesystemFactory::instance();
+ #elif defined(UNIX)
+ return &POSIXFilesystemFactory::instance();
+ #elif defined(WIN32)
+ return &WindowsFilesystemFactory::instance();
+ #endif
+}
Modified: scummvm/trunk/backends/fs/abstract-fs-factory.h
===================================================================
--- scummvm/trunk/backends/fs/abstract-fs-factory.h 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/abstract-fs-factory.h 2007-09-18 21:34:57 UTC (rev 28950)
@@ -25,6 +25,7 @@
#ifndef ABSTRACT_FILESYSTEM_FACTORY_H
#define ABSTRACT_FILESYSTEM_FACTORY_H
+#include "common/stdafx.h"
#include "common/str.h"
#include "backends/fs/abstract-fs.h"
@@ -68,6 +69,13 @@
* On Windows, it will be a special node which "contains" all drives (C:, D:, E:).
*/
virtual AbstractFilesystemNode *makeRootFileNode() const = 0;
+
+
+ /**
+ * Meta-factory method which returns a concrete AbstractFilesystemFactory
+ * instance depending on the current architecture.
+ */
+ static AbstractFilesystemFactory *makeFSFactory();
};
#endif /*ABSTRACT_FILESYSTEM_FACTORY_H*/
Modified: scummvm/trunk/backends/fs/dc/dc-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/dc/dc-fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/dc/dc-fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -81,7 +81,7 @@
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
Deleted: scummvm/trunk/backends/fs/fs-factory-maker.cpp
===================================================================
--- scummvm/trunk/backends/fs/fs-factory-maker.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/fs-factory-maker.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -1,87 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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$
- */
-
-#include "backends/fs/abstract-fs-factory.h"
-
-/*
- * All the following includes choose, at compile time, which specific backend will be used
- * during the execution of the ScummVM.
- *
- * It has to be done this way because not all the necessary libraries will be available in
- * all build environments. Additionally, this results in smaller binaries.
- */
-#if defined(__amigaos4__)
- #include "backends/fs/amigaos4/amigaos4-fs-factory.cpp"
-#elif defined(__DC__)
- #include "backends/fs/dc/ronincd-fs-factory.cpp"
-#elif defined(__DS__)
- #include "backends/fs/ds/ds-fs-factory.cpp"
-#elif defined(__GP32__)
- #include "backends/fs/gp32/gp32-fs-factory.cpp"
-#elif defined(__MORPHOS__)
- #include "backends/fs/morphos/abox-fs-factory.cpp"
-#elif defined(PALMOS_MODE)
- #include "backends/fs/palmos/palmos-fs-factory.cpp"
-#elif defined(__PLAYSTATION2__)
- #include "backends/fs/ps2/ps2-fs-factory.cpp"
-#elif defined(__PSP__)
- #include "backends/fs/psp/psp-fs-factory.cpp"
-#elif defined(__SYMBIAN32__)
- #include "backends/fs/symbian/symbian-fs-factory.cpp"
-#elif defined(UNIX)
- #include "backends/fs/posix/posix-fs-factory.cpp"
-#elif defined(WIN32)
- #include "backends/fs/windows/windows-fs-factory.cpp"
-#endif
-
-/**
- * Creates concrete FilesystemFactory objects depending on the current architecture.
- *
- * @return AbstractFilesystemFactory* The specific factory for the current architecture.
- */
-static AbstractFilesystemFactory *makeFSFactory() {
- #if defined(__amigaos4__)
- return &AmigaOSFilesystemFactory::instance();
- #elif defined(__DC__)
- return &RoninCDFilesystemFactory::instance();
- #elif defined(__DS__)
- return &DSFilesystemFactory::instance();
- #elif defined(__GP32__)
- return &GP32FilesystemFactory::instance();
- #elif defined(__MORPHOS__)
- return &ABoxFilesystemFactory::instance();
- #elif defined(PALMOS_MODE)
- return &PalmOSFilesystemFactory::instance();
- #elif defined(__PLAYSTATION2__)
- return &Ps2FilesystemFactory::instance();
- #elif defined(__PSP__)
- return &PSPFilesystemFactory::instance();
- #elif defined(__SYMBIAN32__)
- return &SymbianFilesystemFactory::instance();
- #elif defined(UNIX)
- return &POSIXFilesystemFactory::instance();
- #elif defined(WIN32)
- return &WindowsFilesystemFactory::instance();
- #endif
-}
Modified: scummvm/trunk/backends/fs/gp32/gp32-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/gp32/gp32-fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/gp32/gp32-fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -82,7 +82,7 @@
* @param str Path to obtain the last component from.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -214,7 +214,7 @@
//listDir += "/";
while (GpDirEnumList(listDir.c_str(), startIdx++, 1, &dirEntry, &read) == SM_OK) {
- if (dirEntry.name[0] == '.')
+da if (dirEntry.name[0] == '.')
continue;
entry._displayName = dirEntry.name;
Modified: scummvm/trunk/backends/fs/palmos/palmos-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/palmos/palmos-fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/palmos/palmos-fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -92,7 +92,7 @@
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
Modified: scummvm/trunk/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/posix/posix-fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/posix/posix-fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -91,7 +91,7 @@
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
Modified: scummvm/trunk/backends/fs/psp/psp_fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/psp/psp_fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/psp/psp_fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -82,7 +82,7 @@
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
Modified: scummvm/trunk/backends/fs/symbian/symbian-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/symbian/symbian-fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/symbian/symbian-fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -83,7 +83,7 @@
* @param str Path to obtain the last component from.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
Modified: scummvm/trunk/backends/fs/windows/windows-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/windows/windows-fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/fs/windows/windows-fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -124,7 +124,7 @@
* @param str Path to obtain the last component from.
* @return Pointer to the first char of the last component inside str.
*/
-static const char *lastPathComponent(const Common::String &str) {
+const char *lastPathComponent(const Common::String &str) {
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
Modified: scummvm/trunk/backends/module.mk
===================================================================
--- scummvm/trunk/backends/module.mk 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/backends/module.mk 2007-09-18 21:34:57 UTC (rev 28950)
@@ -2,11 +2,7 @@
MODULE_OBJS := \
events/default/default-events.o \
- fs/posix/posix-fs.o \
- fs/morphos/abox-fs.o \
- fs/windows/windows-fs.o \
- fs/amigaos4/amigaos4-fs.o \
- fs/dc/dc-fs.o \
+ fs/abstract-fs-factory.o \
midi/alsa.o \
midi/coreaudio.o \
midi/coremidi.o \
Modified: scummvm/trunk/common/fs.cpp
===================================================================
--- scummvm/trunk/common/fs.cpp 2007-09-18 21:23:22 UTC (rev 28949)
+++ scummvm/trunk/common/fs.cpp 2007-09-18 21:34:57 UTC (rev 28950)
@@ -25,9 +25,9 @@
#include "common/stdafx.h"
#include "common/util.h"
#include "backends/fs/abstract-fs.h"
-#include "backends/fs/fs-factory-maker.cpp"
+#include "backends/fs/abstract-fs-factory.h"
-/*
+/**
* Simple DOS-style pattern matching function (understands * and ? like used in DOS).
* Taken from exult/files/listfiles.cc
*/
@@ -82,7 +82,7 @@
}
FilesystemNode::FilesystemNode(const Common::String &p) {
- AbstractFilesystemFactory *factory = makeFSFactory();
+ AbstractFilesystemFactory *factory = AbstractFilesystemFactory::makeFSFactory();
if (p.empty() || p == ".")
_realNode = factory->makeCurrentDirectoryFileNode();
@@ -234,6 +234,9 @@
return ((matches > 0) ? true : false);
}
+// HACK HACK HACK
+extern const char *lastPathComponent(const Common::String &str);
+
int FilesystemNode::lookupFileRec(FSList &results, FilesystemNode &dir, Common::String &filename, bool hidden, bool exhaustive) const
{
FSList entries;
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