Improved version info.

This commit is contained in:
LoRd_MuldeR 2012-02-10 22:30:27 +01:00
parent 14f15d3f76
commit d83ddf7303
5 changed files with 39 additions and 22 deletions

View File

@ -1,15 +1,15 @@
!macro X264_VERSIONINFO DATE
!macro X264_VERSIONINFO DATE TIME BUILDNO
!searchreplace PRODUCT_VERSION_DATE "${DATE}" "-" "."
VIProductVersion "${PRODUCT_VERSION_DATE}.0"
VIProductVersion "${PRODUCT_VERSION_DATE}.${BUILDNO}"
VIAddVersionKey "Author" "LoRd_MuldeR <mulder2@gmx.de>"
VIAddVersionKey "Comments" "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version."
VIAddVersionKey "CompanyName" "Free Software Foundation"
VIAddVersionKey "FileDescription" "Simple x264 Launcher (${DATE})"
VIAddVersionKey "FileVersion" "${DATE}"
VIAddVersionKey "FileVersion" "${DATE} ${TIME} [Build #${BUILDNO}]"
VIAddVersionKey "LegalCopyright" "Copyright 2004-2012 LoRd_MuldeR"
VIAddVersionKey "LegalTrademarks" "GNU"
VIAddVersionKey "OriginalFilename" "x264_x64.${DATE}.exe"
VIAddVersionKey "ProductName" "Simple x264 Launcher"
VIAddVersionKey "ProductVersion" "${DATE}"
VIAddVersionKey "ProductVersion" "${DATE} ${TIME} [Build #${BUILDNO}]"
VIAddVersionKey "Website" "http://mulder.at.gg/"
!macroend

View File

@ -21,7 +21,8 @@
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 0
#define VER_X264_PATCH 101
#define VER_X264_PATCH 1
#define VER_X264_BUILD 114
#define VER_X264_MINIMUM_REV 2146
#define VER_X264_CURRENT_API 120

Binary file not shown.

View File

@ -73,7 +73,7 @@ copy "$(SolutionDir)res\toolset\*.exe" "$(SolutionDir)bin\$(Configuration)\tools
<Message>Copy Toolset</Message>
</PostBuildEvent>
<PreBuildEvent>
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_PATCH "$(SolutionDir)src\version.h" 5</Command>
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 5</Command>
<Message>Update Build Number</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
@ -106,7 +106,7 @@ copy "$(SolutionDir)res\toolset\*.exe" "$(SolutionDir)bin\$(Configuration)\tools
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<PreBuildEvent>
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_PATCH "$(SolutionDir)src\version.h" 5</Command>
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 5</Command>
</PreBuildEvent>
<PreBuildEvent>
<Message>Update Build Number</Message>

View File

