aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2014-05-07 19:20:09 +0200
committermontellese <montellese@xbmc.org>2014-05-09 23:00:07 +0200
commitfa6ca17b3bf71941c3bed8429d7c7db1af57c4f7 (patch)
tree4fe7b6cabd0f170af16f7f516a6769d1d1d2dc63
parent3c1d7a13218a36119fd0b713e4bb259fb0651688 (diff)
[win32] extend JsonSchemaBuilder.bat to auto-generate xbmc.json's addon.xml
-rw-r--r--project/BuildDependencies/scripts/0_package.list2
-rw-r--r--tools/windows/JsonSchemaBuilder.bat16
2 files changed, 13 insertions, 5 deletions
diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list
index 832731393f..c465d833c6 100644
--- a/project/BuildDependencies/scripts/0_package.list
+++ b/project/BuildDependencies/scripts/0_package.list
@@ -9,7 +9,7 @@ boost-1.46.1-headers-win32.7z
dnssd-541-win32.zip
doxygen-1.8.2-win32.7z
gnutls-3.2.3-win32.zip
-jsonschemabuilder-1.0.0-win32-2.7z
+jsonschemabuilder-1.0.0-win32-3.7z
lame_enc-3.99.5-win32.7z
libass-0.10.2-win32.7z
libbluray-0.4.0-win32.zip
diff --git a/tools/windows/JsonSchemaBuilder.bat b/tools/windows/JsonSchemaBuilder.bat
index b80d6f3008..3e0b52e253 100644
--- a/tools/windows/JsonSchemaBuilder.bat
+++ b/tools/windows/JsonSchemaBuilder.bat
@@ -3,10 +3,18 @@
SET cur_dir=%CD%
SET base_dir=%cur_dir%\..\..
-SET bin_dir=%cur_dir%\..\BuildDependencies\bin\json-rpc
+SET builddeps_dir=%cur_dir%\..\BuildDependencies
+SET bin_dir=%builddeps_dir%\bin
+SET msys_bin_dir=%builddeps_dir%\msys\bin
SET jsonrpc_path=%base_dir%\xbmc\interfaces\json-rpc
SET jsonrpc_schema_path=%jsonrpc_path%\schema
-SET output=ServiceDescription.h
+SET jsonrpc_output=ServiceDescription.h
-"%bin_dir%\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 %output% "%jsonrpc_path%\%output%" \ No newline at end of file
+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%"
+
+"%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