diff options
Diffstat (limited to 'devtools/create_project/create_project.h')
| -rw-r--r-- | devtools/create_project/create_project.h | 62 |
1 files changed, 58 insertions, 4 deletions
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h index d0f2db364c..459342a67d 100644 --- a/devtools/create_project/create_project.h +++ b/devtools/create_project/create_project.h @@ -23,6 +23,10 @@ #ifndef TOOLS_CREATE_PROJECT_H #define TOOLS_CREATE_PROJECT_H +#ifndef __has_feature // Optional of course. + #define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + #include <map> #include <list> #include <string> @@ -98,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 @@ -259,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. * @@ -303,6 +324,30 @@ void splitFilename(const std::string &fileName, std::string &name, std::string & bool producesObjectFile(const std::string &fileName); /** +* Convert an integer to string +* +* @param num the integer to convert +* @return string representation of the number +*/ +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. @@ -462,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 |