@ -39,6 +39,21 @@ if not exist "%QTDIR%\bin\moc.exe" (
goto BuildError
)
REM ///////////////////////////////////////////////////////////////////////////
REM // Get current date and time (in ISO format)
REM ///////////////////////////////////////////////////////////////////////////
set "ISO_DATE="
set "ISO_TIME="
if not exist "%~dp0\etc\date.exe" BuildError
for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\etc\date.exe" +ISODATE:%%Y-%%m-%%d') do (
if "%%a"=="ISODATE" set "ISO_DATE=%%b"
)
for /F "tokens=1,2,3,4 delims=:" %%a in ('"%~dp0\etc\date.exe" +ISOTIME:%%T') do (
if "%%a"=="ISOTIME" set "ISO_TIME=%%b:%%c:%%d"
)
if "%ISO_DATE%"=="" goto BuildError
if "%ISO_TIME%"=="" goto BuildError
REM ///////////////////////////////////////////////////////////////////////////
REM // Build the binaries
REM ///////////////////////////////////////////////////////////////////////////
@ -50,6 +65,15 @@ if not "%ERRORLEVEL%"=="0" goto BuildError
MSBuild.exe /property:Configuration=release /target:rebuild "%~dp0\x264_launcher.sln"
if not "%ERRORLEVEL%"=="0" goto BuildError
REM ///////////////////////////////////////////////////////////////////////////
REM // Detect build number
REM ///////////////////////////////////////////////////////////////////////////
set "BUILD_NO="
for /F "tokens=2,*" %%s in (%~dp0\src\version.h) do (
if "%%s"=="VER_X264_BUILD" set "BUILD_NO=%%~t"
)
if "%BUILD_NO%"=="" goto BuildError
REM ///////////////////////////////////////////////////////////////////////////
REM // Copy base files
REM ///////////////////////////////////////////////////////////////////////////
@ -82,15 +106,6 @@ REM ///////////////////////////////////////////////////////////////////////////
"%UPX3_PATH%\upx.exe" --brute "%PACK_PATH%\*.exe"
"%UPX3_PATH%\upx.exe" --best "%PACK_PATH%\*.dll"
REM ///////////////////////////////////////////////////////////////////////////
REM // Get current date (in ISO format)
REM ///////////////////////////////////////////////////////////////////////////
if not exist "%~dp0\etc\date.exe" BuildError
for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\etc\date.exe" +ISODATE:%%Y-%%m-%%d') do (
if "%%a"=="ISODATE" set "ISO_DATE=%%b"
)
if "%ISO_DATE%"=="" BuildError
REM ///////////////////////////////////////////////////////////////////////////
REM // Setup install parameters
REM ///////////////////////////////////////////////////////////////////////////
@ -109,23 +124,24 @@ REM ///////////////////////////////////////////////////////////////////////////
REM // Generate install script
REM ///////////////////////////////////////////////////////////////////////////
echo #Generated File - Do NOT modify! > "%NSI_FILE%"
echo RequestExecutionLevel Admin >> "%NSI_FILE%"
echo ShowInstDetails show >> "%NSI_FILE%"
echo BrandingText `Created: %ISO_DATE%, %ISO_TIME% [Build #%BUILD_NO%]` >> "%NSI_FILE%"
echo !define ZIP2EXE_NAME `Simple x264 Launcher (%ISO_DATE%)` >> "%NSI_FILE%"
echo !define ZIP2EXE_OUTFILE `%OUT_FULL%` >> "%NSI_FILE%"
echo !define ZIP2EXE_COMPRESSOR_LZMA >> "%NSI_FILE%"
echo !define ZIP2EXE_INSTALLDIR `$PROGRAMFILES\MuldeR\Simple x264 Launcher v2` >> "%NSI_FILE%"
echo !define MUI_INSTFILESPAGE_COLORS "C5DEFB 000000" >> "%NSI_FILE%"
echo RequestExecutionLevel Admin >> "%NSI_FILE%"
echo ShowInstDetails show >> "%NSI_FILE%"
echo !include `${NSISDIR}\Contrib\zip2exe\Base.nsh` >> "%NSI_FILE%"
echo !include `${NSISDIR}\Contrib\zip2exe\Modern.nsh` >> "%NSI_FILE%"
echo !include `%~dp0\etc\check_os.nsh` >> "%NSI_FILE%"
echo !include `%~dp0\etc\finalization.nsh` >> "%NSI_FILE%"
echo !include `%~dp0\etc\version.nsh` >> "%NSI_FILE%"
echo !insertmacro X264_VERSIONINFO `%ISO_DATE%` `%ISO_TIME%` `%BUILD_NO%` >> "%NSI_FILE%"
echo !insertmacro SECTION_BEGIN >> "%NSI_FILE%"
echo File /r `%PACK_PATH%\*.*` >> "%NSI_FILE%"
echo !include `%~dp0\etc\shortcut.nsh` >> "%NSI_FILE%"
echo !insertmacro SECTION_END >> "%NSI_FILE%"
echo !include `%~dp0\etc\check_os.nsh` >> "%NSI_FILE%"
echo !include `%~dp0\etc\finalization.nsh` >> "%NSI_FILE%"
echo !include `%~dp0\etc\version.nsh` >> "%NSI_FILE%"
echo !insertmacro X264_VERSIONINFO `%ISO_DATE%` >> "%NSI_FILE%"
REM ///////////////////////////////////////////////////////////////////////////
REM // Build the installer