From 1be7db03cd54cd1358e5cf19fb5f4c72077e728a Mon Sep 17 00:00:00 2001 From: hogliux Date: Fri, 16 Mar 2018 10:10:18 +0000 Subject: [PATCH] Fixed an issue where the DemoRunner would not find any assets when opened manually on macOS --- examples/Assets/DemoUtilities.h | 2 +- examples/DemoRunner/Source/Demos/JUCEDemos.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Assets/DemoUtilities.h b/examples/Assets/DemoUtilities.h index b8b60d001c..92108d8490 100644 --- a/examples/Assets/DemoUtilities.h +++ b/examples/Assets/DemoUtilities.h @@ -58,7 +58,7 @@ inline File getExamplesDirectory() noexcept return mo.toString(); #else - auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentExecutableFile); + auto currentFile = File::getSpecialLocation (File::SpecialLocationType::currentApplicationFile); auto exampleDir = currentFile.getParentDirectory().getChildFile ("examples"); if (exampleDir.exists()) diff --git a/examples/DemoRunner/Source/Demos/JUCEDemos.cpp b/examples/DemoRunner/Source/Demos/JUCEDemos.cpp index 79934b0c5d..b8e8c9dfcb 100644 --- a/examples/DemoRunner/Source/Demos/JUCEDemos.cpp +++ b/examples/DemoRunner/Source/Demos/JUCEDemos.cpp @@ -51,7 +51,7 @@ JUCEDemos::DemoCategory& JUCEDemos::getCategory (const String& name) void JUCEDemos::registerDemo (std::function 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 (f == File())