mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-06 04:00:08 +00:00
Changed the VST version number to be parsed as base-10 rather than base-16.
This commit is contained in:
parent
ea557b40a5
commit
aa0eb1a75d
4 changed files with 24 additions and 5 deletions
|
|
@ -382,12 +382,18 @@ void Project::createPropertyEditors (PropertyListBuilder& props)
|
|||
"Extra comments: This field is not used for code or project generation, it's just a space where you can express your thoughts.");
|
||||
}
|
||||
|
||||
String Project::getVersionAsHex() const
|
||||
static StringArray getConfigs (const Project& p)
|
||||
{
|
||||
StringArray configs;
|
||||
configs.addTokens (getVersionString(), ",.", String::empty);
|
||||
configs.addTokens (p.getVersionString(), ",.", String::empty);
|
||||
configs.trim();
|
||||
configs.removeEmptyStrings();
|
||||
return configs;
|
||||
}
|
||||
|
||||
String Project::getVersionAsHex() const
|
||||
{
|
||||
const StringArray configs (getConfigs (*this));
|
||||
|
||||
int value = (configs[0].getIntValue() << 16) + (configs[1].getIntValue() << 8) + configs[2].getIntValue();
|
||||
|
||||
|
|
@ -397,6 +403,18 @@ 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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue