mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Added a post-build step to Visual Studio plugin targets that copies the plugin to a specified folder, or the default folder for its type if one is not specified
This commit is contained in:
parent
18539d7e97
commit
d346d6ef50
5 changed files with 109 additions and 36 deletions
|
|
@ -1,28 +1,49 @@
|
|||
JUCE breaking changes
|
||||
=====================
|
||||
|
||||
|
||||
develop
|
||||
=============
|
||||
|
||||
=============
|
||||
|
||||
Change
|
||||
------
|
||||
Viewport now enables "scroll on drag" mode by default on Android and iOS.
|
||||
|
||||
------
|
||||
Visual Studio plugin targets now have a post-build script that copies the plugin binary to the default folder
|
||||
for its type or to a specified folder, which can be set in the build configuration.
|
||||
|
||||
Possible Issues
|
||||
---------------
|
||||
Any code relying on "scroll on drag" mode being turned off by default, should disable
|
||||
it manually.
|
||||
|
||||
---------------
|
||||
It may cause some issues if you already have a post-build script set up to do this,
|
||||
if the default folders do not exist, or you do not have write permissions to these folders.
|
||||
|
||||
Workaround
|
||||
----------
|
||||
None.
|
||||
|
||||
----------
|
||||
Change the copy destination folder in the VS exporter build configuration to one that exists and you have rights
|
||||
to copy to, or create the default ones.
|
||||
|
||||
Rationale
|
||||
---------
|
||||
It is expected on mobile devices to be able to scroll a list by just a drag,
|
||||
rather than using a dedicated scrollbar. The scrollbar is still available though if
|
||||
needed.
|
||||
|
||||
---------
|
||||
This brings the behaviour of the VS exporter in line with the Xcode exporter and makes it easier
|
||||
to build and use plugins as they will automatically be copied to the default folder for the plugin type.
|
||||
|
||||
|
||||
Change
|
||||
------
|
||||
Viewport now enables "scroll on drag" mode by default on Android and iOS.
|
||||
|
||||
Possible Issues
|
||||
---------------
|
||||
Any code relying on "scroll on drag" mode being turned off by default, should disable
|
||||
it manually.
|
||||
|
||||
Workaround
|
||||
----------
|
||||
None.
|
||||
|
||||
Rationale
|
||||
---------
|
||||
It is expected on mobile devices to be able to scroll a list by just a drag,
|
||||
rather than using a dedicated scrollbar. The scrollbar is still available though if
|
||||
needed.
|
||||
|
||||
|
||||
Version 5.1.2
|
||||
=============
|
||||
|
|
|
|||
|
|
@ -164,6 +164,8 @@ public:
|
|||
|
||||
if (! isDebug())
|
||||
updateOldLTOSetting();
|
||||
|
||||
initialisePluginCachedValues();
|
||||
}
|
||||
|
||||
Value getWarningLevelValue() { return getValue (Ids::winWarningLevel); }
|
||||
|
|
@ -226,6 +228,8 @@ public:
|
|||
|
||||
void createConfigProperties (PropertyListBuilder& props) override
|
||||
{
|
||||
addVisualStudioPluginInstallPathProperties (props);
|
||||
|
||||
const String archTypes[] = { get32BitArchName(), get64BitArchName() };
|
||||
props.add (new ChoicePropertyComponent (getArchitectureType(), "Architecture",
|
||||
StringArray (archTypes, numElementsInArray (archTypes)),
|
||||
|
|
@ -315,10 +319,45 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
CachedValue<String> vstBinaryLocation, vst3BinaryLocation, rtasBinaryLocation, aaxBinaryLocation;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
void updateOldLTOSetting()
|
||||
{
|
||||
getLinkTimeOptimisationEnabledValue() = (static_cast<int> (config ["wholeProgramOptimisation"]) == 0);
|
||||
}
|
||||
|
||||
void addVisualStudioPluginInstallPathProperties (PropertyListBuilder& props)
|
||||
{
|
||||
if (project.shouldBuildVST())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (vstBinaryLocation, "VST Binary location", 1024),
|
||||
"The folder in which the compiled VST binary should be placed.");
|
||||
|
||||
if (project.shouldBuildVST3())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (vst3BinaryLocation, "VST3 Binary location", 1024),
|
||||
"The folder in which the compiled VST3 binary should be placed.");
|
||||
|
||||
if (project.shouldBuildRTAS())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (rtasBinaryLocation, "RTAS Binary location", 1024),
|
||||
"The folder in which the compiled RTAS binary should be placed.");
|
||||
|
||||
if (project.shouldBuildAAX())
|
||||
props.add (new TextWithDefaultPropertyComponent<String> (aaxBinaryLocation, "AAX Binary location", 1024),
|
||||
"The folder in which the compiled AAX binary should be placed.");
|
||||
}
|
||||
|
||||
void initialisePluginCachedValues()
|
||||
{
|
||||
auto prefix = is64Bit() ? "%CommonProgramW6432%"
|
||||
: "%CommonProgramFiles(x86)%";
|
||||
|
||||
vstBinaryLocation.referTo (config, Ids::vstBinaryLocation, nullptr, prefix + String ("\\Steinberg\\VST2"));
|
||||
vst3BinaryLocation.referTo (config, Ids::vst3BinaryLocation, nullptr, prefix + String ("\\VST3"));
|
||||
rtasBinaryLocation.referTo (config, Ids::rtasBinaryLocation, nullptr, prefix + String ("\\Digidesign\\DAE\\Plug-Ins"));
|
||||
aaxBinaryLocation.referTo (config, Ids::aaxBinaryLocation, nullptr, prefix + String ("\\Avid\\Audio\\Plug-Ins"));
|
||||
}
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -1021,14 +1060,27 @@ public:
|
|||
const RelativePath bundleScript = aaxSDK.getChildFile ("Utilities").getChildFile ("CreatePackage.bat");
|
||||
const RelativePath iconFilePath = getAAXIconFile();
|
||||
|
||||
const bool is64Bit = (config.config [Ids::winArchitecture] == "x64");
|
||||
const String bundleDir = getOwner().getOutDirFile (config, config.getOutputFilename (".aaxplugin", true));
|
||||
const String bundleContents = bundleDir + "\\Contents";
|
||||
const String macOSDir = bundleContents + String ("\\") + (is64Bit ? "x64" : "Win32");
|
||||
const String executable = macOSDir + String ("\\") + config.getOutputFilename (".aaxplugin", true);
|
||||
auto is64Bit = (config.config [Ids::winArchitecture] == "x64");
|
||||
|
||||
return String ("copy /Y \"") + getOutputFilePath (config) + String ("\" \"") + executable + String ("\"\r\ncall ") +
|
||||
createRebasedPath (bundleScript) + String (" \"") + macOSDir + String ("\" ") + createRebasedPath (iconFilePath);
|
||||
auto outputFilename = config.getOutputFilename (".aaxplugin", true);
|
||||
auto bundleDir = getOwner().getOutDirFile (config, outputFilename);
|
||||
auto bundleContents = bundleDir + "\\Contents";
|
||||
auto macOSDir = bundleContents + String ("\\") + (is64Bit ? "x64" : "Win32");
|
||||
auto executable = macOSDir + String ("\\") + outputFilename;
|
||||
|
||||
auto pkgScript = String ("copy /Y ") + getOutputFilePath (config).quoted() + String (" ") + executable.quoted() + String ("\r\ncall ")
|
||||
+ createRebasedPath (bundleScript) + String (" ") + macOSDir.quoted() + String (" ") + createRebasedPath (iconFilePath);
|
||||
|
||||
return pkgScript + "\r\n" + String ("xcopy ") + bundleDir.quoted() + " "
|
||||
+ String (config.aaxBinaryLocation.get() + "\\" + outputFilename + "\\").quoted() + " /E /Y";
|
||||
}
|
||||
else
|
||||
{
|
||||
auto copyScript = String ("copy /Y \"$(OutDir)$(TargetFileName)\"") + String (" \"$COPYDIR$\\$(TargetFileName)\"");
|
||||
|
||||
if (type == VSTPlugIn) return copyScript.replace ("$COPYDIR$", config.vstBinaryLocation.get());
|
||||
if (type == VST3PlugIn) return copyScript.replace ("$COPYDIR$", config.vst3BinaryLocation.get());
|
||||
if (type == RTASPlugIn) return copyScript.replace ("$COPYDIR$", config.rtasBinaryLocation.get());
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../Utility/UI/PropertyComponents/jucer_TextWithDefaultPropertyComponent.h"
|
||||
|
||||
//==============================================================================
|
||||
namespace
|
||||
|
|
@ -413,11 +412,11 @@ protected:
|
|||
codeSignIdentity (config, Ids::codeSigningIdentity, nullptr, iOS ? "iPhone Developer" : "Mac Developer"),
|
||||
fastMathEnabled (config, Ids::fastMath, nullptr),
|
||||
stripLocalSymbolsEnabled (config, Ids::stripLocalSymbols, nullptr),
|
||||
vstBinaryLocation (config, Ids::xcodeVstBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST/"),
|
||||
vst3BinaryLocation (config, Ids::xcodeVst3BinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST3/"),
|
||||
auBinaryLocation (config, Ids::xcodeAudioUnitBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/Components/"),
|
||||
rtasBinaryLocation (config, Ids::xcodeRtasBinaryLocation, nullptr, "/Library/Application Support/Digidesign/Plug-Ins/"),
|
||||
aaxBinaryLocation (config, Ids::xcodeAaxBinaryLocation, nullptr, "/Library/Application Support/Avid/Audio/Plug-Ins/")
|
||||
vstBinaryLocation (config, Ids::vstBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST/"),
|
||||
vst3BinaryLocation (config, Ids::vst3BinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/VST3/"),
|
||||
auBinaryLocation (config, Ids::auBinaryLocation, nullptr, "$(HOME)/Library/Audio/Plug-Ins/Components/"),
|
||||
rtasBinaryLocation (config, Ids::rtasBinaryLocation, nullptr, "/Library/Application Support/Digidesign/Plug-Ins/"),
|
||||
aaxBinaryLocation (config, Ids::aaxBinaryLocation, nullptr, "/Library/Application Support/Avid/Audio/Plug-Ins/")
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "../Project/jucer_Project.h"
|
||||
#include "../Utility/UI/PropertyComponents/jucer_DependencyPathPropertyComponent.h"
|
||||
#include "../Utility/UI/PropertyComponents/jucer_TextWithDefaultPropertyComponent.h"
|
||||
|
||||
class ProjectSaver;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,12 +103,12 @@ namespace Ids
|
|||
DECLARE_ID (codeSigningIdentity);
|
||||
DECLARE_ID (fastMath);
|
||||
DECLARE_ID (linkTimeOptimisation);
|
||||
DECLARE_ID (vstBinaryLocation);
|
||||
DECLARE_ID (vst3BinaryLocation);
|
||||
DECLARE_ID (auBinaryLocation);
|
||||
DECLARE_ID (rtasBinaryLocation);
|
||||
DECLARE_ID (aaxBinaryLocation);
|
||||
DECLARE_ID (stripLocalSymbols);
|
||||
DECLARE_ID (xcodeVstBinaryLocation);
|
||||
DECLARE_ID (xcodeVst3BinaryLocation);
|
||||
DECLARE_ID (xcodeAudioUnitBinaryLocation);
|
||||
DECLARE_ID (xcodeRtasBinaryLocation);
|
||||
DECLARE_ID (xcodeAaxBinaryLocation);
|
||||
DECLARE_ID (osxSDK);
|
||||
DECLARE_ID (osxCompatibility);
|
||||
DECLARE_ID (osxArchitecture);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue