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

This commit is contained in:
baldurk
2019-04-22 10:28:19 +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()
+4 -2
View File
@@ -556,7 +556,8 @@ static PROCESS_INFORMATION RunProcess(const char *app, const char *workingDir, c
if(!retValue)
{
RDCWARN("Process %s could not be loaded.", app);
if(!internal)
RDCWARN("Process %s could not be loaded.", app);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
RDCEraseEl(pi);
@@ -1003,7 +1004,8 @@ uint32_t Process::LaunchProcess(const char *app, const char *workingDir, const c
if(pi.dwProcessId == 0)
{
RDCWARN("Couldn't launch process '%s'", app);
if(!internal)
RDCWARN("Couldn't launch process '%s'", app);
return 0;
}