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

Added support for automatically creating AAX plugin bundles on Windows

Requires re-compilation of the Projucer
This commit is contained in:
hogliux 2016-09-12 09:25:30 +01:00
parent f37787df4c
commit ff40b46bf2

View file

@ -175,9 +175,35 @@ private:
const RelativePath aaxLibsFolder = RelativePath (getAAXPathValue().toString(), RelativePath::projectFolder).getChildFile ("Libs");
for (ProjectExporter::ConfigIterator config (*this); config.next();)
{
if (config->getValue (Ids::useRuntimeLibDLL).getValue().isVoid())
config->getValue (Ids::useRuntimeLibDLL) = true;
if (config->getValue(Ids::postbuildCommand).toString().isEmpty())
{
const bool is64Bit = (config->getValue (Ids::winArchitecture) == "x64");
const String bundleDir = "$(OutDir)\\$(TargetName).aaxplugin";
const String bundleContents = bundleDir + "\\Contents";
const String macOSDir = bundleContents + String ("\\") + (is64Bit ? "x64" : "Win32");
const String executable = macOSDir + String ("\\$(TargetName).aaxplugin");
const String bundleScript = aaxPath.toString() + String ("\\Utilities\\CreatePackage.bat");
String iconFilePath = getTargetFolder().getChildFile ("icon.ico").getFullPathName();
if (! File (iconFilePath).existsAsFile())
iconFilePath = aaxPath.toString() + String ("\\Utilities\\PlugIn.ico");
String script;
script += String ("mkdir \"") + bundleDir + String ("\"\r\n");
script += String ("mkdir \"") + bundleContents + String ("\"\r\n");
script += String ("mkdir \"") + macOSDir + String ("\"\r\n");
script += String ("copy /Y \"$(OutDir)\\$(TargetFileName)\" \"") + executable + String ("\"\r\n");
script += bundleScript + String (" \"") + macOSDir + String ("\" \"") + iconFilePath + String ("\"");
config->getValue (Ids::postbuildCommand) = script;
}
}
msvcExtraPreprocessorDefs.set ("JucePlugin_AAXLibs_path",
createRebasedPath (aaxLibsFolder));
}