aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Makefile11
-rw-r--r--Makefile.common6
-rwxr-xr-xconfigure72
-rw-r--r--devtools/create_project/codeblocks.cpp1
-rw-r--r--devtools/create_project/config.h1
-rw-r--r--devtools/create_project/create_project.cpp225
-rw-r--r--devtools/create_project/create_project.h50
-rw-r--r--devtools/create_project/msbuild.cpp2
-rw-r--r--devtools/create_project/visualstudio.cpp2
-rw-r--r--devtools/create_project/xcode.cpp31
-rw-r--r--engines/agi/configure.engine3
-rw-r--r--engines/agos/configure.engine4
-rw-r--r--engines/avalanche/configure.engine3
-rw-r--r--engines/cge/configure.engine3
-rw-r--r--engines/cine/configure.engine3
-rw-r--r--engines/composer/configure.engine3
-rw-r--r--engines/configure.engines57
-rw-r--r--engines/cruise/configure.engine3
-rw-r--r--engines/draci/configure.engine3
-rw-r--r--engines/drascula/configure.engine3
-rw-r--r--engines/dreamweb/configure.engine3
-rw-r--r--engines/engines.mk263
-rw-r--r--engines/fullpipe/configure.engine3
-rw-r--r--engines/gob/configure.engine3
-rw-r--r--engines/groovie/configure.engine4
-rw-r--r--engines/hopkins/configure.engine3
-rw-r--r--engines/hugo/configure.engine3
-rw-r--r--engines/kyra/configure.engine5
-rw-r--r--engines/lastexpress/configure.engine3
-rw-r--r--engines/lure/configure.engine3
-rw-r--r--engines/made/configure.engine3
-rw-r--r--engines/mohawk/configure.engine6
-rw-r--r--engines/mortevielle/configure.engine3
-rw-r--r--engines/neverhood/configure.engine3
-rw-r--r--engines/parallaction/configure.engine3
-rw-r--r--engines/pegasus/configure.engine3
-rw-r--r--engines/plugins_table.h130
-rw-r--r--engines/queen/configure.engine3
-rw-r--r--engines/saga/configure.engine5
-rw-r--r--engines/sci/configure.engine4
-rw-r--r--engines/scumm/configure.engine5
-rw-r--r--engines/sky/configure.engine3
-rw-r--r--engines/sword1/configure.engine3
-rw-r--r--engines/sword2/configure.engine3
-rw-r--r--engines/sword25/configure.engine3
-rw-r--r--engines/teenagent/configure.engine3
-rw-r--r--engines/testbed/configure.engine3
-rw-r--r--engines/tinsel/configure.engine3
-rw-r--r--engines/toltecs/configure.engine3
-rw-r--r--engines/tony/configure.engine3
-rw-r--r--engines/toon/configure.engine3
-rw-r--r--engines/touche/configure.engine3
-rw-r--r--engines/tsage/configure.engine3
-rw-r--r--engines/tucker/configure.engine3
-rw-r--r--engines/wintermute/configure.engine3
-rw-r--r--engines/zvision/configure.engine3
-rw-r--r--ports.mk10
58 files changed, 456 insertions, 549 deletions
diff --git a/.gitignore b/.gitignore
index 0fe212098c..469f22d11c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -105,6 +105,9 @@ project.xcworkspace
/plugins
+/engines/plugins_table.h
+/engines/engines.mk
+
/test/runner
/test/runner.cpp
/test/*.dSYM
diff --git a/Makefile b/Makefile
index 09c38b2598..88b60ca73f 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,8 @@ EXECUTABLE := $(EXEPRE)scummvm$(EXEEXT)
include $(srcdir)/Makefile.common
# check if configure has been run or has been changed since last run
-config.h config.mk: $(srcdir)/configure $(srcdir)/engines/configure.engines
+ENGINE_SUBDIRS_CONFIGURE := $(wildcard $(srcdir)/engines/*/configure.engine)
+config.h: $(srcdir)/configure $(ENGINE_SUBDIRS_CONFIGURE)
ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
@echo "Running $(srcdir)/configure with the last specified parameters"
@sleep 2
@@ -94,6 +95,14 @@ else
$(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
endif
+config.mk engines/plugins_table.h engines/engines.mk: config.h
+ @if test -f $@; then \
+ touch $@; \
+ else \
+ rm -f config.h; \
+ $(MAKE) config.h; \
+ fi
+
ifneq ($(origin port_mk), undefined)
include $(srcdir)/$(port_mk)
endif
diff --git a/Makefile.common b/Makefile.common
index 02c3408684..b56300a115 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -16,7 +16,7 @@ all: $(EXECUTABLE) plugins
PLUGINS :=
MODULES := test devtools base $(MODULES)
--include $(srcdir)/engines/engines.mk
+-include engines/engines.mk
# After the game specific modules follow the shared modules
MODULES += \
@@ -79,7 +79,7 @@ $(EXECUTABLE): $(OBJS)
$(QUIET_LINK)$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
distclean: clean clean-devtools
- $(RM) config.h config.mk config.log
+ $(RM) config.h config.mk config.log engines/engines.mk engines/plugins_table.h
clean:
$(RM_REC) $(DEPDIRS)
@@ -147,7 +147,7 @@ endif
# recreate them (which it can't), and in particular from looking for potential
# source files. This can save quite a bit of disk access time.
.PHONY: $(wildcard $(addsuffix /*.d,$(DEPDIRS))) $(addprefix $(srcdir)/, $(addsuffix /module.mk,$(MODULES))) \
- $(srcdir)/$(port_mk) $(srcdir)/rules.mk $(srcdir)/engines/engines.mk
+ $(srcdir)/$(port_mk) $(srcdir)/rules.mk
######################################################################
# Get the current version information
diff --git a/configure b/configure
index cb0b8902fc..d454591f08 100755
--- a/configure
+++ b/configure
@@ -97,7 +97,9 @@ add_feature() {
_srcdir=`dirname $0`
# Read list of engines
-. $_srcdir/engines/configure.engines
+for i in $_srcdir/engines/*/configure.engine; do
+ . "$i"
+done
#
# Default settings
@@ -4197,8 +4199,18 @@ for engine in $_engines; do
fi
done
-# Prepare the information to be shown
+# Sort engines to place our headline engine at start...
+# No technical reason, just historical convention
+headline_engine=scumm
+_sorted_engines="${headline_engine}"
for engine in $_engines; do
+ if test "${engine}" != "${headline_engine}" ; then
+ _sorted_engines="${_sorted_engines} ${engine}"
+ fi
+done
+
+# Prepare the information to be shown
+for engine in $_sorted_engines; do
if test "`get_engine_sub $engine`" = "no" ; then
# It's a main engine
prepare_engine_build_strings $engine
@@ -4380,3 +4392,59 @@ include \$(srcdir)/Makefile
EOF
fi
+
+# Ensure engines folder exists prior to trying to generate
+# files into it (used for out-of-tree-builds)
+mkdir -p engines
+
+echo "Creating engines/engines.mk"
+cat > engines/engines.mk << EOF
+# This file is automatically generated by configure
+# DO NOT EDIT MANUALLY
+# This file is being included by "Makefile.common"
+EOF
+
+for engine in $_sorted_engines; do
+ j=`echo $engine | tr '[:lower:]' '[:upper:]'`
+ if test "`get_engine_sub $engine`" = "no" ; then
+ # main engine
+ cat >> engines/engines.mk << EOF
+
+ifdef ENABLE_$j
+DEFINES += -DENABLE_$j=\$(ENABLE_$j)
+MODULES += engines/$engine
+EOF
+
+ for subeng in `get_engine_subengines $engine` ; do
+ k=`echo $subeng | tr '[:lower:]' '[:upper:]'`
+ cat >> engines/engines.mk << EOF
+
+ifdef ENABLE_$k
+DEFINES += -DENABLE_$k
+endif
+EOF
+ done
+
+ cat >> engines/engines.mk << EOF
+endif
+EOF
+ fi
+done
+
+echo "Creating engines/plugins_table.h"
+cat > engines/plugins_table.h << EOF
+/* This file is automatically generated by configure */
+/* DO NOT EDIT MANUALLY */
+// This file is being included by "base/plugins.cpp"
+EOF
+
+for engine in $_sorted_engines; do
+ if test "`get_engine_sub $engine`" = "no" ; then
+ j=`echo $engine | tr '[:lower:]' '[:upper:]'`
+ cat >> engines/plugins_table.h << EOF
+#if PLUGIN_ENABLED_STATIC($j)
+LINK_PLUGIN($j)
+#endif
+EOF
+ fi
+done
diff --git a/devtools/create_project/codeblocks.cpp b/devtools/create_project/codeblocks.cpp
index ec003df2d5..442a2b0025 100644
--- a/devtools/create_project/codeblocks.cpp
+++ b/devtools/create_project/codeblocks.cpp
@@ -120,6 +120,7 @@ void CodeBlocksProvider::createProjectFile(const std::string &name, const std::s
"\t\t\t\t\t<Add directory=\"..\\..\\engines\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\\common\" />\n"
"\t\t\t\t\t<Add directory=\"..\\..\" />\n"
+ "\t\t\t\t\t<Add directory=\".\\\" />\n"
"\t\t\t\t</Compiler>\n";
//////////////////////////////////////////////////////////////////////////
diff --git a/devtools/create_project/config.h b/devtools/create_project/config.h
index 1a66edff93..9d4b101360 100644
--- a/devtools/create_project/config.h
+++ b/devtools/create_project/config.h
@@ -27,6 +27,7 @@
#define PROJECT_NAME "scummvm" // Used for folders, icons, resources and project/solution name
#define LIBS_DEFINE "SCUMMVM_LIBS" // Name of the include environment variable
#define REVISION_DEFINE "SCUMMVM_INTERNAL_REVISION"
+#define FIRST_ENGINE "scumm" // Name of the engine which should be sorted as first element
#define ENABLE_LANGUAGE_EXTENSIONS "" // Comma separated list of projects that need language extensions
#define DISABLE_EDIT_AND_CONTINUE "tinsel,tony,scummvm" // Comma separated list of projects that need Edit&Continue to be disabled for co-routine support (the main project is automatically added)
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index e013377241..16b8e1d166 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -59,6 +59,7 @@
#include <sys/param.h>
#include <sys/stat.h>
#include <dirent.h>
+#include <errno.h>
#endif
namespace {
@@ -81,22 +82,6 @@ std::string unifyPath(const std::string &path);
* @param exe Name of the executable.
*/
void displayHelp(const char *exe);
-
-/**
- * Structure for describing an FSNode. This is a very minimalistic
- * description, which includes everything we need.
- * It only contains the name of the node and whether it is a directory
- * or not.
- */
-struct FSNode {
- FSNode() : name(), isDirectory(false) {}
- FSNode(const std::string &n, bool iD) : name(n), isDirectory(iD) {}
-
- std::string name; ///< Name of the file system node
- bool isDirectory; ///< Whether it is a directory or not
-};
-
-typedef std::list<FSNode> FileList;
} // End of anonymous namespace
enum ProjectType {
@@ -128,7 +113,7 @@ int main(int argc, char *argv[]) {
setup.filePrefix = setup.srcDir;
setup.outputDir = '.';
- setup.engines = parseConfigure(setup.srcDir);
+ setup.engines = parseEngines(setup.srcDir);
if (setup.engines.empty()) {
std::cout << "WARNING: No engines found in configure file or configure file missing in \"" << setup.srcDir << "\"\n";
@@ -672,47 +657,70 @@ void displayHelp(const char *exe) {
}
/**
- * Try to parse a given line and create an engine definition
- * out of the result.
+ * Parse the configure.engine file of a given engine directory and return a
+ * list of all defined engines.
*
- * This may take *any* input line, when the line is not used
- * to define an engine the result of the function will be "false".
+ * @param engineDir The directory of the engine.
+ * @return The list of all defined engines.
+ */
+EngineDescList parseEngineConfigure(const std::string &engineDir);
+
+/**
+ * Compares two FSNode entries in a strict-weak fashion based on the name.
*
- * Note that the contents of "engine" are undefined, when this
- * function returns "false".
+ * @param left The first operand.
+ * @param right The second operand.
+ * @return "true" when the name of the left operand is strictly smaller than
+ * the name of the second operand. "false" otherwise.
+ */
+bool compareFSNode(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right);
+
+#ifdef FIRST_ENGINE
+/**
+ * Compares two FSNode entries in a strict-weak fashion based on engine name
+ * order.
*
- * @param line Text input line.
- * @param engine Reference to an object, where the engine information
- * is to be stored in.
- * @return "true", when parsing succeeded, "false" otherwise.
+ * @param left The first operand.
+ * @param right The second operand.
+ * @return "true" when the name of the left operand is strictly smaller than
+ * the name of the second operand. "false" otherwise.
*/
-bool parseEngine(const std::string &line, EngineDesc &engine);
+bool compareEngineNames(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right);
+#endif
} // End of anonymous namespace
-EngineDescList parseConfigure(const std::string &srcDir) {
- std::string configureFile = srcDir + "/engines/configure.engines";
+EngineDescList parseEngines(const std::string &srcDir) {
+ using CreateProjectTool::FileList;
+ using CreateProjectTool::listDirectory;
- std::ifstream configure(configureFile.c_str());
- if (!configure)
- return EngineDescList();
+ EngineDescList engineList;
- std::string line;
- EngineDescList engines;
+ FileList engineFiles = listDirectory(srcDir + "/engines/");
- for (;;) {
- std::getline(configure, line);
- if (configure.eof())
- break;
+#ifdef FIRST_ENGINE
+ // In case we want to sort an engine to the front of the list we will
+ // use some manual sorting predicate which assures that.
+ engineFiles.sort(&compareEngineNames);
+#else
+ // Otherwise, we simply sort the file list alphabetically this allows
+ // for a nicer order in --list-engines output, for example.
+ engineFiles.sort(&compareFSNode);
+#endif
- if (configure.fail())
- error("Failed while reading from " + configureFile);
+ for (FileList::const_iterator i = engineFiles.begin(), end = engineFiles.end(); i != end; ++i) {
+ // Each engine requires its own sub directory thus we will skip all
+ // non directory file nodes here.
+ if (!i->isDirectory) {
+ continue;
+ }
- EngineDesc desc;
- if (parseEngine(line, desc))
- engines.push_back(desc);
+ // Retrieve all engines defined in this sub directory and add them to
+ // the list of all engines.
+ EngineDescList list = parseEngineConfigure(srcDir + "/engines/" + i->name);
+ engineList.splice(engineList.end(), list);
}
- return engines;
+ return engineList;
}
bool isSubEngine(const std::string &name, const EngineDescList &engines) {
@@ -777,6 +785,21 @@ StringList getEngineDefines(const EngineDescList &engines) {
}
namespace {
+/**
+ * Try to parse a given line and create an engine definition
+ * out of the result.
+ *
+ * This may take *any* input line, when the line is not used
+ * to define an engine the result of the function will be "false".
+ *
+ * Note that the contents of "engine" are undefined, when this
+ * function returns "false".
+ *
+ * @param line Text input line.
+ * @param engine Reference to an object, where the engine information
+ * is to be stored in.
+ * @return "true", when parsing succeeded, "false" otherwise.
+ */
bool parseEngine(const std::string &line, EngineDesc &engine) {
// Format:
// add_engine engine_name "Readable Description" enable_default ["SubEngineList"]
@@ -799,6 +822,48 @@ bool parseEngine(const std::string &line, EngineDesc &engine) {
return true;
}
+
+EngineDescList parseEngineConfigure(const std::string &engineDir) {
+ std::string configureFile = engineDir + "/configure.engine";
+
+ std::ifstream configure(configureFile.c_str());
+ if (!configure)
+ return EngineDescList();
+
+ std::string line;
+ EngineDescList engines;
+
+ for (;;) {
+ std::getline(configure, line);
+ if (configure.eof())
+ break;
+
+ if (configure.fail())
+ error("Failed while reading from " + configureFile);
+
+ EngineDesc desc;
+ if (parseEngine(line, desc))
+ engines.push_back(desc);
+ }
+
+ return engines;
+}
+
+bool compareFSNode(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right) {
+ return left.name < right.name;
+}
+
+#ifdef FIRST_ENGINE
+bool compareEngineNames(const CreateProjectTool::FSNode &left, const CreateProjectTool::FSNode &right) {
+ if (left.name == FIRST_ENGINE) {
+ return right.name != FIRST_ENGINE;
+ } else if (right.name == FIRST_ENGINE) {
+ return false;
+ } else {
+ return compareFSNode(left, right);
+ }
+}
+#endif
} // End of anonymous namespace
TokenList tokenize(const std::string &input, char separator) {
@@ -1048,13 +1113,6 @@ bool compareNodes(const FileNode *l, const FileNode *r) {
}
}
-/**
- * Returns a list of all files and directories in the specified
- * path.
- *
- * @param dir Directory which should be listed.
- * @return List of all children.
- */
FileList listDirectory(const std::string &dir) {
FileList result;
#ifdef USE_WIN32_API
@@ -1095,6 +1153,32 @@ FileList listDirectory(const std::string &dir) {
return result;
}
+void createDirectory(const std::string &dir) {
+#if defined(_WIN32) || defined(WIN32)
+ if (!CreateDirectory(dir.c_str(), NULL)) {
+ if (GetLastError() != ERROR_ALREADY_EXISTS) {
+ error("Could not create folder \"" + dir + "\"");
+ }
+ }
+#else
+ if (mkdir(dir.c_str(), 0777) == -1) {
+ if (errno == EEXIST) {
+ // Try to open as a folder (might be a file / symbolic link)
+ DIR *dirp = opendir(dir.c_str());
+ if (dirp == NULL) {
+ error("Could not create folder \"" + dir + "\"");
+ } else {
+ // The folder exists, just close the stream and return
+ closedir(dirp);
+ }
+ } else {
+ error("Could not create folder \"" + dir + "\"");
+ }
+ }
+#endif
+
+}
+
/**
* Scans the specified directory against files, which should be included
* in the project files. It will not include files present in the exclude list.
@@ -1242,6 +1326,12 @@ void ProjectProvider::createProject(BuildSetup &setup) {
// Create other misc. build files
createOtherBuildFiles(setup);
+
+ // In case we create the main ScummVM project files we will need to
+ // generate engines/plugins_table.h too.
+ if (!setup.tests && !setup.devTools) {
+ createEnginePluginsTable(setup);
+ }
}
ProjectProvider::UUIDMap ProjectProvider::createUUIDMap(const BuildSetup &setup) const {
@@ -1569,6 +1659,37 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin
error("Malformed file " + moduleMkFile);
}
+void ProjectProvider::createEnginePluginsTable(const BuildSetup &setup) {
+ // First we need to create the "engines" directory.
+ createDirectory(setup.outputDir + "/engines");
+
+ // Then, we can generate the actual "plugins_table.h" file.
+ const std::string enginePluginsTableFile = setup.outputDir + "/engines/plugins_table.h";
+ std::ofstream enginePluginsTable(enginePluginsTableFile.c_str());
+ if (!enginePluginsTable) {
+ error("Could not open \"" + enginePluginsTableFile + "\" for writing");
+ }
+
+ enginePluginsTable << "/* This file is automatically generated by create_project */\n"
+ << "/* DO NOT EDIT MANUALLY */\n"
+ << "// This file is being included by \"base/plugins.cpp\"\n";
+
+ for (EngineDescList::const_iterator i = setup.engines.begin(), end = setup.engines.end(); i != end; ++i) {
+ // We ignore all sub engines here because they require no special
+ // handling.
+ if (isSubEngine(i->name, setup.engines)) {
+ continue;
+ }
+
+ // Make the engine name all uppercase.
+ std::string engineName;
+ std::transform(i->name.begin(), i->name.end(), std::back_inserter(engineName), toupper);
+
+ enginePluginsTable << "#if PLUGIN_ENABLED_STATIC(" << engineName << ")\n"
+ << "LINK_PLUGIN(" << engineName << ")\n"
+ << "#endif\n";
+ }
+}
} // End of anonymous namespace
void error(const std::string &message) {
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index 2f27cc2f61..459342a67d 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -102,16 +102,17 @@ struct EngineDesc {
typedef std::list<EngineDesc> EngineDescList;
/**
- * This function parses the project configure file and creates a list
- * of available engines.
+ * This function parses the project directory and creates a list of
+ * available engines.
*
* It will also automatically setup the default build state (enabled
- * or disabled) to the state specified in the "configure" file.
+ * or disabled) to the state specified in the individual configure.engine
+ * files.
*
* @param srcDir Path to the root of the project source.
* @return List of available engines.
*/
-EngineDescList parseConfigure(const std::string &srcDir);
+EngineDescList parseEngines(const std::string &srcDir);
/**
* Checks whether the specified engine is a sub engine. To determine this
@@ -263,6 +264,22 @@ void NORETURN_PRE error(const std::string &message) NORETURN_POST;
namespace CreateProjectTool {
/**
+ * Structure for describing an FSNode. This is a very minimalistic
+ * description, which includes everything we need.
+ * It only contains the name of the node and whether it is a directory
+ * or not.
+ */
+struct FSNode {
+ FSNode() : name(), isDirectory(false) {}
+ FSNode(const std::string &n, bool iD) : name(n), isDirectory(iD) {}
+
+ std::string name; ///< Name of the file system node
+ bool isDirectory; ///< Whether it is a directory or not
+};
+
+typedef std::list<FSNode> FileList;
+
+/**
* Gets a proper sequence of \t characters for the given
* indentation level.
*
@@ -315,6 +332,22 @@ bool producesObjectFile(const std::string &fileName);
std::string toString(int num);
/**
+ * Returns a list of all files and directories in the specified
+ * path.
+ *
+ * @param dir Directory which should be listed.
+ * @return List of all children.
+ */
+FileList listDirectory(const std::string &dir);
+
+/**
+ * Create a directory at the given path.
+ *
+ * @param dir The path to create.
+ */
+void createDirectory(const std::string &dir);
+
+/**
* Structure representing a file tree. This contains two
* members: name and children. "name" holds the name of
* the node. "children" does contain all the node's children.
@@ -474,6 +507,15 @@ protected:
* @return A new UUID as string.
*/
std::string createUUID() const;
+
+private:
+ /**
+ * This creates the engines/plugins_table.h file required for building
+ * ScummVM.
+ *
+ * @param setup Description of the desired build.
+ */
+ void createEnginePluginsTable(const BuildSetup &setup);
};
} // End of CreateProjectTool namespace
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 0d68b2e9c9..07ae20e7dc 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -360,7 +360,7 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
"\t\t<ClCompile>\n"
"\t\t\t<DisableLanguageExtensions>true</DisableLanguageExtensions>\n"
"\t\t\t<DisableSpecificWarnings>" << warnings << ";%(DisableSpecificWarnings)</DisableSpecificWarnings>\n"
- "\t\t\t<AdditionalIncludeDirectories>$(" << LIBS_DEFINE << ")\\include;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
+ "\t\t\t<AdditionalIncludeDirectories>$(" << LIBS_DEFINE << ")\\include;.\\;" << prefix << ";" << prefix << "\\engines;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n"
"\t\t\t<PreprocessorDefinitions>" << definesList << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
"\t\t\t<ExceptionHandling>" << ((setup.devTools || setup.tests) ? "Sync" : "") << "</ExceptionHandling>\n";
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 438e0772f9..84bc674f9a 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -232,7 +232,7 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
"\t\tName=\"VCCLCompilerTool\"\n"
"\t\tDisableLanguageExtensions=\"" << (setup.devTools ? "false" : "true") << "\"\n"
"\t\tDisableSpecificWarnings=\"" << warnings << "\"\n"
- "\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir)\"\n"
+ "\t\tAdditionalIncludeDirectories=\".\\;" << prefix << ";" << prefix << "\\engines;$(" << LIBS_DEFINE << ")\\include;" << (setup.tests ? prefix + "\\test\\cxxtest;" : "") << "$(TargetDir)\"\n"
"\t\tPreprocessorDefinitions=\"" << definesList << "\"\n"
"\t\tExceptionHandling=\"" << ((setup.devTools || setup.tests) ? "1" : "0") << "\"\n";
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index a9b8e7a752..d95bf3e9ee 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -26,15 +26,6 @@
#include <fstream>
#include <algorithm>
-#if defined(_WIN32) || defined(WIN32)
-#include <windows.h>
-#else
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <errno.h>
-#endif
-
namespace CreateProjectTool {
#define DEBUG_XCODE_HASH 0
@@ -88,27 +79,7 @@ XCodeProvider::XCodeProvider(StringList &global_warnings, std::map<std::string,
void XCodeProvider::createWorkspace(const BuildSetup &setup) {
// Create project folder
std::string workspace = setup.outputDir + '/' + PROJECT_NAME ".xcodeproj";
-
-#if defined(_WIN32) || defined(WIN32)
- if (!CreateDirectory(workspace.c_str(), NULL))
- if (GetLastError() != ERROR_ALREADY_EXISTS)
- error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\"");
-#else
- if (mkdir(workspace.c_str(), 0777) == -1) {
- if (errno == EEXIST) {
- // Try to open as a folder (might be a file / symbolic link)
- DIR *dirp = opendir(workspace.c_str());
- if (dirp == NULL) {
- error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\"");
- } else {
- // The folder exists, just close the stream and return
- closedir(dirp);
- }
- } else {
- error("Could not create folder \"" + setup.outputDir + '/' + PROJECT_NAME ".xcodeproj\"");
- }
- }
-#endif
+ createDirectory(workspace);
// Setup global objects
setupDefines(setup);
diff --git a/engines/agi/configure.engine b/engines/agi/configure.engine
new file mode 100644
index 0000000000..fad659f86d
--- /dev/null
+++ b/engines/agi/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine agi "AGI" yes
diff --git a/engines/agos/configure.engine b/engines/agos/configure.engine
new file mode 100644
index 0000000000..3ae1fb16f2
--- /dev/null
+++ b/engines/agos/configure.engine
@@ -0,0 +1,4 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine agos "AGOS" yes "agos2" "AGOS 1 games"
+add_engine agos2 "AGOS 2 games" yes
diff --git a/engines/avalanche/configure.engine b/engines/avalanche/configure.engine
new file mode 100644
index 0000000000..28d6a558db
--- /dev/null
+++ b/engines/avalanche/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine avalanche "Lord Avalot d'Argent" no
diff --git a/engines/cge/configure.engine b/engines/cge/configure.engine
new file mode 100644
index 0000000000..72af1197be
--- /dev/null
+++ b/engines/cge/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine cge "CGE" yes
diff --git a/engines/cine/configure.engine b/engines/cine/configure.engine
new file mode 100644
index 0000000000..2b7e2085fa
--- /dev/null
+++ b/engines/cine/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine cine "Cinematique evo 1" yes
diff --git a/engines/composer/configure.engine b/engines/composer/configure.engine
new file mode 100644
index 0000000000..71a79acb5d
--- /dev/null
+++ b/engines/composer/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine composer "Magic Composer" yes
diff --git a/engines/configure.engines b/engines/configure.engines
deleted file mode 100644
index ec7d4667ca..0000000000
--- a/engines/configure.engines
+++ /dev/null
@@ -1,57 +0,0 @@
-# This file is included from the main "configure" script
-# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine scumm "SCUMM" yes "scumm_7_8 he" "v0-v6 games"
-add_engine scumm_7_8 "v7 & v8 games" yes
-add_engine he "HE71+ games" yes
-add_engine agi "AGI" yes
-add_engine agos "AGOS" yes "agos2" "AGOS 1 games"
-add_engine agos2 "AGOS 2 games" yes
-add_engine avalanche "Lord Avalot d'Argent" no
-add_engine cge "CGE" yes
-add_engine cine "Cinematique evo 1" yes
-add_engine composer "Magic Composer" yes
-add_engine cruise "Cinematique evo 2" yes
-add_engine draci "Dragon History" yes
-add_engine drascula "Drascula: The Vampire Strikes Back" yes
-add_engine dreamweb "Dreamweb" yes
-add_engine fullpipe "Full Pipe" no
-add_engine gob "Gobli*ns" yes
-add_engine groovie "Groovie" yes "groovie2" "7th Guest"
-add_engine groovie2 "Groovie 2 games" no "" "" "jpeg"
-add_engine hopkins "Hopkins FBI" yes "" "" "16bit"
-add_engine hugo "Hugo Trilogy" yes
-add_engine kyra "Kyra" yes "lol eob" "Legend of Kyrandia 1-3"
-add_engine lol "Lands of Lore" yes
-add_engine eob "Eye of the Beholder" yes
-add_engine lastexpress "The Last Express" no "" "" "16bit"
-add_engine lure "Lure of the Temptress" yes
-add_engine made "MADE" yes
-add_engine mohawk "Mohawk" yes "cstime myst riven" "Living Books"
-add_engine mortevielle "Mortevielle" no
-add_engine cstime "Where in Time is Carmen Sandiego?" no
-add_engine riven "Riven: The Sequel to Myst" no "" "" "16bit"
-add_engine myst "Myst" no "" "" "16bit"
-add_engine neverhood "Neverhood" no
-add_engine parallaction "Parallaction" yes
-add_engine pegasus "The Journeyman Project: Pegasus Prime" yes "" "" "16bit"
-add_engine queen "Flight of the Amazon Queen" yes
-add_engine saga "SAGA" yes "ihnm saga2" "ITE"
-add_engine ihnm "IHNM" yes
-add_engine saga2 "SAGA 2 games" no
-add_engine sci "SCI" yes "sci32" "SCI 0-1.1 games"
-add_engine sci32 "SCI32 games" no
-add_engine sky "Beneath a Steel Sky" yes
-add_engine sword1 "Broken Sword" yes
-add_engine sword2 "Broken Sword II" yes
-add_engine sword25 "Broken Sword 2.5" no "" "" "png zlib 16bit"
-add_engine teenagent "Teen Agent" yes
-add_engine testbed "TestBed: the Testing framework" no
-add_engine tinsel "Tinsel" yes
-add_engine toltecs "3 Skulls of the Toltecs" yes
-add_engine toon "Toonstruck" yes
-add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
-add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit"
-add_engine tsage "TsAGE" yes
-add_engine tucker "Bud Tucker in Double Trouble" yes
-add_engine wintermute "Wintermute" no "" "" "jpeg png zlib vorbis 16bit"
-add_engine zvision "ZVision" no "" "" "freetype2 16bit"
diff --git a/engines/cruise/configure.engine b/engines/cruise/configure.engine
new file mode 100644
index 0000000000..925da25370
--- /dev/null
+++ b/engines/cruise/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine cruise "Cinematique evo 2" yes
diff --git a/engines/draci/configure.engine b/engines/draci/configure.engine
new file mode 100644
index 0000000000..09022b06f5
--- /dev/null
+++ b/engines/draci/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine draci "Dragon History" yes
diff --git a/engines/drascula/configure.engine b/engines/drascula/configure.engine
new file mode 100644
index 0000000000..b9b76638fd
--- /dev/null
+++ b/engines/drascula/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine drascula "Drascula: The Vampire Strikes Back" yes
diff --git a/engines/dreamweb/configure.engine b/engines/dreamweb/configure.engine
new file mode 100644
index 0000000000..27506e650f
--- /dev/null
+++ b/engines/dreamweb/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine dreamweb "Dreamweb" yes
diff --git a/engines/engines.mk b/engines/engines.mk
deleted file mode 100644
index cfde77321d..0000000000
--- a/engines/engines.mk
+++ /dev/null
@@ -1,263 +0,0 @@
-ifdef ENABLE_SCUMM
-DEFINES += -DENABLE_SCUMM=$(ENABLE_SCUMM)
-MODULES += engines/scumm
-
-ifdef ENABLE_SCUMM_7_8
-DEFINES += -DENABLE_SCUMM_7_8
-endif
-
-ifdef ENABLE_HE
-DEFINES += -DENABLE_HE
-endif
-
-endif
-
-ifdef ENABLE_AGI
-DEFINES += -DENABLE_AGI=$(ENABLE_AGI)
-MODULES += engines/agi
-endif
-
-ifdef ENABLE_AGOS
-DEFINES += -DENABLE_AGOS=$(ENABLE_AGOS)
-MODULES += engines/agos
-
-ifdef ENABLE_AGOS2
-DEFINES += -DENABLE_AGOS2
-endif
-endif
-
-ifdef ENABLE_AVALANCHE
-DEFINES += -DENABLE_AVALANCHE=$(ENABLE_AVALANCHE)
-MODULES += engines/avalanche
-endif
-
-ifdef ENABLE_CGE
-DEFINES += -DENABLE_CGE=$(ENABLE_CGE)
-MODULES += engines/cge
-endif
-
-ifdef ENABLE_CINE
-DEFINES += -DENABLE_CINE=$(ENABLE_CINE)
-MODULES += engines/cine
-endif
-
-ifdef ENABLE_COMPOSER
-DEFINES += -DENABLE_COMPOSER=$(ENABLE_COMPOSER)
-MODULES += engines/composer
-endif
-
-ifdef ENABLE_CRUISE
-DEFINES += -DENABLE_CRUISE=$(ENABLE_CRUISE)
-MODULES += engines/cruise
-endif
-
-ifdef ENABLE_DRACI
-DEFINES += -DENABLE_DRACI=$(ENABLE_DRACI)
-MODULES += engines/draci
-endif
-
-ifdef ENABLE_DRASCULA
-DEFINES += -DENABLE_DRASCULA=$(ENABLE_DRASCULA)
-MODULES += engines/drascula
-endif
-
-ifdef ENABLE_DREAMWEB
-DEFINES += -DENABLE_DREAMWEB=$(ENABLE_DREAMWEB)
-MODULES += engines/dreamweb
-endif
-
-ifdef ENABLE_FULLPIPE
-DEFINES += -DENABLE_FULLPIPE=$(ENABLE_FULLPIPE)
-MODULES += engines/fullpipe
-endif
-
-ifdef ENABLE_GOB
-DEFINES += -DENABLE_GOB=$(ENABLE_GOB)
-MODULES += engines/gob
-endif
-
-ifdef ENABLE_GROOVIE
-DEFINES += -DENABLE_GROOVIE=$(ENABLE_GROOVIE)
-MODULES += engines/groovie
-
-ifdef ENABLE_GROOVIE2
-DEFINES += -DENABLE_GROOVIE2
-endif
-endif
-
-ifdef ENABLE_HOPKINS
-DEFINES += -DENABLE_HOPKINS=$(ENABLE_HOPKINS)
-MODULES += engines/hopkins
-endif
-
-ifdef ENABLE_HUGO
-DEFINES += -DENABLE_HUGO=$(ENABLE_HUGO)
-MODULES += engines/hugo
-endif
-
-ifdef ENABLE_KYRA
-DEFINES += -DENABLE_KYRA=$(ENABLE_KYRA)
-MODULES += engines/kyra
-
-ifdef ENABLE_LOL
-DEFINES += -DENABLE_LOL
-endif
-
-ifdef ENABLE_EOB
-DEFINES += -DENABLE_EOB
-endif
-endif
-
-ifdef ENABLE_LASTEXPRESS
-DEFINES += -DENABLE_LASTEXPRESS=$(ENABLE_LASTEXPRESS)
-MODULES += engines/lastexpress
-endif
-
-ifdef ENABLE_LURE
-DEFINES += -DENABLE_LURE=$(ENABLE_LURE)
-MODULES += engines/lure
-endif
-
-ifdef ENABLE_MADE
-DEFINES += -DENABLE_MADE=$(ENABLE_MADE)
-MODULES += engines/made
-endif
-
-ifdef ENABLE_MOHAWK
-DEFINES += -DENABLE_MOHAWK=$(ENABLE_MOHAWK)
-MODULES += engines/mohawk
-
-ifdef ENABLE_CSTIME
-DEFINES += -DENABLE_CSTIME
-endif
-
-ifdef ENABLE_MYST
-DEFINES += -DENABLE_MYST
-endif
-
-ifdef ENABLE_RIVEN
-DEFINES += -DENABLE_RIVEN
-endif
-endif
-
-ifdef ENABLE_MORTEVIELLE
-DEFINES += -DENABLE_MORTEVIELLE=$(ENABLE_MORTEVIELLE)
-MODULES += engines/mortevielle
-endif
-
-ifdef ENABLE_NEVERHOOD
-DEFINES += -DENABLE_NEVERHOOD=$(ENABLE_NEVERHOOD)
-MODULES += engines/neverhood
-endif
-
-ifdef ENABLE_PARALLACTION
-DEFINES += -DENABLE_PARALLACTION=$(ENABLE_PARALLACTION)
-MODULES += engines/parallaction
-endif
-
-ifdef ENABLE_PEGASUS
-DEFINES += -DENABLE_PEGASUS=$(ENABLE_PEGASUS)
-MODULES += engines/pegasus
-endif
-
-ifdef ENABLE_QUEEN
-DEFINES += -DENABLE_QUEEN=$(ENABLE_QUEEN)
-MODULES += engines/queen
-endif
-
-ifdef ENABLE_SAGA
-DEFINES += -DENABLE_SAGA=$(ENABLE_SAGA)
-MODULES += engines/saga
-
-ifdef ENABLE_IHNM
-DEFINES += -DENABLE_IHNM
-endif
-
-ifdef ENABLE_SAGA2
-DEFINES += -DENABLE_SAGA2
-endif
-endif
-
-ifdef ENABLE_SCI
-DEFINES += -DENABLE_SCI=$(ENABLE_SCI)
-MODULES += engines/sci
-
-ifdef ENABLE_SCI32
-DEFINES += -DENABLE_SCI32
-endif
-endif
-
-ifdef ENABLE_SKY
-DEFINES += -DENABLE_SKY=$(ENABLE_SKY)
-MODULES += engines/sky
-endif
-
-ifdef ENABLE_SWORD1
-DEFINES += -DENABLE_SWORD1=$(ENABLE_SWORD1)
-MODULES += engines/sword1
-endif
-
-ifdef ENABLE_SWORD2
-DEFINES += -DENABLE_SWORD2=$(ENABLE_SWORD2)
-MODULES += engines/sword2
-endif
-
-ifdef ENABLE_SWORD25
-DEFINES += -DENABLE_SWORD25=$(ENABLE_SWORD25)
-MODULES += engines/sword25
-endif
-
-ifdef ENABLE_TESTBED
-DEFINES += -DENABLE_TESTBED=$(ENABLE_TESTBED)
-MODULES += engines/testbed
-endif
-
-ifdef ENABLE_TEENAGENT
-DEFINES += -DENABLE_TEENAGENT=$(ENABLE_TEENAGENT)
-MODULES += engines/teenagent
-endif
-
-ifdef ENABLE_TINSEL
-DEFINES += -DENABLE_TINSEL=$(ENABLE_TINSEL)
-MODULES += engines/tinsel
-endif
-
-ifdef ENABLE_TOLTECS
-DEFINES += -DENABLE_TOLTECS=$(ENABLE_TOLTECS)
-MODULES += engines/toltecs
-endif
-
-ifdef ENABLE_TONY
-DEFINES += -DENABLE_TONY=$(ENABLE_TONY)
-MODULES += engines/tony
-endif
-
-ifdef ENABLE_TOON
-DEFINES += -DENABLE_TOON=$(ENABLE_TOON)
-MODULES += engines/toon
-endif
-
-ifdef ENABLE_TOUCHE
-DEFINES += -DENABLE_TOUCHE=$(ENABLE_TOUCHE)
-MODULES += engines/touche
-endif
-
-ifdef ENABLE_TSAGE
-DEFINES += -DENABLE_TSAGE=$(ENABLE_TSAGE)
-MODULES += engines/tsage
-endif
-
-ifdef ENABLE_TUCKER
-DEFINES += -DENABLE_TUCKER=$(ENABLE_TUCKER)
-MODULES += engines/tucker
-endif
-
-ifdef ENABLE_WINTERMUTE
-DEFINES += -DENABLE_WINTERMUTE=$(ENABLE_WINTERMUTE)
-MODULES += engines/wintermute
-endif
-
-ifdef ENABLE_ZVISION
-DEFINES += -DENABLE_ZVISION=$(ENABLE_ZVISION)
-MODULES += engines/zvision
-endif
diff --git a/engines/fullpipe/configure.engine b/engines/fullpipe/configure.engine
new file mode 100644
index 0000000000..fce5951e26
--- /dev/null
+++ b/engines/fullpipe/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine fullpipe "Full Pipe" no
diff --git a/engines/gob/configure.engine b/engines/gob/configure.engine
new file mode 100644
index 0000000000..8e012f5815
--- /dev/null
+++ b/engines/gob/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine gob "Gobli*ns" yes
diff --git a/engines/groovie/configure.engine b/engines/groovie/configure.engine
new file mode 100644
index 0000000000..84e95a70df
--- /dev/null
+++ b/engines/groovie/configure.engine
@@ -0,0 +1,4 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine groovie "Groovie" yes "groovie2" "7th Guest"
+add_engine groovie2 "Groovie 2 games" no "" "" "jpeg"
diff --git a/engines/hopkins/configure.engine b/engines/hopkins/configure.engine
new file mode 100644
index 0000000000..c38ecd4cd2
--- /dev/null
+++ b/engines/hopkins/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine hopkins "Hopkins FBI" yes "" "" "16bit"
diff --git a/engines/hugo/configure.engine b/engines/hugo/configure.engine
new file mode 100644
index 0000000000..9ab5c54e1e
--- /dev/null
+++ b/engines/hugo/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine hugo "Hugo Trilogy" yes
diff --git a/engines/kyra/configure.engine b/engines/kyra/configure.engine
new file mode 100644
index 0000000000..b7d6334fcc
--- /dev/null
+++ b/engines/kyra/configure.engine
@@ -0,0 +1,5 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine kyra "Kyra" yes "lol eob" "Legend of Kyrandia 1-3"
+add_engine lol "Lands of Lore" yes
+add_engine eob "Eye of the Beholder" yes
diff --git a/engines/lastexpress/configure.engine b/engines/lastexpress/configure.engine
new file mode 100644
index 0000000000..807b1a088b
--- /dev/null
+++ b/engines/lastexpress/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine lastexpress "The Last Express" no "" "" "16bit"
diff --git a/engines/lure/configure.engine b/engines/lure/configure.engine
new file mode 100644
index 0000000000..e9f92893e3
--- /dev/null
+++ b/engines/lure/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine lure "Lure of the Temptress" yes
diff --git a/engines/made/configure.engine b/engines/made/configure.engine
new file mode 100644
index 0000000000..2266712338
--- /dev/null
+++ b/engines/made/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine made "MADE" yes
diff --git a/engines/mohawk/configure.engine b/engines/mohawk/configure.engine
new file mode 100644
index 0000000000..fa9d15cffc
--- /dev/null
+++ b/engines/mohawk/configure.engine
@@ -0,0 +1,6 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine mohawk "Mohawk" yes "cstime myst riven" "Living Books"
+add_engine cstime "Where in Time is Carmen Sandiego?" no
+add_engine riven "Riven: The Sequel to Myst" no "" "" "16bit"
+add_engine myst "Myst" no "" "" "16bit"
diff --git a/engines/mortevielle/configure.engine b/engines/mortevielle/configure.engine
new file mode 100644
index 0000000000..14d6479e7a
--- /dev/null
+++ b/engines/mortevielle/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine mortevielle "Mortevielle" no
diff --git a/engines/neverhood/configure.engine b/engines/neverhood/configure.engine
new file mode 100644
index 0000000000..0767a631f9
--- /dev/null
+++ b/engines/neverhood/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine neverhood "Neverhood" no
diff --git a/engines/parallaction/configure.engine b/engines/parallaction/configure.engine
new file mode 100644
index 0000000000..babca4579f
--- /dev/null
+++ b/engines/parallaction/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine parallaction "Parallaction" yes
diff --git a/engines/pegasus/configure.engine b/engines/pegasus/configure.engine
new file mode 100644
index 0000000000..ed7e295287
--- /dev/null
+++ b/engines/pegasus/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine pegasus "The Journeyman Project: Pegasus Prime" yes "" "" "16bit"
diff --git a/engines/plugins_table.h b/engines/plugins_table.h
deleted file mode 100644
index 38cd43ac74..0000000000
--- a/engines/plugins_table.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// This file is being included by "base/plugins.cpp"
-#if PLUGIN_ENABLED_STATIC(SCUMM)
-LINK_PLUGIN(SCUMM)
-#endif
-#if PLUGIN_ENABLED_STATIC(AGI)
-LINK_PLUGIN(AGI)
-#endif
-#if PLUGIN_ENABLED_STATIC(AGOS)
-LINK_PLUGIN(AGOS)
-#endif
-#if PLUGIN_ENABLED_STATIC(AVALANCHE)
-LINK_PLUGIN(AVALANCHE)
-#endif
-#if PLUGIN_ENABLED_STATIC(CGE)
-LINK_PLUGIN(CGE)
-#endif
-#if PLUGIN_ENABLED_STATIC(CINE)
-LINK_PLUGIN(CINE)
-#endif
-#if PLUGIN_ENABLED_STATIC(COMPOSER)
-LINK_PLUGIN(COMPOSER)
-#endif
-#if PLUGIN_ENABLED_STATIC(CRUISE)
-LINK_PLUGIN(CRUISE)
-#endif
-#if PLUGIN_ENABLED_STATIC(DRACI)
-LINK_PLUGIN(DRACI)
-#endif
-#if PLUGIN_ENABLED_STATIC(DRASCULA)
-LINK_PLUGIN(DRASCULA)
-#endif
-#if PLUGIN_ENABLED_STATIC(DREAMWEB)
-LINK_PLUGIN(DREAMWEB)
-#endif
-#if PLUGIN_ENABLED_STATIC(FULLPIPE)
-LINK_PLUGIN(FULLPIPE)
-#endif
-#if PLUGIN_ENABLED_STATIC(GOB)
-LINK_PLUGIN(GOB)
-#endif
-#if PLUGIN_ENABLED_STATIC(GROOVIE)
-LINK_PLUGIN(GROOVIE)
-#endif
-#if PLUGIN_ENABLED_STATIC(HOPKINS)
-LINK_PLUGIN(HOPKINS)
-#endif
-#if PLUGIN_ENABLED_STATIC(HUGO)
-LINK_PLUGIN(HUGO)
-#endif
-#if PLUGIN_ENABLED_STATIC(KYRA)
-LINK_PLUGIN(KYRA)
-#endif
-#if PLUGIN_ENABLED_STATIC(MORTEVIELLE)
-LINK_PLUGIN(MORTEVIELLE)
-#endif
-#if PLUGIN_ENABLED_STATIC(LASTEXPRESS)
-LINK_PLUGIN(LASTEXPRESS)
-#endif
-#if PLUGIN_ENABLED_STATIC(LURE)
-LINK_PLUGIN(LURE)
-#endif
-#if PLUGIN_ENABLED_STATIC(MADE)
-LINK_PLUGIN(MADE)
-#endif
-#if PLUGIN_ENABLED_STATIC(MOHAWK)
-LINK_PLUGIN(MOHAWK)
-#endif
-#if PLUGIN_ENABLED_STATIC(NEVERHOOD)
-LINK_PLUGIN(NEVERHOOD)
-#endif
-#if PLUGIN_ENABLED_STATIC(PARALLACTION)
-LINK_PLUGIN(PARALLACTION)
-#endif
-#if PLUGIN_ENABLED_STATIC(PEGASUS)
-LINK_PLUGIN(PEGASUS)
-#endif
-#if PLUGIN_ENABLED_STATIC(QUEEN)
-LINK_PLUGIN(QUEEN)
-#endif
-#if PLUGIN_ENABLED_STATIC(SAGA)
-LINK_PLUGIN(SAGA)
-#endif
-#if PLUGIN_ENABLED_STATIC(SCI)
-LINK_PLUGIN(SCI)
-#endif
-#if PLUGIN_ENABLED_STATIC(SKY)
-LINK_PLUGIN(SKY)
-#endif
-#if PLUGIN_ENABLED_STATIC(SWORD1)
-LINK_PLUGIN(SWORD1)
-#endif
-#if PLUGIN_ENABLED_STATIC(SWORD2)
-LINK_PLUGIN(SWORD2)
-#endif
-#if PLUGIN_ENABLED_STATIC(SWORD25)
-LINK_PLUGIN(SWORD25)
-#endif
-#if PLUGIN_ENABLED_STATIC(TEENAGENT)
-LINK_PLUGIN(TEENAGENT)
-#endif
-#if PLUGIN_ENABLED_STATIC(TESTBED)
-LINK_PLUGIN(TESTBED)
-#endif
-#if PLUGIN_ENABLED_STATIC(TINSEL)
-LINK_PLUGIN(TINSEL)
-#endif
-#if PLUGIN_ENABLED_STATIC(TOLTECS)
-LINK_PLUGIN(TOLTECS)
-#endif
-#if PLUGIN_ENABLED_STATIC(TONY)
-LINK_PLUGIN(TONY)
-#endif
-#if PLUGIN_ENABLED_STATIC(TOON)
-LINK_PLUGIN(TOON)
-#endif
-#if PLUGIN_ENABLED_STATIC(TSAGE)
-LINK_PLUGIN(TSAGE)
-#endif
-#if PLUGIN_ENABLED_STATIC(TOUCHE)
-LINK_PLUGIN(TOUCHE)
-#endif
-#if PLUGIN_ENABLED_STATIC(TUCKER)
-LINK_PLUGIN(TUCKER)
-#endif
-#if PLUGIN_ENABLED_STATIC(WINTERMUTE)
-LINK_PLUGIN(WINTERMUTE)
-#endif
-#if PLUGIN_ENABLED_STATIC(ZVISION)
-LINK_PLUGIN(ZVISION)
-#endif
diff --git a/engines/queen/configure.engine b/engines/queen/configure.engine
new file mode 100644
index 0000000000..c8766743f9
--- /dev/null
+++ b/engines/queen/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine queen "Flight of the Amazon Queen" yes
diff --git a/engines/saga/configure.engine b/engines/saga/configure.engine
new file mode 100644
index 0000000000..99e2ab367b
--- /dev/null
+++ b/engines/saga/configure.engine
@@ -0,0 +1,5 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine saga "SAGA" yes "ihnm saga2" "ITE"
+add_engine ihnm "IHNM" yes
+add_engine saga2 "SAGA 2 games" no
diff --git a/engines/sci/configure.engine b/engines/sci/configure.engine
new file mode 100644
index 0000000000..d1c45a4654
--- /dev/null
+++ b/engines/sci/configure.engine
@@ -0,0 +1,4 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine sci "SCI" yes "sci32" "SCI 0-1.1 games"
+add_engine sci32 "SCI32 games" no
diff --git a/engines/scumm/configure.engine b/engines/scumm/configure.engine
new file mode 100644
index 0000000000..e1de788061
--- /dev/null
+++ b/engines/scumm/configure.engine
@@ -0,0 +1,5 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine scumm "SCUMM" yes "scumm_7_8 he" "v0-v6 games"
+add_engine scumm_7_8 "v7 & v8 games" yes
+add_engine he "HE71+ games" yes
diff --git a/engines/sky/configure.engine b/engines/sky/configure.engine
new file mode 100644
index 0000000000..32b84849cb
--- /dev/null
+++ b/engines/sky/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine sky "Beneath a Steel Sky" yes
diff --git a/engines/sword1/configure.engine b/engines/sword1/configure.engine
new file mode 100644
index 0000000000..0578d176a9
--- /dev/null
+++ b/engines/sword1/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine sword1 "Broken Sword" yes
diff --git a/engines/sword2/configure.engine b/engines/sword2/configure.engine
new file mode 100644
index 0000000000..7153605433
--- /dev/null
+++ b/engines/sword2/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine sword2 "Broken Sword II" yes
diff --git a/engines/sword25/configure.engine b/engines/sword25/configure.engine
new file mode 100644
index 0000000000..1729bbeb33
--- /dev/null
+++ b/engines/sword25/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine sword25 "Broken Sword 2.5" no "" "" "png zlib 16bit"
diff --git a/engines/teenagent/configure.engine b/engines/teenagent/configure.engine
new file mode 100644
index 0000000000..223a0e884c
--- /dev/null
+++ b/engines/teenagent/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine teenagent "Teen Agent" yes
diff --git a/engines/testbed/configure.engine b/engines/testbed/configure.engine
new file mode 100644
index 0000000000..c0a68c8eb8
--- /dev/null
+++ b/engines/testbed/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine testbed "TestBed: the Testing framework" no
diff --git a/engines/tinsel/configure.engine b/engines/tinsel/configure.engine
new file mode 100644
index 0000000000..c0f3e0a18d
--- /dev/null
+++ b/engines/tinsel/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine tinsel "Tinsel" yes
diff --git a/engines/toltecs/configure.engine b/engines/toltecs/configure.engine
new file mode 100644
index 0000000000..be5533efa2
--- /dev/null
+++ b/engines/toltecs/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine toltecs "3 Skulls of the Toltecs" yes
diff --git a/engines/tony/configure.engine b/engines/tony/configure.engine
new file mode 100644
index 0000000000..f85f45d158
--- /dev/null
+++ b/engines/tony/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit"
diff --git a/engines/toon/configure.engine b/engines/toon/configure.engine
new file mode 100644
index 0000000000..00c98f7d8a
--- /dev/null
+++ b/engines/toon/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine toon "Toonstruck" yes
diff --git a/engines/touche/configure.engine b/engines/touche/configure.engine
new file mode 100644
index 0000000000..777578e623
--- /dev/null
+++ b/engines/touche/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
diff --git a/engines/tsage/configure.engine b/engines/tsage/configure.engine
new file mode 100644
index 0000000000..2b8edf8266
--- /dev/null
+++ b/engines/tsage/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine tsage "TsAGE" yes
diff --git a/engines/tucker/configure.engine b/engines/tucker/configure.engine
new file mode 100644
index 0000000000..06676cf0a4
--- /dev/null
+++ b/engines/tucker/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine tucker "Bud Tucker in Double Trouble" yes
diff --git a/engines/wintermute/configure.engine b/engines/wintermute/configure.engine
new file mode 100644
index 0000000000..673549b46b
--- /dev/null
+++ b/engines/wintermute/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine wintermute "Wintermute" no "" "" "jpeg png zlib vorbis 16bit"
diff --git a/engines/zvision/configure.engine b/engines/zvision/configure.engine
new file mode 100644
index 0000000000..02e31943af
--- /dev/null
+++ b/engines/zvision/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine zvision "ZVision" no "" "" "freetype2 16bit"
diff --git a/ports.mk b/ports.mk
index f9d075707b..9b54b3533b 100644
--- a/ports.mk
+++ b/ports.mk
@@ -318,15 +318,15 @@ else ifeq "$(CUR_BRANCH)" ""
$(error You must be on a release branch)
endif
@echo Creating Code::Blocks project files...
- @cd $(srcdir)/dists/codeblocks && ../../devtools/create_project/create_project ../.. --codeblocks >/dev/null && git add -f *.workspace *.cbp
+ @cd $(srcdir)/dists/codeblocks && ../../devtools/create_project/create_project ../.. --codeblocks >/dev/null && git add -f engines/plugins_table.h *.workspace *.cbp
@echo Creating MSVC8 project files...
- @cd $(srcdir)/dists/msvc8 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 8 >/dev/null && git add -f *.sln *.vcproj *.vsprops
+ @cd $(srcdir)/dists/msvc8 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 8 >/dev/null && git add -f engines/plugins_table.h *.sln *.vcproj *.vsprops
@echo Creating MSVC9 project files...
- @cd $(srcdir)/dists/msvc9 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 9 >/dev/null && git add -f *.sln *.vcproj *.vsprops
+ @cd $(srcdir)/dists/msvc9 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 9 >/dev/null && git add -f engines/plugins_table.h *.sln *.vcproj *.vsprops
@echo Creating MSVC10 project files...
- @cd $(srcdir)/dists/msvc10 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 10 >/dev/null && git add -f *.sln *.vcxproj *.vcxproj.filters *.props
+ @cd $(srcdir)/dists/msvc10 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 10 >/dev/null && git add -f engines/plugins_table.h *.sln *.vcxproj *.vcxproj.filters *.props
@echo Creating MSVC11 project files...
- @cd $(srcdir)/dists/msvc11 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 11 >/dev/null && git add -f *.sln *.vcxproj *.vcxproj.filters *.props
+ @cd $(srcdir)/dists/msvc11 && ../../devtools/create_project/create_project ../.. --msvc --msvc-version 11 >/dev/null && git add -f engines/plugins_table.h *.sln *.vcxproj *.vcxproj.filters *.props
@echo
@echo All is done.
@echo Now run