载入中...
搜索中...
未找到

命令行模块(eve.cmd):run / build / package / test / zip / dev-server 等子命令入口。 更多...

#include <cmdline.h>

类 eve::cmd::Cmdline 继承关系图:
eve::Module

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
 

详细描述

命令行模块(eve.cmd):run / build / package / test / zip / dev-server 等子命令入口。

在文件 cmdline.h 第 33 行定义.

构造及析构函数说明

◆ Cmdline()

eve::cmd::Cmdline::Cmdline ( )
protected

Cmdline.

在文件 cmdline.cpp 第 34 行定义.

成员函数说明

◆ Build()

int eve::cmd::Cmdline::Build ( std::string  path,
std::string  output,
std::string  platform,
std::string  sdkRoot = "",
bool  debug = false 
)

构建项目:委托仓库 Makefile 的 build/<platform>[-debug] 目标。

在文件 Build.cpp 第 98 行定义.

引用了 c, f, n, output, p, path, root , 以及 variant.

被这些函数引用 eve::cmd::BuildArgs::parse().

◆ Clean()

int eve::cmd::Cmdline::Clean ( std::string  path)

清理项目并移除内部产物。

在文件 Clean.cpp 第 35 行定义.

被这些函数引用 eve::cmd::CleanArgs::parse().

◆ 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 
)

启动热重载开发服务器。

在文件 DevServer.cpp 第 311 行定义.

引用了 m , 以及 path.

被这些函数引用 eve::cmd::DevServerArgs::parse().

◆ Doc()

int eve::cmd::Cmdline::Doc ( std::string  name,
bool  noOpen = false 
)

显示模块/函数/类型的文档。

在文件 Doc.cpp 第 63 行定义.

被这些函数引用 eve::cmd::DocArgs::parse().

◆ Get()

int eve::cmd::Cmdline::Get ( std::string  url)

获取第三方源码。

在文件 Get.cpp 第 36 行定义.

引用了 name , 以及 p.

被这些函数引用 eve::cmd::GetArgs::parse().

◆ get_remaining()

std::string eve::cmd::Cmdline::get_remaining ( CLI::App *  sub,
std::string  default_path = "." 
)
static

◆ getArgc()

unsigned eve::cmd::Cmdline::getArgc ( )
inline

Returns the argc.

在文件 cmdline.h 第 83 行定义.

被这些函数引用 eve::cmd::RunArgs::parse().

◆ getArgv()

std::string eve::cmd::Cmdline::getArgv ( unsigned  i)
inline

第 i 个原始 argv(physfs 文件系统用)。

在文件 cmdline.h 第 79 行定义.

◆ handers()

std::vector< std::function< Handler *()> > & eve::cmd::Cmdline::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().

被这些函数引用 eve::cmd::LanguageServerArgs::parse().

◆ McpHost()

◆ 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()

void eve::cmd::Cmdline::registerCmd ( std::function< Handler *()>  handler)
staticprotected

Registers cmd.

在文件 cmdline.cpp 第 21 行定义.

引用了 handers() , 以及 handler.

被这些函数引用 eve::cmd::Register::Register().

◆ Run()

int eve::cmd::Cmdline::Run ( std::string  path,
std::string  root,
bool  debug = false,
int  dapPort = 0,
int  mcpPort = 0,
std::string  devServer = "" 
)

◆ runArgs()

int eve::cmd::Cmdline::runArgs ( unsigned  argcIn,
char **  argvIn 
)

解析并执行传入的 argv。

在文件 cmdline.cpp 第 43 行定义.

引用了 argc, argv, eve::buildInfo(), h, handers(), p , 以及 r.

◆ Test()

int eve::cmd::Cmdline::Test ( std::string  path)

运行项目测试。

在文件 Test.cpp 第 33 行定义.

被这些函数引用 eve::cmd::TestArgs::parse().

◆ Zip()

int eve::cmd::Cmdline::Zip ( std::string  path)

把当前目录打成 .eve 压缩包。

在文件 Zip.cpp 第 33 行定义.

引用了 eve::cmdline::createGameArchive() , 以及 path.

被这些函数引用 eve::cmd::ZipArgs::parse().

类成员变量说明

◆ argc

unsigned eve::cmd::Cmdline::argc
protected

在文件 cmdline.h 第 93 行定义.

被这些函数引用 runArgs().

◆ argv

char** eve::cmd::Cmdline::argv
protected

在文件 cmdline.h 第 94 行定义.

被这些函数引用 runArgs().

◆ Register

friend eve::cmd::Cmdline::Register

在文件 cmdline.h 第 88 行定义.


该类的文档由以下文件生成: