#include "utility/utilityPathDetection.h" #include "utility/logging/logging.h" #include "utility/path_detector/java_runtime/JavaPathDetectorLinux.h" #include "utility/path_detector/java_runtime/JavaPathDetectorMac.h" #include "utility/path_detector/java_runtime/JavaPathDetectorWindows.h" #include "utility/path_detector/jre_system_library/JreSystemLibraryPathDetectorLinux.h" #include "utility/path_detector/jre_system_library/JreSystemLibraryPathDetectorMac.h" #include "utility/path_detector/jre_system_library/JreSystemLibraryPathDetectorWindows.h" #include "utility/path_detector/maven_executable/MavenPathDetectorUnix.h" #include "utility/path_detector/maven_executable/MavenPathDetectorWindows.h" #include "utility/path_detector/cxx_header/CxxFrameworkPathDetector.h" #include "utility/path_detector/cxx_header/CxxHeaderPathDetector.h" #include "utility/path_detector/cxx_header/CxxVs10To14HeaderPathDetector.h" #include "utility/path_detector/cxx_header/CxxVs15HeaderPathDetector.h" #include "utility/utilityApp.h" std::shared_ptr utility::getJavaRuntimePathDetector() { std::shared_ptr combinedDetector = std::make_shared(); switch (utility::getOsType()) { case OS_WINDOWS: combinedDetector->addDetector(std::make_shared("1.8")); break; case OS_MAC: combinedDetector->addDetector(std::make_shared("1.8")); break; case OS_LINUX: combinedDetector->addDetector(std::make_shared("1.8")); break; default: LOG_WARNING("No suitable Java Runtime path detector found"); break; } return combinedDetector; } std::shared_ptr utility::getJreSystemLibraryPathsDetector() { std::shared_ptr combinedDetector = std::make_shared(); switch (utility::getOsType()) { case OS_WINDOWS: combinedDetector->addDetector(std::make_shared("1.8")); break; case OS_MAC: combinedDetector->addDetector(std::make_shared("1.8")); break; case OS_LINUX: combinedDetector->addDetector(std::make_shared("1.8")); break; default: LOG_WARNING("No suitable JRE system library path detector found"); break; } return combinedDetector; } std::shared_ptr utility::getMavenExecutablePathDetector() { std::shared_ptr combinedDetector = std::make_shared(); switch (utility::getOsType()) { case OS_WINDOWS: combinedDetector->addDetector(std::make_shared()); break; case OS_MAC: case OS_LINUX: combinedDetector->addDetector(std::make_shared()); break; default: LOG_WARNING("No suitable Maven path detector found"); break; } return combinedDetector; } std::shared_ptr utility::getCxxVsHeaderPathDetector() { std::shared_ptr combinedDetector = std::make_shared(); if (utility::getOsType() != OS_WINDOWS) { return combinedDetector; } 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 = getCxxVsHeaderPathDetector(); combinedDetector->addDetector(std::make_shared("clang")); combinedDetector->addDetector(std::make_shared("gcc")); return combinedDetector; } std::shared_ptr utility::getCxxFrameworkPathDetector() { std::shared_ptr combinedDetector = std::make_shared(); combinedDetector->addDetector(std::make_shared("clang")); combinedDetector->addDetector(std::make_shared("gcc")); return combinedDetector; }