mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Search for Android SDK in common locations on macOS
* Environment variables still take priority, but it can be common for them not to be set so we need to look here.
This commit is contained in:
@@ -240,6 +240,22 @@ std::string getToolPath(ToolDir subdir, const std::string &toolname, bool checkE
|
||||
sdk = env ? env : "";
|
||||
}
|
||||
|
||||
#if ENABLED(RDOC_APPLE)
|
||||
// on macOS it's common not to have the environment variable globally available, so try the home
|
||||
// Library folder first, then the global folder
|
||||
if(sdk.empty() || !FileIO::exists(sdk.c_str()))
|
||||
{
|
||||
std::string librarySDK = FileIO::GetHomeFolderFilename() + "/Library/Android/sdk";
|
||||
sdk = FileIO::exists(librarySDK.c_str()) ? librarySDK : "";
|
||||
}
|
||||
|
||||
if(sdk.empty() || !FileIO::exists(sdk.c_str()))
|
||||
{
|
||||
std::string librarySDK = "/Library/Android/sdk";
|
||||
sdk = FileIO::exists(librarySDK.c_str()) ? librarySDK : "";
|
||||
}
|
||||
#endif
|
||||
|
||||
// maybe in future we can try to search in common install locations.
|
||||
|
||||
toolpath = getToolInSDK(subdir, jdk, sdk, toolname);
|
||||
|
||||
Reference in New Issue
Block a user