diff --git a/hecl/dataspec/dataspec.cpp b/hecl/dataspec/dataspec.cpp index d2577ef2a..8d172327e 100644 --- a/hecl/dataspec/dataspec.cpp +++ b/hecl/dataspec/dataspec.cpp @@ -6,4 +6,11 @@ #include "STRG.hpp" #include "TXTR.hpp" +const std::pair DATA_SPECS[] = +{ + {"hecl-little", "Targets little-endian pc apps using the HECL runtime"}, + {"hecl-big", "Targets big-endian pc apps using the HECL runtime"}, + {"hecl-revolution", "Targets Wii apps using the HECL runtime"}, + {"hecl-cafe", "Targets Wii U apps using the HECL runtime"}, +}; diff --git a/hecl/driver/CToolHelp.hpp b/hecl/driver/CToolHelp.hpp index 912740f3c..32aa0f8fe 100644 --- a/hecl/driver/CToolHelp.hpp +++ b/hecl/driver/CToolHelp.hpp @@ -58,8 +58,8 @@ public: CHelpOutput::THelpFunc helpFunc = NULL; if (toolName == "init") helpFunc = CToolInit::Help; - else if (toolName == "platform") - helpFunc = CToolPlatform::Help; + else if (toolName == "spec") + helpFunc = CToolSpec::Help; else if (toolName == "add") helpFunc = CToolAdd::Help; else if (toolName == "remove" || toolName == "rm") diff --git a/hecl/driver/CToolPlatform.hpp b/hecl/driver/CToolSpec.hpp similarity index 57% rename from hecl/driver/CToolPlatform.hpp rename to hecl/driver/CToolSpec.hpp index f8afe377c..67e499dce 100644 --- a/hecl/driver/CToolPlatform.hpp +++ b/hecl/driver/CToolSpec.hpp @@ -1,18 +1,18 @@ -#ifndef CTOOL_PLATFORM -#define CTOOL_PLATFORM +#ifndef CTOOL_SPEC +#define CTOOL_SPEC #include "CToolBase.hpp" #include -class CToolPlatform final : public CToolBase +class CToolSpec final : public CToolBase { public: - CToolPlatform(const SToolPassInfo& info) + CToolSpec(const SToolPassInfo& info) : CToolBase(info) { } - ~CToolPlatform() + ~CToolSpec() { } @@ -20,29 +20,29 @@ public: { help.secHead("NAME"); help.beginWrap(); - help.wrap("hecl-platform - Configure platform target options\n"); + help.wrap("hecl-spec - Configure target data options\n"); help.endWrap(); help.secHead("SYNOPSIS"); help.beginWrap(); - help.wrap("hecl platform [enable|disable] [...]\n"); + help.wrap("hecl spec [enable|disable] [...]\n"); help.endWrap(); help.secHead("DESCRIPTION"); help.beginWrap(); - help.wrap("This command configures the HECL project with the user's preferred target platforms.\n\n" - "Providing enable/disable argument will bulk-set the enable status of the provided platform" - "list. If enable/disable is not provided, a list of supported platforms is printed.\n\n"); + help.wrap("This command configures the HECL project with the user's preferred target DataSpecs.\n\n" + "Providing enable/disable argument will bulk-set the enable status of the provided spec(s)" + "list. If enable/disable is not provided, a list of supported DataSpecs is printed.\n\n"); help.endWrap(); help.secHead("OPTIONS"); - help.optionHead("...", "platform name(s)"); + help.optionHead("...", "DataSpec name(s)"); help.beginWrap(); help.wrap("Specifies platform-names to enable/disable"); help.endWrap(); } - std::string toolName() const {return "platform";} + std::string toolName() const {return "spec";} int run() { @@ -50,4 +50,4 @@ public: } }; -#endif // CTOOL_PLATFORM +#endif // CTOOL_SPEC diff --git a/hecl/driver/driver.pro b/hecl/driver/driver.pro index f72952a03..6d4927072 100644 --- a/hecl/driver/driver.pro +++ b/hecl/driver/driver.pro @@ -33,5 +33,5 @@ HEADERS += \ CToolClean.hpp \ CToolAdd.hpp \ CToolRemove.hpp \ - CToolPlatform.hpp + CToolSpec.hpp diff --git a/hecl/driver/main.cpp b/hecl/driver/main.cpp index 725c90e33..bf1fbc3a0 100644 --- a/hecl/driver/main.cpp +++ b/hecl/driver/main.cpp @@ -9,7 +9,7 @@ #include "CToolBase.hpp" #include "CToolInit.hpp" -#include "CToolPlatform.hpp" +#include "CToolSpec.hpp" #include "CToolAdd.hpp" #include "CToolRemove.hpp" #include "CToolGroup.hpp" diff --git a/hecl/extra/hecl_autocomplete.sh b/hecl/extra/hecl_autocomplete.sh index e35f86a7e..f3f26b93e 100755 --- a/hecl/extra/hecl_autocomplete.sh +++ b/hecl/extra/hecl_autocomplete.sh @@ -3,7 +3,7 @@ _hecl () { local word=${COMP_WORDS[COMP_CWORD]} - local filecmds=(init platform add remove group cook clean package) + local filecmds=(init spec add remove group cook clean package) if [ $COMP_CWORD == 1 ] then @@ -15,7 +15,7 @@ _hecl () init|add|remove|group|cook|clean|package) COMPREPLY=($(compgen -f -- "${word}")) ;; - platform) + spec) COMPREPLY=($(compgen -W "enable disable" "${word}")) ;; help) diff --git a/hecl/include/HECLDatabase.hpp b/hecl/include/HECLDatabase.hpp index 67ed51bed..e35cf99d3 100644 --- a/hecl/include/HECLDatabase.hpp +++ b/hecl/include/HECLDatabase.hpp @@ -207,24 +207,24 @@ public: virtual bool removeGroup(const HECL::ProjectPath& path); /** - * @brief Return map populated with platforms targetable by this project interface + * @brief Return map populated with dataspecs targetable by this project interface * @return Platform map with name-string keys and enable-status values */ - virtual const std::map& listPlatforms(); + virtual const std::map& listDataSpecs(); /** - * @brief Enable persistent user preference for particular platform string(s) - * @param platforms String(s) representing unique platform(s) from listPlatforms + * @brief Enable persistent user preference for particular spec string(s) + * @param specs String(s) representing unique spec(s) from listDataSpecs * @return true on success */ - virtual bool enablePlatforms(const std::vector& platforms); + virtual bool enableDataSpecs(const std::vector& specs); /** - * @brief Disable persistent user preference for particular platform string(s) - * @param platform String(s) representing unique platform(s) from listPlatforms + * @brief Disable persistent user preference for particular spec string(s) + * @param specs String(s) representing unique spec(s) from listDataSpecs * @return true on success */ - virtual bool disablePlatforms(const std::vector& platforms); + virtual bool disableDataSpecs(const std::vector& specs); /** * @brief Begin cook process for specified directory diff --git a/hecl/lib/database/CProject.cpp b/hecl/lib/database/CProject.cpp index 8a2fa742c..a2ce66498 100644 --- a/hecl/lib/database/CProject.cpp +++ b/hecl/lib/database/CProject.cpp @@ -9,6 +9,10 @@ namespace HECLDatabase { +/********************************************** + * Project::ConfigFile + **********************************************/ + static inline bool CheckNewLineAdvance(std::string::const_iterator& it) { if (*it == '\n' || *it == '\0') @@ -110,6 +114,10 @@ bool Project::ConfigFile::checkForLine(const std::string& refLine) return false; } +/********************************************** + * Project + **********************************************/ + Project::Project(const std::string& rootPath) : m_rootPath(rootPath) { @@ -153,15 +161,15 @@ bool Project::removeGroup(const HECL::ProjectPath& path) { } -const std::map& Project::listPlatforms() +const std::map& Project::listDataSpecs() { } -bool Project::enablePlatforms(const std::vector& platforms) +bool Project::enableDataSpecs(const std::vector& specs) { } -bool Project::disablePlatforms(const std::vector& platforms) +bool Project::disableDataSpecs(const std::vector& specs) { }