命令行模块(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) |
| 构建项目(需要下载工具与源码)。 | |
| 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 | 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) |
| 显示模块/函数/类型的文档。 | |
| int | Create (std::string path, std::string name) |
| 创建新项目。 | |
| int | runArgs (unsigned argc, char **argv) |
| 解析并执行传入的 argv。 | |
| std::string | getArgv (unsigned i) |
| 第 i 个原始 argv(physfs 文件系统用)。 | |
| unsigned | getArgc () |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
静态 Public 成员函数 | |
| static std::string | get_remaining (CLI::App *sub, std::string default_path=".") |
| 子命令剩余位置参数。 | |
Public 属性 | |
| friend | Register |
Protected 成员函数 | |
| Cmdline () | |
静态 Protected 成员函数 | |
| static std::vector< std::function< Handler *()> > & | handers () |
| static void | registerCmd (std::function< Handler *()> handler) |
Protected 属性 | |
| unsigned | argc |
| char ** | argv |
详细描述
构造及析构函数说明
◆ Cmdline()
|
protected |
在文件 cmdline.cpp 第 33 行定义.
成员函数说明
◆ Build()
| int eve::cmd::Cmdline::Build | ( | std::string | path, |
| std::string | output, | ||
| std::string | platform | ||
| ) |
◆ Clean()
◆ Create()
| int eve::cmd::Cmdline::Create | ( | std::string | path, |
| std::string | name | ||
| ) |
创建新项目。
在文件 Create.cpp 第 38 行定义.
引用了 dir, file, main(), name , 以及 p.
被这些函数引用 eve::cmd::CleanArgs::parse() , 以及 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 | ) |
◆ Get()
| int eve::cmd::Cmdline::Get | ( | std::string | url | ) |
◆ get_remaining()
|
static |
子命令剩余位置参数。
在文件 cmdline.cpp 第 79 行定义.
被这些函数引用 eve::cmd::BuildArgs::parse(), 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 第 15 行定义.
被这些函数引用 registerCmd() , 以及 runArgs().
◆ McpHost()
| int eve::cmd::Cmdline::McpHost | ( | std::string | path, |
| int | port | ||
| ) |
无头 MCP 宿主:stdio(默认)或 TCP,供 AI 代理驱动。
引用了 eve::Runtime::initialize(), eve::filesystem::physfs::installScriptFileApi(), eve::dev::DevTool::instance(), eve::cap::query(), eve::dev::McpServer::Stdio , 以及 eve::Runtime::vm().
被这些函数引用 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 第 94 行定义.
引用了 eve::cmdline::createGameArchive() , 以及 n.
被这些函数引用 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, eve::demo_content, eve::dev::DevTool::detach(), EVE_ANDROID_LOGE, eve::Runtime::initialize(), eve::filesystem::physfs::installScriptFileApi(), eve::dev::DevTool::instance(), eve::module_list_content, eve::dev::DevTool::notifyError(), eve::Runtime::root(), eve::Runtime::runSource(), eve::scene_director_content, eve::Runtime::table() , 以及 eve::Runtime::vm().
被这些函数引用 eve::cmd::RunArgs::parse().
◆ runArgs()
| int eve::cmd::Cmdline::runArgs | ( | unsigned | argc, |
| char ** | argv | ||
| ) |
◆ Test()
| int eve::cmd::Cmdline::Test | ( | std::string | path | ) |
◆ Zip()
| int eve::cmd::Cmdline::Zip | ( | std::string | path | ) |
类成员变量说明
◆ argc
|
protected |
◆ 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/Mcp.cpp
- src/engine/cmdline/Package.cpp
- src/engine/cmdline/Run.cpp
- src/engine/cmdline/Test.cpp
- src/engine/cmdline/Zip.cpp
Public 成员函数 继承自