mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Add checks for incompatible LV2 architecture configurations
This commit is contained in:
parent
0aaba52527
commit
2b958c0416
1 changed files with 44 additions and 5 deletions
|
|
@ -1791,9 +1791,11 @@ public:
|
|||
return nullptr;
|
||||
}();
|
||||
|
||||
const auto writer = writerTarget->getExpandedConfigTargetPath (config)
|
||||
Builder builder;
|
||||
const auto writer = (writerTarget->getExpandedConfigTargetPath (config)
|
||||
+ "\\"
|
||||
+ writerTarget->getBinaryNameWithSuffix (config);
|
||||
+ writerTarget->getBinaryNameWithSuffix (config)).quoted()
|
||||
+ " \"$(OutDir)$(TargetFileName)\"\r\n";
|
||||
|
||||
const auto copyStep = "xcopy /E /H /I /K /R /Y \"$(OutDir)\" \""
|
||||
+ config.getBinaryPath (Ids::lv2BinaryLocation, arch)
|
||||
|
|
@ -1801,9 +1803,12 @@ public:
|
|||
+ config.getTargetBinaryNameString()
|
||||
+ ".lv2\"\r\n";
|
||||
|
||||
return writer.quoted()
|
||||
+ " \"$(OutDir)$(TargetFileName)\"\r\n"
|
||||
+ (config.isPluginBinaryCopyStepEnabled() ? copyStep : "");
|
||||
builder.runAndCheck (writer,
|
||||
config.isPluginBinaryCopyStepEnabled() ? copyStep : Builder{}.info ("Sucessfully generated LV2 manifest").build(),
|
||||
Builder{}.error ("Failed to generate LV2 manifest.")
|
||||
.exit (-1));
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
if (type == VST3PlugIn)
|
||||
|
|
@ -1941,6 +1946,40 @@ public:
|
|||
return script.build();
|
||||
};
|
||||
|
||||
if (type == LV2PlugIn)
|
||||
{
|
||||
const auto crossCompilationPairs =
|
||||
{
|
||||
// This catches ARM64 and EC for x64 manifest generation
|
||||
std::pair { Architecture::arm64, Architecture::win64 },
|
||||
std::pair { arch, arch }
|
||||
};
|
||||
|
||||
MSVCScriptBuilder builder;
|
||||
|
||||
for (auto [hostArch, targetArch] : crossCompilationPairs)
|
||||
{
|
||||
const StringArray expr
|
||||
{
|
||||
"\"$(PROCESSOR_ARCHITECTURE)\" == " + getVisualStudioArchitectureId (hostArch).quoted(),
|
||||
"\"$(Platform)\"" " == " + getVisualStudioPlatformId (targetArch).quoted()
|
||||
};
|
||||
|
||||
builder.ifAllConditionsTrue (expr, MSVCScriptBuilder{}.jump ("_continue"));
|
||||
}
|
||||
|
||||
builder.error (StringArray
|
||||
{
|
||||
"\"$(Platform)\"",
|
||||
"LV2 cross-compilation is not available on",
|
||||
"\"$(PROCESSOR_ARCHITECTURE)\" hosts."
|
||||
}.joinIntoString (" "));
|
||||
builder.exit (-1);
|
||||
builder.labelledSection ("_continue", "");
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
if (type == AAXPlugIn)
|
||||
return createBundleStructure (getAaxBundleStructure (config, arch));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue