Browse Source

Added support for automatically creating AAX plugin bundles on Windows

Requires re-compilation of the Projucer
tags/2021-05-28
hogliux 9 years ago
parent
commit
ff40b46bf2
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h

+ 26
- 0
extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -175,9 +175,35 @@ private:
const RelativePath aaxLibsFolder = RelativePath (getAAXPathValue().toString(), RelativePath::projectFolder).getChildFile ("Libs"); const RelativePath aaxLibsFolder = RelativePath (getAAXPathValue().toString(), RelativePath::projectFolder).getChildFile ("Libs");
for (ProjectExporter::ConfigIterator config (*this); config.next();) for (ProjectExporter::ConfigIterator config (*this); config.next();)
{
if (config->getValue (Ids::useRuntimeLibDLL).getValue().isVoid()) if (config->getValue (Ids::useRuntimeLibDLL).getValue().isVoid())
config->getValue (Ids::useRuntimeLibDLL) = true; 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", msvcExtraPreprocessorDefs.set ("JucePlugin_AAXLibs_path",
createRebasedPath (aaxLibsFolder)); createRebasedPath (aaxLibsFolder));
} }


Loading…
Cancel
Save