Skip to content

Commit

Permalink
Always include build hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-13 committed Feb 25, 2024
1 parent 29e3ec8 commit b09db81
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions WECore/CoreJUCEPlugin/TooltipLabelUpdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace WECore::JUCEPlugin {
* Starts updating the label as necessary, displaying build information when not showing a
* tooltip.
*/
inline void start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo = false, const juce::String& prereleaseBuildHash = "");
inline void start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, const juce::String& buildHash, bool isDemo, bool isPreRelease);

/**
* Must be called before the given label is destructed.
Expand All @@ -72,7 +72,7 @@ namespace WECore::JUCEPlugin {
_defaultString = "";
}

void TooltipLabelUpdater::start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, bool isDemo, const juce::String& prereleaseBuildHash) {
void TooltipLabelUpdater::start(juce::Label* targetLabel, juce::AudioProcessor::WrapperType pluginFormat, const juce::String& buildHash, bool isDemo, bool isPreRelease) {
_targetLabel = targetLabel;

_defaultString = JucePlugin_Name;
Expand Down Expand Up @@ -105,16 +105,18 @@ namespace WECore::JUCEPlugin {
#error "Unknown arch"
#endif

// Build hash
_defaultString += " ";
_defaultString += buildHash;

// Demo
if (isDemo) {
_defaultString += " (DEMO)";
}

// Preview build
if (!prereleaseBuildHash.isEmpty()) {
_defaultString += " (Pre-release ";
_defaultString += prereleaseBuildHash;
_defaultString += ")";
// Pre-release build
if (isPreRelease) {
_defaultString += " (PRE-RELEASE)";
}

_targetLabel->setText(_defaultString, juce::dontSendNotification);
Expand Down

0 comments on commit b09db81

Please sign in to comment.