2026-06-26 17:28:07 -04:00
|
|
|
# InstallProgress
|
|
|
|
|
|
2026-09-29 07:14:54 -07:00
|
|
|
Progress item reported by `WslcService::InstallWithDependenciesAsync(InstallOptions)`.
|
2026-06-26 17:28:07 -04:00
|
|
|
|
|
|
|
|
**Properties**
|
2026-06-28 06:43:01 -07:00
|
|
|
|
2026-09-29 07:14:54 -07:00
|
|
|
| Property | Type |
|
|
|
|
|
|---|---|
|
|
|
|
|
| `Component()` | `Component` |
|
|
|
|
|
| `Progress()` | `uint32_t` |
|
|
|
|
|
| `Total()` | `uint32_t` |
|
2026-06-26 17:28:07 -04:00
|
|
|
|
|
|
|
|
```cpp
|
2026-09-29 07:14:54 -07:00
|
|
|
auto missing = WslcService::GetMissingComponents();
|
|
|
|
|
for (auto component : missing)
|
2026-06-26 17:28:07 -04:00
|
|
|
{
|
2026-09-29 07:14:54 -07:00
|
|
|
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;
|
|
|
|
|
}
|
2026-06-26 17:28:07 -04:00
|
|
|
```
|