Browse Source

Reimplemented the VST hex/decimal version change.

tags/2021-05-28
jules 12 years ago
parent
commit
2c72bfac6c
4 changed files with 10 additions and 15 deletions
  1. +1
    -1
      extras/Introjucer/Source/Project/jucer_AudioPluginModule.h
  2. +0
    -12
      extras/Introjucer/Source/Project/jucer_Project.cpp
  3. +0
    -1
      extras/Introjucer/Source/Project/jucer_Project.h
  4. +9
    -1
      modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp

+ 1
- 1
extras/Introjucer/Source/Project/jucer_AudioPluginModule.h View File

@@ -123,7 +123,7 @@ namespace
flags.set ("JucePlugin_TailLengthSeconds", String (static_cast <double> (getPluginTailLengthSeconds (project).getValue())));
flags.set ("JucePlugin_EditorRequiresKeyboardFocus", valueToBool (getPluginEditorNeedsKeyFocus (project)));
flags.set ("JucePlugin_Version", project.getVersionString());
flags.set ("JucePlugin_VersionCode", project.getVersionAsDecimal());
flags.set ("JucePlugin_VersionCode", project.getVersionAsHex());
flags.set ("JucePlugin_VersionString", project.getVersionString().quoted());
flags.set ("JucePlugin_VSTUniqueID", "JucePlugin_PluginCode");
flags.set ("JucePlugin_VSTCategory", static_cast <bool> (getPluginIsSynth (project).getValue()) ? "kPlugCategSynth" : "kPlugCategEffect");


+ 0
- 12
extras/Introjucer/Source/Project/jucer_Project.cpp View File

@@ -403,18 +403,6 @@ String Project::getVersionAsHex() const
return "0x" + String::toHexString (value);
}
String Project::getVersionAsDecimal() const
{
const StringArray configs (getConfigs (*this));
int value = (configs[0].getIntValue() * 100) + (configs[1].getIntValue() * 10) + configs[2].getIntValue();
if (configs.size() >= 4)
value = (value * 10) + configs[3].getIntValue();
return String (value);
}
StringPairArray Project::getPreprocessorDefs() const
{
return parsePreprocessorDefs (projectRoot [Ids::defines]);


+ 0
- 1
extras/Introjucer/Source/Project/jucer_Project.h View File

@@ -83,7 +83,6 @@ public:
Value getVersionValue() { return getProjectValue (Ids::version); }
String getVersionString() const { return projectRoot [Ids::version]; }
String getVersionAsHex() const;
String getVersionAsDecimal() const;
Value getBundleIdentifier() { return getProjectValue (Ids::bundleIdentifier); }
String getDefaultBundleIdentifier() { return "com.yourcompany." + CodeHelpers::makeValidIdentifier (getTitle(), false, true, false); }


+ 9
- 1
modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp View File

@@ -281,7 +281,7 @@ public:
filter->addListener (this);
cEffect.flags |= effFlagsHasEditor;
cEffect.version = (long) (JucePlugin_VersionCode);
cEffect.version = convertHexVersionToDecimal (JucePlugin_VersionCode);
setUniqueID ((int) (JucePlugin_VSTUniqueID));
@@ -1381,6 +1381,14 @@ private:
HWND hostWindow;
#endif
static inline long convertHexVersionToDecimal (const unsigned int hexVersion)
{
return (long) (((hexVersion >> 24) & 0xff) * 1000
+ ((hexVersion >> 16) & 0xff) * 100
+ ((hexVersion >> 8) & 0xff) * 10
+ (hexVersion & 0xff));
}
//==============================================================================
#if JUCE_WINDOWS
// Workarounds for Wavelab's happy-go-lucky use of threads.


Loading…
Cancel
Save