跳转到内容

UBot Package Info

C++
FUBotPackageInfo
模块
UBotCore · UBotCore 0.1.2
节点
Break · Make
头文件
Source/UBotCore/Public/UBotPackageTypes.h

一个 uBot Package 的全部已知信息,由插件描述文件和 Package 索引合并而成。

字段类型蓝图说明
NameNameString只读插件名,例如 UBotSensor。
Friendly NameFriendlyNameString只读显示名,例如 uBot Sensor。
DescriptionDescriptionString只读描述文件里的简介。
VersionVersionString只读语义化版本号。已安装的 Package 取描述文件的 VersionName;只在索引里的取最新的可安装版本,规划中的取最新的规划版本。
Available VersionsAvailableVersionsString数组只读索引里列出的可安装(非规划)版本,新的在前。
PlannedbPlannedBoolean只读索引里只有规划版本:已公布,但还不能安装。
Index VersionsIndexVersionsUBot Package Index Version结构体数组只读索引里列出的所有版本(含规划版本),新的在前,并带有每个可安装版本克隆时检出的 git 引用(ref)。不在任何索引里的 Package 为空。
Install FolderInstallFolderString只读索引条目里的 folder:Package 克隆到安装目录下的文件夹名。为空时取仓库地址的最后一段并去掉 .git。
LayerLayerEUBot Package Layer枚举只读取自描述文件 UBot 块或索引条目的 layer,没有声明或无法识别时为 Unknown。
RepositoryRepositoryString只读安装 Package 用的 git 仓库地址。
Docs UrlDocsUrlString只读文档地址。
TagsTagsString数组只读标签。
ProvidesProvidesString数组只读Package 提供的功能标识,例如 Sensor.IMU。
RequiresRequiresUBot Package Dependency结构体数组只读依赖的 Package 列表:名称、版本约束、是否可选。
External RequiresExternalRequiresString数组只读Package 需要的引擎插件或其他非 uBot 插件(描述文件和索引里的 EnginePlugins,旧描述文件可能仍用 ExternalRequires)。不会被自动安装。
StateStateEUBot Package State枚举只读安装状态:NotInstalled、Disabled 或 Enabled。
InstalledbInstalledBoolean只读是否已安装。
EnabledbEnabledBoolean只读是否已启用。
From IndexbFromIndexBoolean只读是否列在某个 Package 索引里。
Base DirBaseDirString只读插件目录的绝对路径。未安装时为空。
Descriptor PathDescriptorPathString只读.uplugin 文件的绝对路径。未安装时为空。
ProblemsProblemsString数组只读可读的问题描述,由依赖校验填写。
Problem DetailsProblemDetailsUBot Package Problem结构体数组只读Problems 的结构化形式,顺序和数量相同。

拆分结构体 · Break:FUBotPackageInfo

把 Package 信息拆成 Name、Friendly Name、Version、State、Enabled、Requires 等字段。

引脚方向类型说明
UBot Package Info输入UBot Package Info结构体
Name输出StringPlugin name, e.g. "UBotSensor".
Friendly Name输出String
Description高级输出String
Version高级输出StringSemantic version: the descriptor's VersionName for installed packages. For index entries the latest installable version, or the newest planned version when the package is planned.
Available Versions高级输出String数组Installable (non-planned) versions listed in the package index, newest first.
Planned高级bPlanned输出BooleanTrue when the package index lists only planned versions: announced, but not installable yet.
Index Versions高级输出UBot Package Index Version结构体数组Every version the package index lists (planned ones included), newest first, with the git ref each installable version is cloned at. Empty for packages that are not in an index.
Install Folder高级输出String"folder" of the index entry: the name of the folder below the install directory the package is cloned into. Empty means the last segment of Repository without ".git". Kept as written, so FUBotPackageService can refuse a value that is not one safe path segment.
Layer高级输出EUBot Package Layer枚举
Repository高级输出StringGit repository URL used to install the package.
Docs Url高级输出String
Tags高级输出String数组
Provides高级输出String数组Capability keys offered by the package, e.g. "Sensor.IMU".
Requires高级输出UBot Package Dependency结构体数组
External Requires高级输出String数组Engine or other non-uBot plugins the package needs ("EnginePlugins" in descriptors and the index; descriptors may still use the older key "ExternalRequires"). Never installed automatically.
State高级输出EUBot Package State枚举
Installed高级bInstalled输出Boolean
Enabled高级bEnabled输出Boolean
From Index高级bFromIndex输出BooleanTrue when the package is listed in a package index.
Base Dir高级输出StringAbsolute plugin directory. Empty when not installed.
Descriptor Path高级输出StringAbsolute path of the .uplugin file. Empty when not installed.
Problems高级输出String数组Human readable problems, filled by FUBotPackageRegistry::ValidatePackageSet.
Problem Details高级输出UBot Package Problem结构体数组Structured form of Problems: same order and count.

构造结构体 · Make:FUBotPackageInfo

用各个字段拼出一个 UBot Package Info。

引脚方向类型
UBot Package Info输出UBot Package Info结构体