Browse Source

Fixed an issue where the DemoRunner would not find any assets when opened manually on macOS

tags/2021-05-28
hogliux 8 years ago
parent
commit
1be7db03cd
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      examples/Assets/DemoUtilities.h
  2. +1
    -1
      examples/DemoRunner/Source/Demos/JUCEDemos.cpp

+ 1
- 1
examples/Assets/DemoUtilities.h View File

@@ -58,7 +58,7 @@ inline File getExamplesDirectory() noexcept
return mo.toString(); return mo.toString();
#else #else
auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentExecutableFile);
auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile);
auto exampleDir = currentFile.getParentDirectory().getChildFile ("examples"); auto exampleDir = currentFile.getParentDirectory().getChildFile ("examples");
if (exampleDir.exists()) if (exampleDir.exists())


+ 1
- 1
examples/DemoRunner/Source/Demos/JUCEDemos.cpp View File

@@ -51,7 +51,7 @@ JUCEDemos::DemoCategory& JUCEDemos::getCategory (const String& name)
void JUCEDemos::registerDemo (std::function<Component*()> constructorCallback, const String& filePath, const String& category, bool isHeavyweight) void JUCEDemos::registerDemo (std::function<Component*()> constructorCallback, const String& filePath, const String& category, bool isHeavyweight)
{ {
auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::SpecialLocationType::currentExecutableFile));
auto f = findExamplesDirectoryFromExecutable (File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile));
#if ! (JUCE_ANDROID || JUCE_IOS) #if ! (JUCE_ANDROID || JUCE_IOS)
if (f == File()) if (f == File())


Loading…
Cancel
Save