diff --git a/src/lib/utility/file/FileSystem.cpp b/src/lib/utility/file/FileSystem.cpp index 56125f20..9f36e01f 100644 --- a/src/lib/utility/file/FileSystem.cpp +++ b/src/lib/utility/file/FileSystem.cpp @@ -207,20 +207,37 @@ void FileSystem::createDirectory(const FilePath& path) boost::filesystem::create_directories(path.str()); } -std::vector FileSystem::getSubDirectories(const FilePath &path) +std::vector FileSystem::getDirectSubDirectories(const FilePath& path) { std::vector v; - if (!path.exists() || !path.isDirectory()) + if (path.exists() && path.isDirectory()) { - return v; + for (boost::filesystem::directory_iterator end, dir(path.str()); dir != end; dir++) + { + if (boost::filesystem::is_directory(dir->path())) + { + v.push_back(FilePath(dir->path())); + } + } } - for (boost::filesystem::recursive_directory_iterator end, dir(path.str()); dir != end; dir++) + return v; +} + + +std::vector FileSystem::getRecursiveSubDirectories(const FilePath &path) +{ + std::vector v; + + if (path.exists() && path.isDirectory()) { - if (boost::filesystem::is_directory(dir->path())) + for (boost::filesystem::recursive_directory_iterator end, dir(path.str()); dir != end; dir++) { - v.push_back(FilePath(dir->path())); + if (boost::filesystem::is_directory(dir->path())) + { + v.push_back(FilePath(dir->path())); + } } } diff --git a/src/lib/utility/file/FileSystem.h b/src/lib/utility/file/FileSystem.h index 5cb469c2..84e0b434 100644 --- a/src/lib/utility/file/FileSystem.h +++ b/src/lib/utility/file/FileSystem.h @@ -31,7 +31,8 @@ public: static bool copy_directory(const FilePath& from, const FilePath& to); static void createDirectory(const FilePath& path); - static std::vector getSubDirectories(const FilePath& path); + static std::vector getDirectSubDirectories(const FilePath& path); + static std::vector getRecursiveSubDirectories(const FilePath& path); static std::string fileName(const std::string& path); static std::string absoluteFilePath(const std::string& path); diff --git a/src/lib_gui/CMakeLists.txt b/src/lib_gui/CMakeLists.txt index d2732210..b340dcd0 100644 --- a/src/lib_gui/CMakeLists.txt +++ b/src/lib_gui/CMakeLists.txt @@ -239,8 +239,10 @@ add_files( utility/path_detector/cxx_header/CxxFrameworkPathDetector.h utility/path_detector/cxx_header/CxxHeaderPathDetector.cpp utility/path_detector/cxx_header/CxxHeaderPathDetector.h - utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp - utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h + utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp + utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h + utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp + utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp utility/path_detector/cxx_header/utilityCxxHeaderDetection.h diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp new file mode 100644 index 00000000..cf54dcd8 --- /dev/null +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.cpp @@ -0,0 +1,108 @@ +#include "utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h" + +#include + +#include +#include + +#include "utility/file/FilePath.h" +#include "utility/path_detector/cxx_header/utilityCxxHeaderDetection.h" +#include "utility/utility.h" + +CxxVs10To14HeaderPathDetector::CxxVs10To14HeaderPathDetector(VisualStudioType type, bool isExpress, ApplicationArchitectureType architecture) + : PathDetector(visualStudioTypeToString(type) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? " 64 Bit" : "")) + , m_version(visualStudioTypeToVersion(type)) + , m_isExpress(isExpress) + , m_architecture(architecture) +{ +} + +CxxVs10To14HeaderPathDetector::~CxxVs10To14HeaderPathDetector() +{ +} + +std::vector CxxVs10To14HeaderPathDetector::getPaths() const +{ + FilePath vsInstallPath = getVsInstallPathUsingRegistry(); + + // vc++ headers + std::vector headerSearchPaths; + if (vsInstallPath.exists()) + { + std::vector subdirectories; + subdirectories.push_back("vc/include"); + subdirectories.push_back("vc/atlmfc/include"); + + for (size_t i = 0; i < subdirectories.size(); i++) + { + FilePath headerSearchPath = vsInstallPath.concat(FilePath(subdirectories[i])); + if (headerSearchPath.exists()) + { + headerSearchPaths.push_back(headerSearchPath.canonical()); + } + } + } + + if (!headerSearchPaths.empty()) + { + utility::append(headerSearchPaths, utility::getWindowsSdkHeaderSearchPaths(m_architecture)); + } + + return headerSearchPaths; +} + +int CxxVs10To14HeaderPathDetector::visualStudioTypeToVersion(const VisualStudioType t) +{ + switch (t) + { + case VISUAL_STUDIO_2010: + return 10; + case VISUAL_STUDIO_2012: + return 11; + case VISUAL_STUDIO_2013: + return 12; + case VISUAL_STUDIO_2015: + return 14; + } + return 0; +} + +std::string CxxVs10To14HeaderPathDetector::visualStudioTypeToString(const VisualStudioType t) +{ + std::string ret = "Visual Studio"; + switch (t) + { + case VISUAL_STUDIO_2010: + ret += " 2010"; + case VISUAL_STUDIO_2012: + ret += " 2012"; + case VISUAL_STUDIO_2013: + ret += " 2013"; + case VISUAL_STUDIO_2015: + ret += " 2015"; + } + return ret; +} + +FilePath CxxVs10To14HeaderPathDetector::getVsInstallPathUsingRegistry() const +{ + QString key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\"; + if (m_architecture == APPLICATION_ARCHITECTURE_X86_32) + { + key += "Wow6432Node\\"; + } + key += "Microsoft\\"; + key += (m_isExpress ? "VCExpress" : "VisualStudio"); + key += "\\" + QString::number(m_version) + ".0"; + + QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows. + QString value = expressKey.value("InstallDir").toString() + "../../"; + + FilePath path(value.toStdString()); + if (path.exists()) + { + return path; + } + + return FilePath(); +} diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h b/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h new file mode 100644 index 00000000..69d532c2 --- /dev/null +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h @@ -0,0 +1,34 @@ +#ifndef CXX_VS_10_TO_14_HEADER_PATH_DETECTOR_H +#define CXX_VS_10_TO_14_HEADER_PATH_DETECTOR_H + +#include "utility/path_detector/PathDetector.h" +#include "utility/ApplicationArchitectureType.h" + +class CxxVs10To14HeaderPathDetector : public PathDetector +{ +public: + enum VisualStudioType + { + VISUAL_STUDIO_2010, + VISUAL_STUDIO_2012, + VISUAL_STUDIO_2013, + VISUAL_STUDIO_2015 + }; + + CxxVs10To14HeaderPathDetector(VisualStudioType type, bool isExpress, ApplicationArchitectureType architecture); + virtual ~CxxVs10To14HeaderPathDetector(); + + virtual std::vector getPaths() const; + +private: + static int visualStudioTypeToVersion(const VisualStudioType t); + static std::string visualStudioTypeToString(const VisualStudioType t); + + FilePath getVsInstallPathUsingRegistry() const; + + const int m_version; + const bool m_isExpress; + const ApplicationArchitectureType m_architecture; +}; + +#endif // CXX_VS_10_TO_14_HEADER_PATH_DETECTOR_H diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp new file mode 100644 index 00000000..0df7a048 --- /dev/null +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.cpp @@ -0,0 +1,60 @@ +#include "utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h" + +#include + +#include "utility/file/FilePath.h" +#include "utility/file/FileSystem.h" +#include "utility/path_detector/cxx_header/utilityCxxHeaderDetection.h" +#include "utility/utilityApp.h" +#include "utility/utility.h" + +CxxVs15HeaderPathDetector::CxxVs15HeaderPathDetector() + : PathDetector("Visual Studio 2017") +{ +} + +CxxVs15HeaderPathDetector::~CxxVs15HeaderPathDetector() +{ +} + +std::vector CxxVs15HeaderPathDetector::getPaths() const +{ + std::vector headerSearchPaths; + + { + const std::vector expandedPaths = FilePath("%ProgramFiles(x86)%/Microsoft Visual Studio/Installer/vswhere.exe").expandEnvironmentVariables(); + if (!expandedPaths.empty()) + { + const std::string command = "\"" + expandedPaths[0].str() + "\" -latest -property installationPath"; + const std::string command2 = "\"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe\""; + const std::string output = utility::executeProcess(command, "", 10000); + + const FilePath vsInstallPath(output); + if (vsInstallPath.exists()) + { + for (const FilePath& versionPath : FileSystem::getDirectSubDirectories(vsInstallPath.concat(FilePath("VC/Tools/MSVC")))) + { + if (versionPath.exists()) + { + headerSearchPaths.push_back(versionPath.concat(FilePath("include"))); + headerSearchPaths.push_back(versionPath.concat(FilePath("atlmfc/include"))); + } + } + headerSearchPaths.push_back(vsInstallPath.concat(FilePath("VC/Auxiliary/VS/include"))); + headerSearchPaths.push_back(vsInstallPath.concat(FilePath("VC/Auxiliary/VS/UnitTest/include"))); + } + } + } + + if (!headerSearchPaths.empty()) + { + std::vector windowsSdkHeaderSearchPaths = utility::getWindowsSdkHeaderSearchPaths(APPLICATION_ARCHITECTURE_X86_32); + if (windowsSdkHeaderSearchPaths.empty()) + { + windowsSdkHeaderSearchPaths = utility::getWindowsSdkHeaderSearchPaths(APPLICATION_ARCHITECTURE_X86_64); + } + utility::append(headerSearchPaths, windowsSdkHeaderSearchPaths); + } + + return headerSearchPaths; +} diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h new file mode 100644 index 00000000..120273bb --- /dev/null +++ b/src/lib_gui/utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h @@ -0,0 +1,16 @@ +#ifndef CXX_VS_15_HEADER_PATH_DETECTOR_H +#define CXX_VS_15_HEADER_PATH_DETECTOR_H + +#include "utility/path_detector/PathDetector.h" +#include "utility/ApplicationArchitectureType.h" + +class CxxVs15HeaderPathDetector: public PathDetector +{ +public: + CxxVs15HeaderPathDetector(); + virtual ~CxxVs15HeaderPathDetector(); + + virtual std::vector getPaths() const; +}; + +#endif // CXX_VS_15_HEADER_PATH_DETECTOR_H diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp b/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp deleted file mode 100644 index 2436c6b1..00000000 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.cpp +++ /dev/null @@ -1,126 +0,0 @@ -#include "utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h" - -#include - -#include -#include - -#include "utility/file/FilePath.h" - -CxxVsHeaderPathDetector::CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture) - : PathDetector("Visual Studio " + std::to_string(version) + (isExpress ? " Express" : "") + (architecture == APPLICATION_ARCHITECTURE_X86_64 ? " 64 Bit" : "")) - , m_version(version) - , m_isExpress(isExpress) - , m_architecture(architecture) -{ -} - -CxxVsHeaderPathDetector::~CxxVsHeaderPathDetector() -{ -} - -std::vector CxxVsHeaderPathDetector::getPaths() const -{ - FilePath vsInstallPath = getVsInstallPathUsingRegistry(); - - // vc++ headers - std::vector headerPaths; - if (vsInstallPath.exists()) - { - std::vector subdirectories; - subdirectories.push_back("vc/include"); - subdirectories.push_back("vc/atlmfc/include"); - - for (size_t i = 0; i < subdirectories.size(); i++) - { - FilePath headerSearchPath = vsInstallPath.concat(FilePath(subdirectories[i])); - if (headerSearchPath.exists()) - { - headerPaths.push_back(headerSearchPath.canonical()); - } - } - } - - if (headerPaths.size() > 0) - { - //windows sdk - std::vector windowsSdkVersions; - windowsSdkVersions.push_back("v8.1A"); - windowsSdkVersions.push_back("v8.0A"); - windowsSdkVersions.push_back("v7.1A"); - windowsSdkVersions.push_back("v7.0A"); - - for (size_t i = 0; i < windowsSdkVersions.size(); i++) - { - FilePath sdkPath = getWindowsSdkPathUsingRegistry(windowsSdkVersions[i]); - if (sdkPath.exists()) - { - FilePath sdkIncludePath = sdkPath.concat(FilePath("include/")); - if (sdkIncludePath.exists()) - { - std::vector subdirectories; - subdirectories.push_back("shared"); - subdirectories.push_back("um"); - subdirectories.push_back("winrt"); - - bool usingSubdirectories = false; - for (size_t j = 0; j < subdirectories.size(); j++) - { - FilePath sdkSubdirectory = sdkPath.concat(FilePath(subdirectories[j])); - if (sdkSubdirectory.exists()) - { - headerPaths.push_back(sdkSubdirectory); - usingSubdirectories = true; - } - } - - if (!usingSubdirectories) - { - headerPaths.push_back(sdkIncludePath); - } - break; - } - } - } - } - return headerPaths; -} - -FilePath CxxVsHeaderPathDetector::getVsInstallPathUsingRegistry() const -{ - QString key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\"; - if (m_architecture == APPLICATION_ARCHITECTURE_X86_32) - { - key += "Wow6432Node\\"; - } - key += "Microsoft\\"; - key += (m_isExpress ? "VCExpress" : "VisualStudio"); - key += "\\" + QString::number(m_version) + ".0"; - - QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows. - QString value = expressKey.value("InstallDir").toString() + "../../"; - - FilePath path(value.toStdString()); - if (path.exists()) - { - return path; - } - - return FilePath(); -} - -FilePath CxxVsHeaderPathDetector::getWindowsSdkPathUsingRegistry(const std::string& version) const -{ - QString key(("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\" + version).c_str()); - - QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows. - QString value = expressKey.value("InstallationFolder").toString(); - - FilePath path(value.toStdString()); - if (path.exists()) - { - return path; - } - - return FilePath(); -} diff --git a/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h b/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h deleted file mode 100644 index 3eb2494a..00000000 --- a/src/lib_gui/utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef CXX_VS_HEADER_PATH_DETECTOR_H -#define CXX_VS_HEADER_PATH_DETECTOR_H - -#include "utility/path_detector/PathDetector.h" -#include "utility/ApplicationArchitectureType.h" - -class CxxVsHeaderPathDetector: public PathDetector -{ -public: - CxxVsHeaderPathDetector(int version, bool isExpress, ApplicationArchitectureType architecture); - virtual ~CxxVsHeaderPathDetector(); - - virtual std::vector getPaths() const; - -private: - FilePath getVsInstallPathUsingRegistry() const; - FilePath getWindowsSdkPathUsingRegistry(const std::string& version) const; - - const int m_version; - const bool m_isExpress; - const ApplicationArchitectureType m_architecture; -}; - -#endif // CXX_VS_HEADER_PATH_DETECTOR_H diff --git a/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp b/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp index 04288d94..e31832fe 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp +++ b/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.cpp @@ -1,5 +1,9 @@ #include "utility/path_detector/cxx_header/utilityCxxHeaderDetection.h" +#include +#include + +#include "utility/file/FileSystem.h" #include "utility/utilityApp.h" #include "utility/utilityString.h" @@ -23,4 +27,87 @@ namespace utility return paths; } + + std::vector getWindowsSdkHeaderSearchPaths(ApplicationArchitectureType architectureType) + { + std::vector headerSearchPaths; + + std::vector windowsSdkVersions; + windowsSdkVersions.push_back("v8.1A"); + windowsSdkVersions.push_back("v8.1"); + windowsSdkVersions.push_back("v8.0A"); + windowsSdkVersions.push_back("v7.1A"); + windowsSdkVersions.push_back("v7.0A"); + + for (size_t i = 0; i < windowsSdkVersions.size(); i++) + { + FilePath sdkPath = getWindowsSdkRootPathUsingRegistry(architectureType, windowsSdkVersions[i]); + if (sdkPath.exists()) + { + FilePath sdkIncludePath = sdkPath.concat(FilePath("include/")); + if (sdkIncludePath.exists()) + { + std::vector subdirectories; + subdirectories.push_back("shared"); + subdirectories.push_back("um"); + subdirectories.push_back("winrt"); + + bool usingSubdirectories = false; + for (size_t j = 0; j < subdirectories.size(); j++) + { + FilePath sdkSubdirectory = sdkIncludePath.concat(FilePath(subdirectories[j])); + if (sdkSubdirectory.exists()) + { + headerSearchPaths.push_back(sdkSubdirectory); + usingSubdirectories = true; + } + } + + if (!usingSubdirectories) + { + headerSearchPaths.push_back(sdkIncludePath); + } + break; + } + } + } + { + FilePath sdkPath = getWindowsSdkRootPathUsingRegistry(architectureType, "v10.0"); + if (sdkPath.exists()) + { + for (const FilePath& versionPath : FileSystem::getDirectSubDirectories(sdkPath.concat(FilePath("include/")))) + { + const FilePath ucrtPath = versionPath.concat(FilePath("ucrt")); + if (ucrtPath.exists()) + { + headerSearchPaths.push_back(ucrtPath); + break; + } + } + } + } + + return headerSearchPaths; + } + + FilePath getWindowsSdkRootPathUsingRegistry(ApplicationArchitectureType architectureType, const std::string& sdkVersion) + { + QString key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\"; + if (architectureType == APPLICATION_ARCHITECTURE_X86_32) + { + key += "Wow6432Node\\"; + } + key += ("Microsoft\\Microsoft SDKs\\Windows\\" + sdkVersion).c_str(); + + QSettings expressKey(key, QSettings::NativeFormat); // NativeFormat means from Registry on Windows. + QString value = expressKey.value("InstallationFolder").toString(); + + FilePath path(value.toStdString()); + if (path.exists()) + { + return path; + } + + return FilePath(); + } } diff --git a/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.h b/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.h index 14441cd9..0ef9467b 100644 --- a/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.h +++ b/src/lib_gui/utility/path_detector/cxx_header/utilityCxxHeaderDetection.h @@ -4,9 +4,15 @@ #include #include +#include "utility/file/FilePath.h" +#include "utility/ApplicationArchitectureType.h" + namespace utility { std::vector getCxxHeaderPaths(const std::string& compilerName); + + std::vector getWindowsSdkHeaderSearchPaths(ApplicationArchitectureType architectureType); + FilePath getWindowsSdkRootPathUsingRegistry(ApplicationArchitectureType architectureType, const std::string& sdkVersion); } #endif // UTILITY_CXX_HEADER_DETECTION_H diff --git a/src/lib_gui/utility/utilityApp.cpp b/src/lib_gui/utility/utilityApp.cpp index 3c21bc3c..8be54766 100644 --- a/src/lib_gui/utility/utilityApp.cpp +++ b/src/lib_gui/utility/utilityApp.cpp @@ -40,6 +40,8 @@ std::string utility::executeProcess(const std::string& command, const std::strin s_runningProcesses.erase(&process); } + QProcess::ProcessError error = process.error(); + std::string processoutput = process.readAll().toStdString(); process.close(); processoutput = utility::trim(processoutput); diff --git a/src/lib_gui/utility/utilityPathDetection.cpp b/src/lib_gui/utility/utilityPathDetection.cpp index a051a195..d6828ef7 100644 --- a/src/lib_gui/utility/utilityPathDetection.cpp +++ b/src/lib_gui/utility/utilityPathDetection.cpp @@ -15,7 +15,8 @@ #include "utility/path_detector/cxx_header/CxxFrameworkPathDetector.h" #include "utility/path_detector/cxx_header/CxxHeaderPathDetector.h" -#include "utility/path_detector/cxx_header/CxxVsHeaderPathDetector.h" +#include "utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h" +#include "utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h" #include "utility/utilityApp.h" @@ -89,46 +90,33 @@ std::shared_ptr utility::getMavenExecutablePathDetector() std::shared_ptr utility::getCxxVsHeaderPathDetector() { std::shared_ptr combinedDetector = std::make_shared(); - combinedDetector->addDetector(std::make_shared(14, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(14, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(14, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(14, true, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(12, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(12, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(12, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(12, true, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(11, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(11, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(11, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(11, true, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(9, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(9, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(9, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(9, true, APPLICATION_ARCHITECTURE_X86_64)); + + combinedDetector->addDetector(std::make_shared()); + + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, false, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, false, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, true, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2015, true, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, false, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, false, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, true, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2013, true, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, false, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, false, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, true, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2012, true, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, false, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, false, APPLICATION_ARCHITECTURE_X86_64)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, true, APPLICATION_ARCHITECTURE_X86_32)); + combinedDetector->addDetector(std::make_shared(CxxVs10To14HeaderPathDetector::VISUAL_STUDIO_2010, true, APPLICATION_ARCHITECTURE_X86_64)); + return combinedDetector; } std::shared_ptr utility::getCxxHeaderPathDetector() { - std::shared_ptr combinedDetector = std::make_shared(); + std::shared_ptr combinedDetector = getCxxVsHeaderPathDetector(); combinedDetector->addDetector(std::make_shared("gcc")); - combinedDetector->addDetector(std::make_shared("clang")); - combinedDetector->addDetector(std::make_shared(14, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(14, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(14, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(14, true, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(12, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(12, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(12, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(12, true, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(11, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(11, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(11, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(11, true, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(9, false, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(9, false, APPLICATION_ARCHITECTURE_X86_64)); - combinedDetector->addDetector(std::make_shared(9, true, APPLICATION_ARCHITECTURE_X86_32)); - combinedDetector->addDetector(std::make_shared(9, true, APPLICATION_ARCHITECTURE_X86_64)); return combinedDetector; }