命令行模块(eve.cmd):run / build / package / test / zip / dev-server 等子命令入口。 更多...
#include <cmdline.h>
Public 成员函数 | |
| Module_REG (Cmdline) | |
| int | Run (std::string path, std::string root, bool debug=false, int dapPort=0, int mcpPort=0, std::string devServer="") |
| 运行游戏(debug 时附加 DAP/MCP 端口)。 | |
| int | Build (std::string path, std::string output, std::string platform, std::string sdkRoot="", bool debug=false) |
| 构建项目:委托仓库 Makefile 的 build/<platform>[-debug] 目标。 | |
| int | Package (std::string path, std::string output, std::string sdk) |
| 把游戏打包为单个可执行文件 / APK。 | |
| int | Test (std::string path) |
| 运行项目测试。 | |
| int | McpHost (std::string path, int port) |
| 无头 MCP 宿主:stdio(默认)或 TCP,供 AI 代理驱动。 | |
| int | LanguageServer (std::string path) |
| EveScript Language Server Protocol stdio host (devtools LanguageServer). | |
| int | Zip (std::string path) |
| 把当前目录打成 .eve 压缩包。 | |
| int | DevServer (std::string path, int port=8765) |
| 启动热重载开发服务器。 | |
| int | Get (std::string url) |
| 获取第三方源码。 | |
| int | Clean (std::string path) |
| 清理项目并移除内部产物。 | |
| int | Doc (std::string name, bool noOpen=false) |
| 显示模块/函数/类型的文档。 | |
| int | Create (std::string path, std::string name) |
| 创建新项目。 | |
| int | runArgs (unsigned argcIn, char **argvIn) |
| 解析并执行传入的 argv。 | |
| std::string | getArgv (unsigned i) |
| 第 i 个原始 argv(physfs 文件系统用)。 | |
| unsigned | getArgc () |
| Returns the argc. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
静态 Public 成员函数 | |
| static std::string | get_remaining (CLI::App *sub, std::string default_path=".") |
| 子命令剩余位置参数。 | |
Public 属性 | |
| friend | Register |
Protected 成员函数 | |
| Cmdline () | |
| Cmdline. | |
静态 Protected 成员函数 | |
| static std::vector< std::function< Handler *()> > & | handers () |
| static void | registerCmd (std::function< Handler *()> handler) |
| Registers cmd. | |
Protected 属性 | |
| unsigned | argc |
| char ** | argv |
详细描述
构造及析构函数说明
◆ Cmdline()
|
protected |
在文件 cmdline.cpp 第 34 行定义.
成员函数说明
◆ Build()
| int eve::cmd::Cmdline::Build | ( | std::string | path, |
| std::string | output, | ||
| std::string | platform, | ||
| std::string | sdkRoot = "", |
||
| bool | debug = false |
||
| ) |
◆ Clean()
| int eve::cmd::Cmdline::Clean | ( | std::string | path | ) |
◆ Create()
| int eve::cmd::Cmdline::Create | ( | std::string | path, |
| std::string | name | ||
| ) |
创建新项目。
在文件 Create.cpp 第 38 行定义.
引用了 dir, file, main(), p , 以及 path.
被这些函数引用 eve::cmd::CreateArgs::parse().
◆ DevServer()
| int eve::cmd::Cmdline::DevServer | ( | std::string | path, |
| int | port = 8765 |
||
| ) |
◆ Doc()
| int eve::cmd::Cmdline::Doc | ( | std::string | name, |
| bool | noOpen = false |
||
| ) |
◆ Get()
| int eve::cmd::Cmdline::Get | ( | std::string | url | ) |
◆ get_remaining()
|
static |
子命令剩余位置参数。
在文件 cmdline.cpp 第 80 行定义.
引用了 paths.
被这些函数引用 eve::cmd::CleanArgs::parse(), eve::cmd::CreateArgs::parse(), eve::cmd::DevServerArgs::parse(), eve::cmd::DocArgs::parse(), eve::cmd::GetArgs::parse(), eve::cmd::McpArgs::parse(), eve::cmd::PackageArgs::parse(), eve::cmd::RunArgs::parse(), eve::cmd::TestArgs::parse() , 以及 eve::cmd::ZipArgs::parse().
◆ getArgc()
|
inline |
◆ getArgv()
|
inline |
◆ handers()
|
staticprotected |
在文件 cmdline.cpp 第 16 行定义.
被这些函数引用 registerCmd() , 以及 runArgs().
◆ LanguageServer()
| int eve::cmd::Cmdline::LanguageServer | ( | std::string | path | ) |
EveScript Language Server Protocol stdio host (devtools LanguageServer).
在文件 LanguageServer.cpp 第 40 行定义.
引用了 error, path , 以及 eve::dev::LanguageServer::runStdio().
◆ McpHost()
| int eve::cmd::Cmdline::McpHost | ( | std::string | path, |
| int | port | ||
| ) |
无头 MCP 宿主:stdio(默认)或 TCP,供 AI 代理驱动。
引用了 eve::filesystem::Filesystem::getLastWatchPath(), host, eve::filesystem::physfs::installScriptFileApi(), eve::dev::DevTool::instance(), kind, eve::filesystem::HotReload::normalizePath(), path, eve::filesystem::Filesystem::pollWatch(), eve::ModuleManager::requireAll(), eve::filesystem::Filesystem::setSource(), eve::dev::McpServer::Stdio , 以及 watchCount.
被这些函数引用 eve::cmd::McpArgs::parse().
◆ Module_REG()
| eve::cmd::Cmdline::Module_REG | ( | Cmdline | ) |
◆ Package()
| int eve::cmd::Cmdline::Package | ( | std::string | path, |
| std::string | output, | ||
| std::string | sdk | ||
| ) |
把游戏打包为单个可执行文件 / APK。
在文件 Package.cpp 第 200 行定义.
引用了 eve::cmdline::createGameArchive(), exists, n, output , 以及 path.
被这些函数引用 eve::cmd::PackageArgs::parse().
◆ registerCmd()
|
staticprotected |
◆ Run()
| int eve::cmd::Cmdline::Run | ( | std::string | path, |
| std::string | root, | ||
| bool | debug = false, |
||
| int | dapPort = 0, |
||
| int | mcpPort = 0, |
||
| std::string | devServer = "" |
||
| ) |
运行游戏(debug 时附加 DAP/MCP 端口)。
引用了 eve::async_content, bytes, eve::script::ScriptModuleResolver::canonicalize(), eve::demo_content, eve::dev::DevTool::detach(), error, EVE_ANDROID_LOGE, gp, host, eve::filesystem::physfs::installScriptFileApi(), eve::dev::DevTool::instance(), level, eve::module_list_content, eve::dev::DevTool::notifyError(), path, eve::recordLogEvent(), root, eve::scene_director_content , 以及 eve::boot::startVulkanInstanceWarmup().
被这些函数引用 eve::cmd::RunArgs::parse().
◆ runArgs()
| int eve::cmd::Cmdline::runArgs | ( | unsigned | argcIn, |
| char ** | argvIn | ||
| ) |
◆ Test()
| int eve::cmd::Cmdline::Test | ( | std::string | path | ) |
◆ Zip()
| int eve::cmd::Cmdline::Zip | ( | std::string | path | ) |
把当前目录打成 .eve 压缩包。
引用了 eve::cmdline::createGameArchive() , 以及 path.
被这些函数引用 eve::cmd::ZipArgs::parse().
类成员变量说明
◆ argc
◆ argv
◆ Register
该类的文档由以下文件生成:
- src/engine/cmdline/cmdline.h
- src/engine/cmdline/Build.cpp
- src/engine/cmdline/Clean.cpp
- src/engine/cmdline/cmdline.cpp
- src/engine/cmdline/Create.cpp
- src/engine/cmdline/DevServer.cpp
- src/engine/cmdline/Doc.cpp
- src/engine/cmdline/Get.cpp
- src/engine/cmdline/LanguageServer.cpp
- src/engine/cmdline/Mcp.cpp
- src/engine/cmdline/Package.cpp
- src/engine/cmdline/Run.cpp
- src/engine/cmdline/Test.cpp
- src/engine/cmdline/Zip.cpp
Public 成员函数 继承自