1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Add arm64 warning on Windows

This commit is contained in:
Anthony Nicholls 2024-10-22 15:46:58 +01:00 committed by Oliver James
parent 59bd070291
commit 2f3dd44f33
2 changed files with 31 additions and 2 deletions

View file

@ -60,6 +60,7 @@ namespace ProjectMessages
DECLARE_ID (manufacturerCodeInvalid);
DECLARE_ID (deprecatedExporter);
DECLARE_ID (unsupportedArm32Config);
DECLARE_ID (arm64Warning);
DECLARE_ID (notification);
DECLARE_ID (warning);
@ -74,7 +75,7 @@ namespace ProjectMessages
static Identifier warnings[] = { Ids::cppStandard, Ids::moduleNotFound, Ids::jucePath,
Ids::jucerFileModified, Ids::missingModuleDependencies,
Ids::oldProjucer, Ids::pluginCodeInvalid, Ids::manufacturerCodeInvalid,
Ids::deprecatedExporter, Ids::unsupportedArm32Config };
Ids::deprecatedExporter, Ids::unsupportedArm32Config, Ids::arm64Warning };
if (std::find (std::begin (warnings), std::end (warnings), message) != std::end (warnings))
return Ids::warning;
@ -101,6 +102,7 @@ namespace ProjectMessages
if (message == Ids::manufacturerCodeInvalid) return "Invalid Manufacturer Code";
if (message == Ids::deprecatedExporter) return "Deprecated Exporter";
if (message == Ids::unsupportedArm32Config) return "Unsupported Architecture";
if (message == Ids::arm64Warning) return "Prefer arm64ec over arm64";
jassertfalse;
return {};
@ -119,6 +121,7 @@ namespace ProjectMessages
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.";
if (message == Ids::unsupportedArm32Config) return "The project includes a Visual Studio configuration that uses the 32-bit Arm architecture, which is no longer supported. This configuration has been hidden, and will be removed on save.";
if (message == Ids::arm64Warning) return "For software where interoperability is a concern (such as plugins and hosts), arm64ec will provide the best compatibility with existing x64 software";
jassertfalse;
return {};

View file

@ -243,7 +243,8 @@ public:
}
//==============================================================================
class MSVCBuildConfiguration final : public BuildConfiguration
class MSVCBuildConfiguration final : public BuildConfiguration,
private ValueTree::Listener
{
public:
MSVCBuildConfiguration (Project& p, const ValueTree& settings, const ProjectExporter& e)
@ -285,6 +286,31 @@ public:
}
optimisationLevelValue.setDefault (isDebug() ? optimisationOff : optimiseFull);
config.addListener (this);
}
~MSVCBuildConfiguration() override
{
config.removeListener (this);
}
void valueTreePropertyChanged (ValueTree&, const Identifier& property) override
{
if (property != Ids::winArchitecture)
return;
project.removeProjectMessage (ProjectMessages::Ids::arm64Warning);
const auto selectedArchs = architectureTypeValue.get();
if (! selectedArchs.getArray()->contains (toString (Architecture::arm64)))
return;
if (selectedArchs.getArray()->contains (toString (Architecture::arm64ec)))
return;
project.addProjectMessage (ProjectMessages::Ids::arm64Warning, {});
}
String getBinaryPath (const Identifier& id, Architecture arch) const