diff options
author | Tolriq <tolriq@gmail.com> | 2014-03-10 16:30:59 +0100 |
---|---|---|
committer | Tolriq <tolriq@gmail.com> | 2014-03-10 17:52:29 +0100 |
commit | de9d1b8a13241d6d629f70aa00f2518ea3d3b035 (patch) | |
tree | 26760314c30e1581a8c31187a25ff47db5d06e6a /tools/codegenerator | |
parent | 84c762e241ed3135412fc73f2eef33e502cc0fda (diff) |
Correctly use JAVA_HOME when generating SWIG bindings
Fix some compilation problems on windows with multiple java install or java not in path but with a correct JAVA_HOME defined
Diffstat (limited to 'tools/codegenerator')
-rw-r--r-- | tools/codegenerator/GenerateSWIGBindings.bat | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/codegenerator/GenerateSWIGBindings.bat b/tools/codegenerator/GenerateSWIGBindings.bat index 822b0ca0f6..da45bdb809 100644 --- a/tools/codegenerator/GenerateSWIGBindings.bat +++ b/tools/codegenerator/GenerateSWIGBindings.bat @@ -6,6 +6,7 @@ SET base_dir=%cur_dir%\..\.. SET groovy_dir=%base_dir%\lib\groovy SET generator_dir=%base_dir%\tools\codegenerator SET bin_dir=%cur_dir%\..\BuildDependencies\bin +SET java_exe=java.exe rem go into xbmc/interfaces/python cd "%1\..\python" @@ -20,6 +21,7 @@ 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 EXIST "%JAVA_HOME%\bin\java.exe" set java_exe=%JAVA_HOME%\bin\java.exe rem run doxygen "%bin_dir%\doxygen\doxygen.exe" > NUL 2>&1 @@ -27,7 +29,7 @@ rem run doxygen 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" rem run groovy to generate the python bindings -java.exe -cp "%groovy_dir%\groovy-all-2.1.7.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-2.1.7.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 |