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:
parent
8433c098b9
commit
f20b93a458
33 changed files with 1641 additions and 450 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue