1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Modify examples directory search so that the directory can be found when the DemoRunner is in the JUCE root folder

This commit is contained in:
hogliux 2018-03-15 14:37:10 +00:00
parent 9c54ccc99b
commit ce810ff0b9
2 changed files with 8 additions and 2 deletions

View file

@ -59,6 +59,10 @@ inline File getExamplesDirectory() noexcept
return mo.toString();
#else
auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentExecutableFile);
auto exampleDir = currentFile.getParentDirectory().getChildFile ("examples");
if (exampleDir.exists())
return exampleDir;
int numTries = 0; // keep track of the number of parent directories so we don't go on endlessly