| @@ -123,7 +123,7 @@ namespace | |||||
| flags.set ("JucePlugin_TailLengthSeconds", String (static_cast <double> (getPluginTailLengthSeconds (project).getValue()))); | flags.set ("JucePlugin_TailLengthSeconds", String (static_cast <double> (getPluginTailLengthSeconds (project).getValue()))); | ||||
| flags.set ("JucePlugin_EditorRequiresKeyboardFocus", valueToBool (getPluginEditorNeedsKeyFocus (project))); | flags.set ("JucePlugin_EditorRequiresKeyboardFocus", valueToBool (getPluginEditorNeedsKeyFocus (project))); | ||||
| flags.set ("JucePlugin_Version", project.getVersionString()); | 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_VersionString", project.getVersionString().quoted()); | ||||
| flags.set ("JucePlugin_VSTUniqueID", "JucePlugin_PluginCode"); | flags.set ("JucePlugin_VSTUniqueID", "JucePlugin_PluginCode"); | ||||
| flags.set ("JucePlugin_VSTCategory", static_cast <bool> (getPluginIsSynth (project).getValue()) ? "kPlugCategSynth" : "kPlugCategEffect"); | flags.set ("JucePlugin_VSTCategory", static_cast <bool> (getPluginIsSynth (project).getValue()) ? "kPlugCategSynth" : "kPlugCategEffect"); | ||||
| @@ -403,18 +403,6 @@ String Project::getVersionAsHex() const | |||||
| return "0x" + String::toHexString (value); | 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 | StringPairArray Project::getPreprocessorDefs() const | ||||
| { | { | ||||
| return parsePreprocessorDefs (projectRoot [Ids::defines]); | return parsePreprocessorDefs (projectRoot [Ids::defines]); | ||||
| @@ -83,7 +83,6 @@ public: | |||||
| Value getVersionValue() { return getProjectValue (Ids::version); } | Value getVersionValue() { return getProjectValue (Ids::version); } | ||||
| String getVersionString() const { return projectRoot [Ids::version]; } | String getVersionString() const { return projectRoot [Ids::version]; } | ||||
| String getVersionAsHex() const; | String getVersionAsHex() const; | ||||
| String getVersionAsDecimal() const; | |||||
| Value getBundleIdentifier() { return getProjectValue (Ids::bundleIdentifier); } | Value getBundleIdentifier() { return getProjectValue (Ids::bundleIdentifier); } | ||||
| String getDefaultBundleIdentifier() { return "com.yourcompany." + CodeHelpers::makeValidIdentifier (getTitle(), false, true, false); } | String getDefaultBundleIdentifier() { return "com.yourcompany." + CodeHelpers::makeValidIdentifier (getTitle(), false, true, false); } | ||||
| @@ -281,7 +281,7 @@ public: | |||||
| filter->addListener (this); | filter->addListener (this); | ||||
| cEffect.flags |= effFlagsHasEditor; | cEffect.flags |= effFlagsHasEditor; | ||||
| cEffect.version = (long) (JucePlugin_VersionCode); | |||||
| cEffect.version = convertHexVersionToDecimal (JucePlugin_VersionCode); | |||||
| setUniqueID ((int) (JucePlugin_VSTUniqueID)); | setUniqueID ((int) (JucePlugin_VSTUniqueID)); | ||||
| @@ -1381,6 +1381,14 @@ private: | |||||
| HWND hostWindow; | HWND hostWindow; | ||||
| #endif | #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 | #if JUCE_WINDOWS | ||||
| // Workarounds for Wavelab's happy-go-lucky use of threads. | // Workarounds for Wavelab's happy-go-lucky use of threads. | ||||