mirror of
https://github.com/aphrody-labs/WSL.git
synced 2026-10-14 21:59:15 +00:00
* Update WSLC SDK API documentation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update docs * Update docs * Quick fixes --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Craig Loewen <crloewen@microsoft.com>
889 B
889 B
InstallProgress
Progress item reported by WslcService::InstallWithDependenciesAsync(InstallOptions).
Properties
| Property | Type |
|---|---|
Component() |
Component |
Progress() |
uint32_t |
Total() |
uint32_t |
auto missing = WslcService::GetMissingComponents();
for (auto component : missing)
{
if (component == Component::SdkNeedsUpdate)
{
// Installing components cannot resolve this compatibility error.
co_return;
}
}
if (missing.Size() != 0)
{
InstallOptions options;
options.Components(missing);
auto install = WslcService::InstallWithDependenciesAsync(options);
install.Progress([](auto&&, InstallProgress const& p)
{
printf("component=%d step=%u/%u\n",
static_cast<int>(p.Component()),
p.Progress(),
p.Total());
});
co_await install;
}