| @@ -733,11 +733,13 @@ static String getPlatformSpecificFileExtension() | |||||
| static File getPlatformSpecificProjectFolder() | static File getPlatformSpecificProjectFolder() | ||||
| { | { | ||||
| auto buildsFolder = getJUCEExamplesDirectoryPathFromGlobal().getChildFile ("DemoRunner").getChildFile ("Builds"); | |||||
| auto examplesDir = getJUCEExamplesDirectoryPathFromGlobal(); | |||||
| if (! buildsFolder.exists()) | |||||
| if (examplesDir == File()) | |||||
| return {}; | return {}; | ||||
| auto buildsFolder = examplesDir.getChildFile ("DemoRunner").getChildFile ("Builds"); | |||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| return buildsFolder.getChildFile ("MacOSX"); | return buildsFolder.getChildFile ("MacOSX"); | ||||
| #elif JUCE_WINDOWS | #elif JUCE_WINDOWS | ||||
| @@ -754,6 +756,9 @@ static File tryToFindDemoRunnerExecutableInBuilds() | |||||
| { | { | ||||
| auto projectFolder = getPlatformSpecificProjectFolder(); | auto projectFolder = getPlatformSpecificProjectFolder(); | ||||
| if (projectFolder == File()) | |||||
| return {}; | |||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| projectFolder = projectFolder.getChildFile ("build"); | projectFolder = projectFolder.getChildFile ("build"); | ||||
| auto demoRunnerExecutable = projectFolder.getChildFile ("Release").getChildFile ("DemoRunner.app"); | auto demoRunnerExecutable = projectFolder.getChildFile ("Release").getChildFile ("DemoRunner.app"); | ||||
| @@ -822,12 +827,13 @@ File ProjucerApplication::tryToFindDemoRunnerExecutable() | |||||
| if (hasScannedForDemoRunnerExecutable) | if (hasScannedForDemoRunnerExecutable) | ||||
| return lastDemoRunnerExectuableFile; | return lastDemoRunnerExectuableFile; | ||||
| hasScannedForDemoRunnerExecutable = true; | |||||
| auto demoRunnerExecutable = tryToFindDemoRunnerExecutableInBuilds(); | auto demoRunnerExecutable = tryToFindDemoRunnerExecutableInBuilds(); | ||||
| if (demoRunnerExecutable == File()) | if (demoRunnerExecutable == File()) | ||||
| demoRunnerExecutable = tryToFindPrebuiltDemoRunnerExecutable(); | demoRunnerExecutable = tryToFindPrebuiltDemoRunnerExecutable(); | ||||
| hasScannedForDemoRunnerExecutable = true; | |||||
| lastDemoRunnerExectuableFile = demoRunnerExecutable; | lastDemoRunnerExectuableFile = demoRunnerExecutable; | ||||
| return demoRunnerExecutable; | return demoRunnerExecutable; | ||||
| @@ -840,8 +846,16 @@ File ProjucerApplication::tryToFindDemoRunnerProject() | |||||
| if (hasScannedForDemoRunnerProject) | if (hasScannedForDemoRunnerProject) | ||||
| return lastDemoRunnerProjectFile; | return lastDemoRunnerProjectFile; | ||||
| hasScannedForDemoRunnerProject = true; | |||||
| auto projectFolder = getPlatformSpecificProjectFolder(); | auto projectFolder = getPlatformSpecificProjectFolder(); | ||||
| if (projectFolder == File()) | |||||
| { | |||||
| lastDemoRunnerProjectFile = {}; | |||||
| return {}; | |||||
| } | |||||
| #if JUCE_MAC | #if JUCE_MAC | ||||
| auto demoRunnerProjectFile = projectFolder.getChildFile ("DemoRunner.xcodeproj"); | auto demoRunnerProjectFile = projectFolder.getChildFile ("DemoRunner.xcodeproj"); | ||||
| #elif JUCE_WINDOWS | #elif JUCE_WINDOWS | ||||
| @@ -857,7 +871,6 @@ File ProjucerApplication::tryToFindDemoRunnerProject() | |||||
| #endif | #endif | ||||
| demoRunnerProjectFile = File(); | demoRunnerProjectFile = File(); | ||||
| hasScannedForDemoRunnerProject = true; | |||||
| lastDemoRunnerProjectFile = demoRunnerProjectFile; | lastDemoRunnerProjectFile = demoRunnerProjectFile; | ||||
| return demoRunnerProjectFile; | return demoRunnerProjectFile; | ||||