Add simple utilitiy to auto-inc build numbers + fix duration for very short files

This commit is contained in:
LoRd_MuldeR 2010-11-13 16:28:31 +01:00
parent e3e0ec36aa
commit 34ec6d8d0a
4 changed files with 13 additions and 5 deletions

View File

@ -106,6 +106,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="&quot;$(ProjectDir)\etc\Utilities\AutoInc.exe&quot; &quot;VER_LAMEXP_BUILD&quot; &quot;$(ProjectDir)\src\Config.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -196,6 +197,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="&quot;$(ProjectDir)\etc\Utilities\AutoInc.exe&quot; &quot;VER_LAMEXP_BUILD&quot; &quot;$(ProjectDir)\src\Config.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
@ -275,7 +277,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine=""
CommandLine="&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>

BIN
etc/Utilities/AutoInc.exe Normal file

Binary file not shown.

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 0
#define VER_LAMEXP_BUILD 12
#define VER_LAMEXP_BUILD 17
#define VER_LAMEXP_SUFFIX TechPreview
/*

View File

@ -321,22 +321,28 @@ unsigned int FileAnalyzer::parseDuration(const QString &str)
{
QTime time;
time = QTime::fromString(str, "z'ms'");
if(time.isValid())
{
return max(1, (time.hour() * 60 * 60) + (time.minute() * 60) + time.second());
}
time = QTime::fromString(str, "s's 'z'ms'");
if(time.isValid())
{
return (time.hour() * 60 * 60) + (time.minute() * 60) + time.second();
return max(1, (time.hour() * 60 * 60) + (time.minute() * 60) + time.second());
}
time = QTime::fromString(str, "m'mn 's's'");
if(time.isValid())
{
return (time.hour() * 60 * 60) + (time.minute() * 60) + time.second();
return max(1, (time.hour() * 60 * 60) + (time.minute() * 60) + time.second());
}
time = QTime::fromString(str, "h'h 'm'mn'");
if(time.isValid())
{
return (time.hour() * 60 * 60) + (time.minute() * 60) + time.second();
return max(1, (time.hour() * 60 * 60) + (time.minute() * 60) + time.second());
}
return 0;