mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Deprecate the CLion exporter
This commit is contained in:
parent
6e02c45d37
commit
336398893d
3 changed files with 51 additions and 9 deletions
|
|
@ -653,6 +653,7 @@ Result Project::loadDocument (const File& file)
|
|||
|
||||
setChangedFlag (false);
|
||||
|
||||
updateExporterWarnings();
|
||||
updateLicenseWarning();
|
||||
|
||||
return Result::ok();
|
||||
|
|
@ -828,6 +829,20 @@ void Project::updateModuleWarnings()
|
|||
updateModuleNotFoundWarning (moduleNotFound);
|
||||
}
|
||||
|
||||
void Project::updateExporterWarnings()
|
||||
{
|
||||
auto isClionPresent = [this]()
|
||||
{
|
||||
for (ExporterIterator exporter (*this); exporter.next();)
|
||||
if (exporter->isCLion())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}();
|
||||
|
||||
updateCLionWarning (isClionPresent);
|
||||
}
|
||||
|
||||
void Project::updateCppStandardWarning (bool showWarning)
|
||||
{
|
||||
if (showWarning)
|
||||
|
|
@ -893,6 +908,14 @@ void Project::updateOldProjucerWarning (bool showWarning)
|
|||
removeProjectMessage (ProjectMessages::Ids::oldProjucer);
|
||||
}
|
||||
|
||||
void Project::updateCLionWarning (bool showWarning)
|
||||
{
|
||||
if (showWarning)
|
||||
addProjectMessage (ProjectMessages::Ids::cLion, {});
|
||||
else
|
||||
removeProjectMessage (ProjectMessages::Ids::cLion);
|
||||
}
|
||||
|
||||
void Project::updateModuleNotFoundWarning (bool showWarning)
|
||||
{
|
||||
if (showWarning)
|
||||
|
|
@ -1050,6 +1073,8 @@ void Project::valueTreeChildAdded (ValueTree& parent, ValueTree& child)
|
|||
|
||||
if (child.getType() == Ids::MODULE)
|
||||
updateModuleWarnings();
|
||||
else if (parent.getType() == Ids::EXPORTFORMATS)
|
||||
updateExporterWarnings();
|
||||
|
||||
changed();
|
||||
}
|
||||
|
|
@ -1060,6 +1085,8 @@ void Project::valueTreeChildRemoved (ValueTree& parent, ValueTree& child, int in
|
|||
|
||||
if (child.getType() == Ids::MODULE)
|
||||
updateModuleWarnings();
|
||||
else if (parent.getType() == Ids::EXPORTFORMATS)
|
||||
updateExporterWarnings();
|
||||
|
||||
changed();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ namespace ProjectMessages
|
|||
DECLARE_ID (jucerFileModified);
|
||||
DECLARE_ID (missingModuleDependencies);
|
||||
DECLARE_ID (oldProjucer);
|
||||
DECLARE_ID (cLion);
|
||||
DECLARE_ID (newVersionAvailable);
|
||||
|
||||
DECLARE_ID (notification);
|
||||
|
|
@ -60,17 +61,15 @@ namespace ProjectMessages
|
|||
|
||||
inline Identifier getTypeForMessage (const Identifier& message)
|
||||
{
|
||||
if (message == Ids::incompatibleLicense || message == Ids::cppStandard || message == Ids::moduleNotFound
|
||||
|| message == Ids::jucePath || message == Ids::jucerFileModified || message == Ids::missingModuleDependencies
|
||||
|| message == Ids::oldProjucer)
|
||||
{
|
||||
static Identifier warnings[] = { Ids::incompatibleLicense, Ids::cppStandard, Ids::moduleNotFound,
|
||||
Ids::jucePath, Ids::jucerFileModified, Ids::missingModuleDependencies,
|
||||
Ids::oldProjucer, Ids::cLion };
|
||||
|
||||
if (std::find (std::begin (warnings), std::end (warnings), message) != std::end (warnings))
|
||||
return Ids::warning;
|
||||
}
|
||||
|
||||
if (message == Ids::newVersionAvailable)
|
||||
{
|
||||
return Ids::notification;
|
||||
}
|
||||
|
||||
jassertfalse;
|
||||
return {};
|
||||
|
|
@ -86,6 +85,7 @@ namespace ProjectMessages
|
|||
if (message == Ids::missingModuleDependencies) return "Missing Module Dependencies";
|
||||
if (message == Ids::oldProjucer) return "Projucer Out of Date";
|
||||
if (message == Ids::newVersionAvailable) return "New Version Available";
|
||||
if (message == Ids::cLion) return "Deprecated Exporter";
|
||||
|
||||
jassertfalse;
|
||||
return {};
|
||||
|
|
@ -101,6 +101,7 @@ namespace ProjectMessages
|
|||
if (message == Ids::missingModuleDependencies) return "Module(s) have missing dependencies.";
|
||||
if (message == Ids::oldProjucer) return "The version of the Projucer you are using is out of date.";
|
||||
if (message == Ids::newVersionAvailable) return "A new version of JUCE is available to download.";
|
||||
if (message == Ids::cLion) return "The CLion exporter is deprecated. Use JUCE's CMake support instead.";
|
||||
|
||||
jassertfalse;
|
||||
return {};
|
||||
|
|
@ -609,9 +610,11 @@ private:
|
|||
void updateJUCEPathWarning();
|
||||
|
||||
void updateModuleWarnings();
|
||||
void updateExporterWarnings();
|
||||
void updateCppStandardWarning (bool showWarning);
|
||||
void updateMissingModuleDependenciesWarning (bool showWarning);
|
||||
void updateOldProjucerWarning (bool showWarning);
|
||||
void updateCLionWarning (bool showWarning);
|
||||
void updateModuleNotFoundWarning (bool showWarning);
|
||||
|
||||
ValueTree projectMessages { ProjectMessages::Ids::projectMessages, {},
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ protected:
|
|||
|
||||
public:
|
||||
//==============================================================================
|
||||
static String getDisplayName() { return "CLion (beta)"; }
|
||||
static String getDisplayName() { return "CLion [Deprecated]"; }
|
||||
static String getValueTreeTypeName() { return "CLION"; }
|
||||
static String getTargetFolderName() { return "CLion"; }
|
||||
|
||||
|
|
@ -131,7 +131,19 @@ public:
|
|||
{
|
||||
String description;
|
||||
|
||||
description << "The " << getDisplayName() << " exporter produces a single CMakeLists.txt file with "
|
||||
description << "*****" << newLine
|
||||
<< newLine
|
||||
<< "This exporter is deprecated." << newLine
|
||||
<< newLine
|
||||
<< "CLion can open any CMake-based projects and JUCE's direct CMake support provides a much more "
|
||||
<< "flexible way of configuring CMake. To get started using JUCE with CMake please see the guide in "
|
||||
<< "the 'docs/CMake API.md' file in the JUCE source code." << newLine
|
||||
<< newLine
|
||||
<< "This exporter will no longer be updated and will eventually be removed from the Projucer." << newLine
|
||||
<< newLine
|
||||
<< "*****" << newLine
|
||||
<< newLine
|
||||
<< "This CLion exporter produces a single CMakeLists.txt file with "
|
||||
<< "multiple platform dependent sections, where the configuration for each section "
|
||||
<< "is inherited from other exporters added to this project." << newLine
|
||||
<< newLine
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue