From 9c54ccc99bb5a9ebf48bf80efa277d976f181945 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 15 Mar 2018 14:34:39 +0000 Subject: [PATCH] Projucer: Fixed an issue where the DemoRunner executable could not be found in the JUCE root directory --- .../Source/Application/jucer_Application.cpp | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index 59a0e9b39a..0e6f51ec4c 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -732,14 +732,20 @@ File ProjucerApplication::findDemoRunnerExecutable() const noexcept extension = {}; #endif - auto precompiledFile = getJUCEExamplesDirectoryPathFromGlobal().getChildFile ("DemoRunner" + extension); + auto juceDir = getAppSettings().getStoredPath (Ids::jucePath).toString(); + + if (juceDir.isNotEmpty()) + { + auto precompiledFile = File (juceDir).getChildFile ("DemoRunner" + extension); + + #if JUCE_MAC + if (precompiledFile.exists()) + #else + if (precompiledFile.existsAsFile()) + #endif + return precompiledFile; + } - #if JUCE_MAC - if (precompiledFile.exists()) - #else - if (precompiledFile.existsAsFile()) - #endif - return precompiledFile; return {}; }