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

AudioPluginHost: Include example plugins in project

This change adds the examples from `examples/Plugins` to the
AudioPluginHost, surfacing them as 'internal' plugins in the popup menu.
This commit is contained in:
reuk 2020-03-18 12:03:41 +00:00 committed by ed
parent 8433c098b9
commit f20b93a458
33 changed files with 1641 additions and 450 deletions

View file

@ -67,10 +67,19 @@ inline File getExamplesDirectory() noexcept
if (exampleDir.exists())
return exampleDir;
int numTries = 0; // keep track of the number of parent directories so we don't go on endlessly
// keep track of the number of parent directories so we don't go on endlessly
for (int numTries = 0; numTries < 15; ++numTries)
{
if (currentFile.getFileName() == "examples")
return currentFile;
const auto sibling = currentFile.getSiblingFile ("examples");
if (sibling.exists())
return sibling;
while (currentFile.getFileName() != "examples" && numTries++ < 15)
currentFile = currentFile.getParentDirectory();
}
return currentFile;
#endif