scummvm/scummvm — pull request #232 by fingolfin (2012-04-18 09:54:08+00:00)
Title: Refactor plugins

This pull request is a subset of my pull request #204. It centralizes all engine plugin specific data inside the engines/ subtree. Specifically, the list of (static) plugins is moved from base/plugins.cpp to engines/plugins_table.h. Moreover, the list of engines from configure is moved to engines/configure.engines.

This is an advantage because all files the author of a new engine must modify are directly inside engines/. It's still three files (engines.mk, configure.engines, plugins_table.h), but at least you don't need to search all over the place for them.

The long term goal would be to automatically generate all three files, thus making it even easier to add/remove engines from the build process. This is what my pull request #204 is about. But I believe the changes here are beneficial even on their own, and they seemed to be least controversial, hence I thought I should offer them individually. (The commits here are rebased, however, and include a patch for create_project to make sure it still works). If desired, I can add another commit which renames the file any way you like.

One thing that one might want to change are the filenames: Perhaps it would be easier yet if the three files followed a common naming pattern. Say engines.mk, engines.config and engines_table.h (as "engines.h" could be confused with "engine.h").