aboutsummaryrefslogtreecommitdiff
path: root/tools/windows
diff options
context:
space:
mode:
authorAnton Fedchin <afedchin@ruswizards.com>2015-07-01 16:00:26 +0300
committerAnton Fedchin <afedchin@ruswizards.com>2016-02-23 22:20:31 +0300
commit383c3dd71d0c71555b27a3e70724d8efbe914f6f (patch)
tree9a06333a3ad190210c7b1dd1498742ccac5b4754 /tools/windows
parent570232ecb1ee62cfee6b815082dbabc7b53476d3 (diff)
[win32] Update msys+mingw build system to msys2+mingw-w64.
Diffstat (limited to 'tools/windows')
-rw-r--r--tools/windows/CompileInfo.bat23
-rw-r--r--tools/windows/JsonSchemaBuilder.bat5
2 files changed, 16 insertions, 12 deletions
diff --git a/tools/windows/CompileInfo.bat b/tools/windows/CompileInfo.bat
index a94664a410..e2d2784e61 100644
--- a/tools/windows/CompileInfo.bat
+++ b/tools/windows/CompileInfo.bat
@@ -5,15 +5,18 @@ SET cur_dir=%CD%
SET base_dir=%cur_dir%\..\..
SET builddeps_dir=%cur_dir%\..\..\project\BuildDependencies
SET bin_dir=%builddeps_dir%\bin
-SET msys_bin_dir=%builddeps_dir%\msys\bin
+SET msys_bin_dir=%builddeps_dir%\msys64
+IF NOT EXIST %msys_bin_dir% SET msys_bin_dir=%builddeps_dir%\msys32
+SET awk_exe=%msys_bin_dir%\usr\bin\awk.exe
+SET sed_exe=%msys_bin_dir%\usr\bin\sed.exe
REM read the version values from version.txt
-FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/APP_NAME/ {print $2}" %base_dir%\version.txt') DO SET app_name=%%i
-FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/COMPANY_NAME/ {print $2}" %base_dir%\version.txt') DO SET company_name=%%i
-FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/VERSION_MAJOR/ {print $2}" %base_dir%\version.txt') DO SET major=%%i
-FOR /f %%i IN ('%msys_bin_dir%\awk.exe "/VERSION_MINOR/ {print $2}" %base_dir%\version.txt') DO SET minor=%%i
-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
+FOR /f %%i IN ('%awk_exe% "/APP_NAME/ {print $2}" %base_dir%\version.txt') DO SET app_name=%%i
+FOR /f %%i IN ('%awk_exe% "/COMPANY_NAME/ {print $2}" %base_dir%\version.txt') DO SET company_name=%%i
+FOR /f %%i IN ('%awk_exe% "/VERSION_MAJOR/ {print $2}" %base_dir%\version.txt') DO SET major=%%i
+FOR /f %%i IN ('%awk_exe% "/VERSION_MINOR/ {print $2}" %base_dir%\version.txt') DO SET minor=%%i
+FOR /f %%i IN ('%awk_exe% "/VERSION_TAG/ {print $2}" %base_dir%\version.txt') DO SET tag=%%i
+FOR /f %%i IN ('%awk_exe% "/ADDON_API/ {print $2}" %base_dir%\version.txt') DO SET addon_api=%%i
SET app_version=%major%.%minor%
IF NOT [%tag%] == [] (
@@ -25,7 +28,7 @@ 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_NAME@/%app_name%/g -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_NAME@/%app_name%/g -e s/@COMPANY_NAME@/%company_name%/g -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 -e s/@APP_VERSION@/%app_version%/g "%base_dir%\xbmc\win32\XBMC_PC.rc.in" > "%base_dir%\xbmc\win32\XBMC_PC.rc"
+"%sed_exe%" -e s/@APP_NAME@/%app_name%/g -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"
+"%sed_exe%" s/@APP_ADDON_API@/%addon_api%/g "%base_dir%\addons\xbmc.addon\addon.xml.in" > "%base_dir%\addons\xbmc.addon\addon.xml"
+"%sed_exe%" -e s/@APP_NAME@/%app_name%/g -e s/@COMPANY_NAME@/%company_name%/g -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 -e s/@APP_VERSION@/%app_version%/g "%base_dir%\xbmc\win32\XBMC_PC.rc.in" > "%base_dir%\xbmc\win32\XBMC_PC.rc"
diff --git a/tools/windows/JsonSchemaBuilder.bat b/tools/windows/JsonSchemaBuilder.bat
index 3e0b52e253..ad9f8b4c51 100644
--- a/tools/windows/JsonSchemaBuilder.bat
+++ b/tools/windows/JsonSchemaBuilder.bat
@@ -5,7 +5,8 @@ SET cur_dir=%CD%
SET base_dir=%cur_dir%\..\..
SET builddeps_dir=%cur_dir%\..\BuildDependencies
SET bin_dir=%builddeps_dir%\bin
-SET msys_bin_dir=%builddeps_dir%\msys\bin
+SET msys_bin_dir=%builddeps_dir%\msys64
+IF NOT EXIST %msys_bin_dir% SET msys_bin_dir=%builddeps_dir%\msys32
SET jsonrpc_path=%base_dir%\xbmc\interfaces\json-rpc
SET jsonrpc_schema_path=%jsonrpc_path%\schema
SET jsonrpc_output=ServiceDescription.h
@@ -14,7 +15,7 @@ SET xbmc_json_path=%base_Dir%\addons\xbmc.json
SET xbmc_json_output=addon.xml
SET /p version=<"%jsonrpc_schema_path%\version.txt"
-"%msys_bin_dir%\sed.exe" s/@jsonrpc_version@/%version%/g "%xbmc_json_path%\%xbmc_json_output%.in" > "%xbmc_json_path%\%xbmc_json_output%"
+"%msys_bin_dir%\usr\bin\sed.exe" s/@jsonrpc_version@/%version%/g "%xbmc_json_path%\%xbmc_json_output%.in" > "%xbmc_json_path%\%xbmc_json_output%"
"%bin_dir%\json-rpc\JsonSchemaBuilder.exe" "%jsonrpc_schema_path%\version.txt" "%jsonrpc_schema_path%\license.txt" "%jsonrpc_schema_path%\methods.json" "%jsonrpc_schema_path%\types.json" "%jsonrpc_schema_path%\notifications.json"
MOVE /Y %jsonrpc_output% "%jsonrpc_path%\%jsonrpc_output%" \ No newline at end of file