| 97 | }; |
| 98 | |
| 99 | class cmVSSetupAPIHelper |
| 100 | { |
| 101 | public: |
| 102 | cmVSSetupAPIHelper(unsigned int version); |
| 103 | ~cmVSSetupAPIHelper(); |
| 104 | |
| 105 | bool SetVSInstance(std::string const& vsInstallLocation, |
| 106 | std::string const& vsInstallVersion); |
| 107 | |
| 108 | bool IsVSInstalled(); |
| 109 | bool GetVSInstanceInfo(std::string& vsInstallLocation); |
| 110 | bool GetVSInstanceVersion(std::string& vsInstanceVersion); |
| 111 | bool GetVCToolsetVersion(std::string& vsToolsetVersion); |
| 112 | bool IsWin10SDKInstalled(); |
| 113 | bool IsWin81SDKInstalled(); |
| 114 | |
| 115 | private: |
| 116 | bool Initialize(); |
| 117 | bool GetVSInstanceInfo(SmartCOMPtr<ISetupInstance2> instance2, |
| 118 | VSInstanceInfo& vsInstanceInfo); |
| 119 | bool CheckInstalledComponent(SmartCOMPtr<ISetupPackageReference> package, |
| 120 | bool& bWin10SDK, bool& bWin81SDK); |
| 121 | int ChooseVSInstance(std::vector<VSInstanceInfo> const& vecVSInstances); |
| 122 | bool EnumerateAndChooseVSInstance(); |
| 123 | bool LoadSpecifiedVSInstanceFromDisk(); |
| 124 | bool EnumerateVSInstancesWithVswhere( |
| 125 | std::vector<VSInstanceInfo>& VSInstances); |
| 126 | bool EnumerateVSInstancesWithCOM(std::vector<VSInstanceInfo>& VSInstances); |
| 127 | |
| 128 | unsigned int Version; |
| 129 | |
| 130 | // COM ptrs to query about VS instances |
| 131 | SmartCOMPtr<ISetupConfiguration> setupConfig; |
| 132 | SmartCOMPtr<ISetupConfiguration2> setupConfig2; |
| 133 | SmartCOMPtr<ISetupHelper> setupHelper; |
| 134 | // used to indicate failure in Initialize(), so we don't have to call again |
| 135 | bool initializationFailure = false; |
| 136 | // indicated if COM initialization is successful |
| 137 | HRESULT comInitialized; |
| 138 | // current best instance of VS selected |
| 139 | VSInstanceInfo chosenInstanceInfo; |
| 140 | bool IsEWDKEnabled(); |
| 141 | |
| 142 | std::string SpecifiedVSInstallLocation; |
| 143 | std::string SpecifiedVSInstallVersion; |
| 144 | }; |
no outgoing calls
no test coverage detected
searching dependent graphs…