diff options
author | montellese <montellese@xbmc.org> | 2012-09-11 00:59:04 +0200 |
---|---|---|
committer | montellese <montellese@xbmc.org> | 2012-09-11 01:03:32 +0200 |
commit | dbb05c6fcc7d741c588451fe02b924fb5db12902 (patch) | |
tree | 78f7126690724e0a7cf1fec7340da15b3ea4bb50 /tools/codegenerator | |
parent | 6d13311b53af762f691f62eb9ede04a769ae2591 (diff) |
[win32] fix building XBMC with the SWIG-generated code
To be able to run multiple custom build tools in Visual Studio every custom
build tool needs to call a batch (*.bat) file but it has to do so using CALL
otherwise only the first custom build tool will be executed. Therefore running
the custom build tool on xbmc/win32/PlatformInclude.h to generate
xbmc/win32/git_rev.h without using CALL blocked all other custom build tools
from running.
In addition all paths in the batch files have been surrounded by " to make
sure they also work when a path contains a whitespace.
Diffstat (limited to 'tools/codegenerator')
-rw-r--r-- | tools/codegenerator/GenerateSWIGBindings.bat | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/tools/codegenerator/GenerateSWIGBindings.bat b/tools/codegenerator/GenerateSWIGBindings.bat index 35f1ffb40e..00b576c35e 100644 --- a/tools/codegenerator/GenerateSWIGBindings.bat +++ b/tools/codegenerator/GenerateSWIGBindings.bat @@ -8,7 +8,7 @@ SET generator_dir=%base_dir%\tools\codegenerator SET bin_dir=%cur_dir%\..\BuildDependencies\bin rem go into xbmc/interfaces/python -cd %1\..\python +cd "%1\..\python" SET python_dir=%CD% SET python_generated_dir=%python_dir%\generated @@ -16,18 +16,23 @@ SET doxygen_dir=%python_generated_dir%\doxygenxml SET swig_dir=%python_dir%\..\swig rem make sure all necessary directories exist and delete any old generated files -IF NOT EXIST %python_generated_dir% md %python_generated_dir% -IF EXIST %python_generated_dir%\%2.xml del %python_generated_dir%\%2.xml -IF EXIST %python_generated_dir%\%2.cpp del %python_generated_dir%\%2.cpp -IF NOT EXIST %doxygen_dir% md %doxygen_dir% +IF NOT EXIST "%python_generated_dir%" md "%python_generated_dir%" +IF EXIST "%python_generated_dir%\%2.xml" del "%python_generated_dir%\%2.xml" +IF EXIST "%python_generated_dir%\%2.cpp" del "%python_generated_dir%\%2.cpp" +IF NOT EXIST "%doxygen_dir%" md "%doxygen_dir%" rem run doxygen -%bin_dir%\doxygen\doxygen.exe > NUL 2>&1 +"%bin_dir%\doxygen\doxygen.exe" > NUL 2>&1 rem run swig to generate the XML used by groovy to generate the python bindings -%bin_dir%\swig\swig.exe -w401 -c++ -outdir %python_generated_dir% -o %python_generated_dir%\%2.xml -xml -I"%base_Dir%\xbmc" -xmllang python %swig_dir%\%2.i +"%bin_dir%\swig\swig.exe" -w401 -c++ -outdir "%python_generated_dir%" -o "%python_generated_dir%\%2.xml" -xml -I"%base_Dir%\xbmc" -xmllang python "%swig_dir%\%2.i" rem run groovy to generate the python bindings -java.exe -cp "%groovy_dir%\groovy-all-1.8.4.jar;%groovy_dir%\commons-lang-2.6.jar;%generator_dir%;%python_dir%" groovy.ui.GroovyMain %generator_dir%\Generator.groovy %python_generated_dir%\%2.xml %python_dir%\PythonSwig.cpp.template %python_generated_dir%\%2.cpp %doxygen_dir% +java.exe -cp "%groovy_dir%\groovy-all-1.8.4.jar;%groovy_dir%\commons-lang-2.6.jar;%generator_dir%;%python_dir%" groovy.ui.GroovyMain "%generator_dir%\Generator.groovy" "%python_generated_dir%\%2.xml" "%python_dir%\PythonSwig.cpp.template" "%python_generated_dir%\%2.cpp" "%doxygen_dir%" + +rem delete the XML file generated by SWIG as it's not needed anymore +del "%python_generated_dir%\%2.xml" > NUL +rem delete the generated doxygen files +rmdir "%doxygen_dir%" /S /Q > NUL rem go back to the initial directory -cd %cur_dir%
\ No newline at end of file +cd "%cur_dir%"
\ No newline at end of file |