mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
Code::Blocks: Deprecate the Code::Blocks exporter
This commit is contained in:
parent
dc30627632
commit
3604accc0f
3 changed files with 38 additions and 12 deletions
|
|
@ -906,6 +906,25 @@ void Project::updateModuleWarnings()
|
|||
updateModuleNotFoundWarning (moduleNotFound);
|
||||
}
|
||||
|
||||
void Project::updateExporterWarnings()
|
||||
{
|
||||
const Identifier deprecatedExporters[] = { "CODEBLOCKS_WINDOWS", "CODEBLOCKS_LINUX" };
|
||||
|
||||
for (const auto exporter : getExporters())
|
||||
{
|
||||
for (const auto& name : deprecatedExporters)
|
||||
{
|
||||
if (exporter.getType() == name)
|
||||
{
|
||||
addProjectMessage (ProjectMessages::Ids::deprecatedExporter, {});
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
removeProjectMessage (ProjectMessages::Ids::deprecatedExporter);
|
||||
}
|
||||
|
||||
void Project::updateCppStandardWarning (bool showWarning)
|
||||
{
|
||||
if (showWarning)
|
||||
|
|
@ -1139,24 +1158,24 @@ void Project::valueTreePropertyChanged (ValueTree& tree, const Identifier& prope
|
|||
changed();
|
||||
}
|
||||
|
||||
void Project::valueTreeChildAdded (ValueTree& parent, ValueTree& child)
|
||||
void Project::valueTreeChildAddedOrRemoved (ValueTree& parent, ValueTree& child)
|
||||
{
|
||||
ignoreUnused (parent);
|
||||
|
||||
if (child.getType() == Ids::MODULE)
|
||||
updateModuleWarnings();
|
||||
else if (parent.getType() == Ids::EXPORTFORMATS)
|
||||
updateExporterWarnings();
|
||||
|
||||
changed();
|
||||
}
|
||||
|
||||
void Project::valueTreeChildRemoved (ValueTree& parent, ValueTree& child, int index)
|
||||
void Project::valueTreeChildAdded (ValueTree& parent, ValueTree& child)
|
||||
{
|
||||
ignoreUnused (parent, index);
|
||||
valueTreeChildAddedOrRemoved (parent, child);
|
||||
}
|
||||
|
||||
if (child.getType() == Ids::MODULE)
|
||||
updateModuleWarnings();
|
||||
|
||||
changed();
|
||||
void Project::valueTreeChildRemoved (ValueTree& parent, ValueTree& child, int)
|
||||
{
|
||||
valueTreeChildAddedOrRemoved (parent, child);
|
||||
}
|
||||
|
||||
void Project::valueTreeChildOrderChanged (ValueTree&, int, int)
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace ProjectMessages
|
|||
DECLARE_ID (newVersionAvailable);
|
||||
DECLARE_ID (pluginCodeInvalid);
|
||||
DECLARE_ID (manufacturerCodeInvalid);
|
||||
DECLARE_ID (deprecatedExporter);
|
||||
|
||||
DECLARE_ID (notification);
|
||||
DECLARE_ID (warning);
|
||||
|
|
@ -64,7 +65,8 @@ namespace ProjectMessages
|
|||
{
|
||||
static Identifier warnings[] = { Ids::incompatibleLicense, Ids::cppStandard, Ids::moduleNotFound,
|
||||
Ids::jucePath, Ids::jucerFileModified, Ids::missingModuleDependencies,
|
||||
Ids::oldProjucer, Ids::pluginCodeInvalid, Ids::manufacturerCodeInvalid };
|
||||
Ids::oldProjucer, Ids::pluginCodeInvalid, Ids::manufacturerCodeInvalid,
|
||||
Ids::deprecatedExporter };
|
||||
|
||||
if (std::find (std::begin (warnings), std::end (warnings), message) != std::end (warnings))
|
||||
return Ids::warning;
|
||||
|
|
@ -88,6 +90,7 @@ namespace ProjectMessages
|
|||
if (message == Ids::newVersionAvailable) return "New Version Available";
|
||||
if (message == Ids::pluginCodeInvalid) return "Invalid Plugin Code";
|
||||
if (message == Ids::manufacturerCodeInvalid) return "Invalid Manufacturer Code";
|
||||
if (message == Ids::deprecatedExporter) return "Deprecated Exporter";
|
||||
|
||||
jassertfalse;
|
||||
return {};
|
||||
|
|
@ -105,6 +108,7 @@ namespace ProjectMessages
|
|||
if (message == Ids::newVersionAvailable) return "A new version of JUCE is available to download.";
|
||||
if (message == Ids::pluginCodeInvalid) return "The plugin code should be exactly four characters in length.";
|
||||
if (message == Ids::manufacturerCodeInvalid) return "The manufacturer code should be exactly four characters in length.";
|
||||
if (message == Ids::deprecatedExporter) return "The project includes a deprecated exporter.";
|
||||
|
||||
jassertfalse;
|
||||
return {};
|
||||
|
|
@ -551,6 +555,8 @@ private:
|
|||
void valueTreeChildRemoved (ValueTree&, ValueTree&, int) override;
|
||||
void valueTreeChildOrderChanged (ValueTree&, int, int) override;
|
||||
|
||||
void valueTreeChildAddedOrRemoved (ValueTree&, ValueTree&);
|
||||
|
||||
//==============================================================================
|
||||
template <typename This>
|
||||
static auto& getEnabledModulesImpl (This&);
|
||||
|
|
@ -646,6 +652,7 @@ private:
|
|||
void updateJUCEPathWarning();
|
||||
|
||||
void updateModuleWarnings();
|
||||
void updateExporterWarnings();
|
||||
void updateCppStandardWarning (bool showWarning);
|
||||
void updateMissingModuleDependenciesWarning (bool showWarning);
|
||||
void updateOldProjucerWarning (bool showWarning);
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ public:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
static String getDisplayNameWindows() { return "Code::Blocks (Windows)"; }
|
||||
static String getDisplayNameLinux() { return "Code::Blocks (Linux)"; }
|
||||
static String getDisplayNameWindows() { return "[Deprecated] Code::Blocks (Windows)"; }
|
||||
static String getDisplayNameLinux() { return "[Deprecated] Code::Blocks (Linux)"; }
|
||||
|
||||
static String getValueTreeTypeNameWindows() { return "CODEBLOCKS_WINDOWS"; }
|
||||
static String getValueTreeTypeNameLinux() { return "CODEBLOCKS_LINUX"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue