mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Check if IDE project file exists when saving
This commit is contained in:
parent
2224bb9760
commit
a71bda9adb
6 changed files with 34 additions and 11 deletions
|
|
@ -141,7 +141,7 @@ public:
|
|||
gradleVersion (settings, Ids::gradleVersion, getUndoManager(), "7.0.2"),
|
||||
gradleToolchain (settings, Ids::gradleToolchain, getUndoManager(), "clang"),
|
||||
androidPluginVersion (settings, Ids::androidPluginVersion, getUndoManager(), "7.0.0"),
|
||||
AndroidExecutable (getAppSettings().getStoredPath (Ids::androidStudioExePath, TargetOS::getThisOS()).get().toString())
|
||||
androidExecutable (getAppSettings().getStoredPath (Ids::androidStudioExePath, TargetOS::getThisOS()).get().toString())
|
||||
{
|
||||
name = getDisplayName();
|
||||
targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderName());
|
||||
|
|
@ -165,22 +165,25 @@ public:
|
|||
//==============================================================================
|
||||
bool canLaunchProject() override
|
||||
{
|
||||
return AndroidExecutable.exists();
|
||||
return androidExecutable.exists();
|
||||
}
|
||||
|
||||
bool launchProject() override
|
||||
{
|
||||
if (! AndroidExecutable.exists())
|
||||
if (! androidExecutable.exists())
|
||||
{
|
||||
jassertfalse;
|
||||
return false;
|
||||
}
|
||||
|
||||
auto targetFolder = getTargetFolder();
|
||||
|
||||
// we have to surround the path with extra quotes, otherwise Android Studio
|
||||
// will choke if there are any space characters in the path.
|
||||
return AndroidExecutable.startAsProcess ("\"" + targetFolder.getFullPathName() + "\"");
|
||||
return androidExecutable.startAsProcess (getIDEProjectFile().getFullPathName().quoted());
|
||||
}
|
||||
|
||||
File getIDEProjectFile() const override
|
||||
{
|
||||
return getTargetFolder();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -1874,7 +1877,7 @@ private:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
const File AndroidExecutable;
|
||||
const File androidExecutable;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue