mirror of
https://codeberg.org/armin/monostep.git
synced 2026-09-01 12:20:46 +02:00
48 lines
972 B
C
48 lines
972 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <JuceHeader.h>
|
||
|
|
|
||
|
|
namespace monostep
|
||
|
|
{
|
||
|
|
|
||
|
|
namespace buildinfo
|
||
|
|
{
|
||
|
|
|
||
|
|
inline juce::String gitInfo()
|
||
|
|
{
|
||
|
|
#if defined (MONOSTEP_GIT_INFO)
|
||
|
|
return juce::String (MONOSTEP_GIT_INFO);
|
||
|
|
#else
|
||
|
|
return "no-vcs";
|
||
|
|
#endif
|
||
|
|
}
|
||
|
|
|
||
|
|
inline juce::String buildDateString()
|
||
|
|
{
|
||
|
|
static const char* months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||
|
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||
|
|
|
||
|
|
const juce::String d (__DATE__);
|
||
|
|
int month = 1;
|
||
|
|
|
||
|
|
for (int i = 0; i < 12; ++i)
|
||
|
|
if (d.startsWith (months[i]))
|
||
|
|
{
|
||
|
|
month = i + 1;
|
||
|
|
break;
|
||
|
|
}
|
||
|
|
|
||
|
|
const int day = d.substring (4, 6).trim().getIntValue();
|
||
|
|
const int year = d.substring (7).getIntValue();
|
||
|
|
|
||
|
|
return juce::String::formatted ("%04d-%02d-%02d__%s", year, month, day, __TIME__);
|
||
|
|
}
|
||
|
|
|
||
|
|
inline juce::String footerText()
|
||
|
|
{
|
||
|
|
return gitInfo() + " (" + buildDateString() + ")";
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace buildinfo
|
||
|
|
|
||
|
|
} // namespace monostep
|