From a521c2aae2aa340e05950e5e4d242a2b2b89238b Mon Sep 17 00:00:00 2001 From: "U-ole-PC\\ole" Date: Tue, 7 Jun 2016 12:49:52 +0200 Subject: [PATCH] MSYS2: path to mingw install now set correctly for newly upgraded MSYS2 system --- src/config.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/config.cc b/src/config.cc index 469a2f2..b3aa217 100644 --- a/src/config.cc +++ b/src/config.cc @@ -27,14 +27,9 @@ Config::Config() { } #ifdef _WIN32 - auto env_WD=std::getenv("WD"); - auto env_MSYSTEM=std::getenv("MSYSTEM"); - if(env_WD!=NULL && env_MSYSTEM!=NULL) { - terminal.msys2_mingw_path=boost::filesystem::path(env_WD).parent_path().parent_path().parent_path(); - std::string msystem=env_MSYSTEM; - std::transform(msystem.begin(), msystem.end(), msystem.begin(), ::tolower); - terminal.msys2_mingw_path/=msystem; - } + auto env_MSYSTEM_PREFIX=std::getenv("MSYSTEM_PREFIX"); + if(env_MSYSTEM_PREFIX!=NULL) + terminal.msys2_mingw_path=boost::filesystem::path(env_MSYSTEM_PREFIX); #endif }