| 570 | } |
| 571 | |
| 572 | bool cmVSSetupAPIHelper::LoadSpecifiedVSInstanceFromDisk() |
| 573 | { |
| 574 | if (!cmSystemTools::FileIsDirectory(this->SpecifiedVSInstallLocation)) { |
| 575 | return false; |
| 576 | } |
| 577 | VSInstanceInfo vsInstanceInfo; |
| 578 | vsInstanceInfo.VSInstallLocation = this->SpecifiedVSInstallLocation; |
| 579 | // FIXME: Is there a better way to get SDK information? |
| 580 | vsInstanceInfo.IsWin10SDKInstalled = true; |
| 581 | vsInstanceInfo.IsWin81SDKInstalled = false; |
| 582 | |
| 583 | if (!this->SpecifiedVSInstallVersion.empty()) { |
| 584 | // Assume the version specified by the user is correct. |
| 585 | vsInstanceInfo.Version = this->SpecifiedVSInstallVersion; |
| 586 | } else { |
| 587 | return false; |
| 588 | } |
| 589 | |
| 590 | if (!LoadVSInstanceVCToolsetVersion(vsInstanceInfo)) { |
| 591 | return false; |
| 592 | } |
| 593 | |
| 594 | chosenInstanceInfo = std::move(vsInstanceInfo); |
| 595 | return true; |
| 596 | } |
| 597 | |
| 598 | bool cmVSSetupAPIHelper::Initialize() |
| 599 | { |
no test coverage detected