Add simple utilitiy to auto-inc build numbers + fix duration for very short files
This commit is contained in:
parent
e3e0ec36aa
commit
34ec6d8d0a
@ -106,6 +106,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""$(ProjectDir)\etc\Utilities\AutoInc.exe" "VER_LAMEXP_BUILD" "$(ProjectDir)\src\Config.h""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
@ -196,6 +197,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
CommandLine=""$(ProjectDir)\etc\Utilities\AutoInc.exe" "VER_LAMEXP_BUILD" "$(ProjectDir)\src\Config.h""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
@ -275,7 +277,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
CommandLine=""
|
CommandLine="
"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
|
BIN
etc/Utilities/AutoInc.exe
Normal file
BIN
etc/Utilities/AutoInc.exe
Normal file
Binary file not shown.
@ -25,7 +25,7 @@
|
|||||||
#define VER_LAMEXP_MAJOR 4
|
#define VER_LAMEXP_MAJOR 4
|
||||||
#define VER_LAMEXP_MINOR_HI 0
|
#define VER_LAMEXP_MINOR_HI 0
|
||||||
#define VER_LAMEXP_MINOR_LO 0
|
#define VER_LAMEXP_MINOR_LO 0
|
||||||
#define VER_LAMEXP_BUILD 12
|
#define VER_LAMEXP_BUILD 17
|
||||||
#define VER_LAMEXP_SUFFIX TechPreview
|
#define VER_LAMEXP_SUFFIX TechPreview
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -321,22 +321,28 @@ unsigned int FileAnalyzer::parseDuration(const QString &str)
|
|||||||
{
|
{
|
||||||
QTime time;
|
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'");
|
time = QTime::fromString(str, "s's 'z'ms'");
|
||||||
if(time.isValid())
|
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'");
|
time = QTime::fromString(str, "m'mn 's's'");
|
||||||
if(time.isValid())
|
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'");
|
time = QTime::fromString(str, "h'h 'm'mn'");
|
||||||
if(time.isValid())
|
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;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user