MCPcopy Create free account
hub / github.com/Kitware/CMake / cmVSSetupAPIHelper

Class cmVSSetupAPIHelper

Source/cmVSSetupHelper.h:99–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97};
98
99class cmVSSetupAPIHelper
100{
101public:
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
115private:
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};

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…