aboutsummaryrefslogtreecommitdiff
path: root/tools/windows
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2014-07-27 11:45:27 +0200
committermontellese <montellese@xbmc.org>2014-07-27 11:45:27 +0200
commitd24b4cdcfa7a1744ad25f7b3d92178d857f624c1 (patch)
treee123ff5241ff60058d2b6044d24d7366e916a006 /tools/windows
parent2fe6547bb9a5a0a521de4d33a355c5a9cb5b3b34 (diff)
[win32] integrate XBMC_PC.rc into CompileInfo.bat for automatic versioning
Diffstat (limited to 'tools/windows')
-rw-r--r--tools/windows/CompileInfo.bat5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/windows/CompileInfo.bat b/tools/windows/CompileInfo.bat
index 59b06057a1..c2fe5be60a 100644
--- a/tools/windows/CompileInfo.bat
+++ b/tools/windows/CompileInfo.bat
@@ -13,7 +13,12 @@ FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/VERSION_MINOR/ {print $2}" %base_dir%\v
FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/VERSION_TAG/ {print $2}" %base_dir%\version.txt') DO SET tag=%%i
FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/ADDON_API/ {print $2}" %base_dir%\version.txt') DO SET addon_api=%%i
+REM XBMC_PC.rc.in requires a comma-separated version of addon_api
+SET separator=,
+CALL SET file_version=%%addon_api:.=%separator%%%%separator%0
+
REM create the files with the proper version information
"%msys_bin_dir%\sed.exe" -e s/@APP_VERSION_MAJOR@/%major%/g -e s/@APP_VERSION_MINOR@/%minor%/g -e s/@APP_VERSION_TAG@/%tag%/g "%base_dir%\xbmc\CompileInfo.cpp.in" > "%base_dir%\xbmc\CompileInfo.cpp"
"%msys_bin_dir%\sed.exe" s/@APP_ADDON_API@/%addon_api%/g "%base_dir%\addons\xbmc.addon\addon.xml.in" > "%base_dir%\addons\xbmc.addon\addon.xml"
+"%msys_bin_dir%\sed.exe" -e s/@APP_VERSION_MAJOR@/%major%/g -e s/@APP_VERSION_MINOR@/%minor%/g -e s/@APP_VERSION_TAG@/%tag%/g -e s/@FILE_VERSION@/%file_version%/g "%base_dir%\xbmc\win32\XBMC_PC.rc.in" > "%base_dir%\xbmc\win32\XBMC_PC.rc"