mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Revert "Projucer: Check if IDE project file exists when saving"
This reverts commit a71bda9adb.
This commit is contained in:
parent
7984458a8e
commit
6d711a2312
6 changed files with 11 additions and 34 deletions
|
|
@ -504,9 +504,6 @@ void ProjectContentComponent::openInSelectedIDE (bool saveFirst)
|
||||||
|
|
||||||
if (auto selectedExporter = headerComponent.getSelectedExporter())
|
if (auto selectedExporter = headerComponent.getSelectedExporter())
|
||||||
{
|
{
|
||||||
if (! selectedExporter->canLaunchProject())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (saveFirst)
|
if (saveFirst)
|
||||||
{
|
{
|
||||||
if (project->isTemporaryProject())
|
if (project->isTemporaryProject())
|
||||||
|
|
@ -515,7 +512,7 @@ void ProjectContentComponent::openInSelectedIDE (bool saveFirst)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project->hasChangedSinceSaved() || ! selectedExporter->getIDEProjectFile().exists())
|
if (project->hasChangedSinceSaved())
|
||||||
{
|
{
|
||||||
project->saveAsync (true, true, [safeThis = SafePointer<ProjectContentComponent> { this }] (Project::SaveResult r)
|
project->saveAsync (true, true, [safeThis = SafePointer<ProjectContentComponent> { this }] (Project::SaveResult r)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ public:
|
||||||
gradleVersion (settings, Ids::gradleVersion, getUndoManager(), "7.0.2"),
|
gradleVersion (settings, Ids::gradleVersion, getUndoManager(), "7.0.2"),
|
||||||
gradleToolchain (settings, Ids::gradleToolchain, getUndoManager(), "clang"),
|
gradleToolchain (settings, Ids::gradleToolchain, getUndoManager(), "clang"),
|
||||||
androidPluginVersion (settings, Ids::androidPluginVersion, getUndoManager(), "7.0.0"),
|
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();
|
name = getDisplayName();
|
||||||
targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderName());
|
targetLocationValue.setDefault (getDefaultBuildsRootFolder() + getTargetFolderName());
|
||||||
|
|
@ -165,25 +165,22 @@ public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
bool canLaunchProject() override
|
bool canLaunchProject() override
|
||||||
{
|
{
|
||||||
return androidExecutable.exists();
|
return AndroidExecutable.exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool launchProject() override
|
bool launchProject() override
|
||||||
{
|
{
|
||||||
if (! androidExecutable.exists())
|
if (! AndroidExecutable.exists())
|
||||||
{
|
{
|
||||||
jassertfalse;
|
jassertfalse;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto targetFolder = getTargetFolder();
|
||||||
|
|
||||||
// we have to surround the path with extra quotes, otherwise Android Studio
|
// we have to surround the path with extra quotes, otherwise Android Studio
|
||||||
// will choke if there are any space characters in the path.
|
// will choke if there are any space characters in the path.
|
||||||
return androidExecutable.startAsProcess (getIDEProjectFile().getFullPathName().quoted());
|
return AndroidExecutable.startAsProcess ("\"" + targetFolder.getFullPathName() + "\"");
|
||||||
}
|
|
||||||
|
|
||||||
File getIDEProjectFile() const override
|
|
||||||
{
|
|
||||||
return getTargetFolder();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
@ -1877,7 +1874,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
const File androidExecutable;
|
const File AndroidExecutable;
|
||||||
|
|
||||||
JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter)
|
JUCE_DECLARE_NON_COPYABLE (AndroidProjectExporter)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -126,12 +126,7 @@ public:
|
||||||
|
|
||||||
bool launchProject() override
|
bool launchProject() override
|
||||||
{
|
{
|
||||||
return getCLionExecutableOrApp().startAsProcess (getIDEProjectFile().getFullPathName().quoted());
|
return getCLionExecutableOrApp().startAsProcess (getTargetFolder().getFullPathName().quoted());
|
||||||
}
|
|
||||||
|
|
||||||
File getIDEProjectFile() const override
|
|
||||||
{
|
|
||||||
return getTargetFolder();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String getDescription() override
|
String getDescription() override
|
||||||
|
|
|
||||||
|
|
@ -1476,7 +1476,7 @@ public:
|
||||||
bool launchProject() override
|
bool launchProject() override
|
||||||
{
|
{
|
||||||
#if JUCE_WINDOWS
|
#if JUCE_WINDOWS
|
||||||
return getIDEProjectFile().startAsProcess();
|
return getSLNFile().startAsProcess();
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1491,11 +1491,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
File getIDEProjectFile() const override
|
|
||||||
{
|
|
||||||
return getSLNFile();
|
|
||||||
}
|
|
||||||
|
|
||||||
void createExporterProperties (PropertyListBuilder& props) override
|
void createExporterProperties (PropertyListBuilder& props) override
|
||||||
{
|
{
|
||||||
props.add (new TextPropertyComponent (manifestFileValue, "Manifest file", 8192, false),
|
props.add (new TextPropertyComponent (manifestFileValue, "Manifest file", 8192, false),
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ public:
|
||||||
bool launchProject() override
|
bool launchProject() override
|
||||||
{
|
{
|
||||||
#if JUCE_MAC
|
#if JUCE_MAC
|
||||||
return getIDEProjectFile().startAsProcess();
|
return getProjectBundle().startAsProcess();
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -675,11 +675,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
File getIDEProjectFile() const override
|
|
||||||
{
|
|
||||||
return getProjectBundle();
|
|
||||||
}
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
void create (const OwnedArray<LibraryModule>&) const override
|
void create (const OwnedArray<LibraryModule>&) const override
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,6 @@ public:
|
||||||
virtual bool isOSX() const = 0;
|
virtual bool isOSX() const = 0;
|
||||||
virtual bool isiOS() const = 0;
|
virtual bool isiOS() const = 0;
|
||||||
|
|
||||||
virtual File getIDEProjectFile() const { return {}; }
|
|
||||||
|
|
||||||
virtual String getNewLineString() const = 0;
|
virtual String getNewLineString() const = 0;
|
||||||
virtual String getDescription() { return {}; }
|
virtual String getDescription() { return {}; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue