Use library location not binary location to locate relative paths

* This means that things will work successfully even if the 'executable' is
  actually e.g. python3 in a system directory and nowhere related to where the
  renderdoc library is.
This commit is contained in:
baldurk
2018-10-24 15:57:50 +01:00
parent b42931e238
commit afb67f9035
13 changed files with 169 additions and 133 deletions
+4 -4
View File
@@ -249,11 +249,11 @@ std::string getToolPath(ToolDir subdir, const std::string &toolname, bool checkE
// finally try to locate it in our own distributed android subfolder
{
std::string exepath;
FileIO::GetExecutableFilename(exepath);
std::string exedir = dirname(FileIO::GetFullPathname(exepath));
std::string libpath;
FileIO::GetLibraryFilename(libpath);
std::string libdir = dirname(FileIO::GetFullPathname(libpath));
toolpath = exedir + "/plugins/android/" + toolname;
toolpath = libdir + "/plugins/android/" + toolname;
if(toolExists(toolpath))
{
if(toolname == "adb")