Add a message if adb couldn't be found, reduce windows error spam

This commit is contained in:
baldurk
2019-04-22 18:39:52 +01:00
parent 2eac0ab03c
commit 9a94ec03cd
2 changed files with 14 additions and 2 deletions
+10
View File
@@ -331,6 +331,16 @@ void initAdb()
if(adb.find('/') != std::string::npos || adb.find('\\') != std::string::npos)
workdir = get_dirname(adb);
RDCLOG("Initialising adb using '%s'", adb.c_str());
if(adb.empty() || !FileIO::exists(adb.c_str()) || !FileIO::exists((adb + ".exe").c_str()))
{
if(FileIO::FindFileInPath(adb.c_str()) == "")
RDCWARN(
"Couldn't locate adb. Ensure adb is in PATH, ANDROID_SDK or ANDROID_HOME is set, or you "
"configure your SDK location");
}
Process::LaunchProcess(adb.c_str(), workdir.c_str(), "start-server", true);
}
void shutdownAdb()