#include #include #include #include "../ToolSystem.h" #include "PlatformAddCmd.h" #include namespace ToolCore { PlatformAddCmd::PlatformAddCmd(Context* context) : Command(context) { } PlatformAddCmd::~PlatformAddCmd() { } bool PlatformAddCmd::Parse(const Vector& arguments, unsigned startIndex, String& errorMsg) { String argument = arguments[startIndex].ToLower(); String value = startIndex + 1 < arguments.Size() ? arguments[startIndex + 1] : String::EMPTY; if (argument != "platform-add") { errorMsg = "Unable to parse build command"; return false; } if (!value.Length()) { errorMsg = "Unable to parse build platform"; return false; } platformToAdd_ = value.ToLower(); return true; } void PlatformAddCmd::Run() { LOGINFOF("Adding platform: %s", platformToAdd_.CString()); ToolSystem* tsystem = GetSubsystem(); Project* project = tsystem->GetProject(); Platform* platform = NULL; Finished(); } }