diff options
Diffstat (limited to 'build_files/windows')
-rw-r--r-- | build_files/windows/doc_py.cmd | 34 | ||||
-rw-r--r-- | build_files/windows/find_blender.cmd | 28 | ||||
-rw-r--r-- | build_files/windows/find_inkscape.cmd | 21 | ||||
-rw-r--r-- | build_files/windows/find_sphinx.cmd | 23 | ||||
-rw-r--r-- | build_files/windows/icons.cmd | 42 | ||||
-rw-r--r-- | build_files/windows/icons_geom.cmd | 29 | ||||
-rw-r--r-- | build_files/windows/parse_arguments.cmd | 9 | ||||
-rw-r--r-- | build_files/windows/reset_variables.cmd | 3 | ||||
-rw-r--r-- | build_files/windows/show_help.cmd | 4 |
9 files changed, 193 insertions, 0 deletions
diff --git a/build_files/windows/doc_py.cmd b/build_files/windows/doc_py.cmd new file mode 100644 index 00000000000..d33a0289083 --- /dev/null +++ b/build_files/windows/doc_py.cmd @@ -0,0 +1,34 @@ +set SOURCEDIR=%BLENDER_DIR%/doc/python_api/sphinx-in +set BUILDDIR=%BLENDER_DIR%/doc/python_api/sphinx-out +if "%BF_LANG%" == "" set BF_LANG=en +set SPHINXOPTS=-j auto -D language=%BF_LANG% + +call "%~dp0\find_sphinx.cmd" + +if EXIST "%SPHINX_BIN%" ( + goto detect_sphinx_done +) + +echo unable to locate sphinx-build, run "set sphinx_BIN=full_path_to_sphinx-build.exe" +exit /b 1 + +:detect_sphinx_done + +call "%~dp0\find_blender.cmd" + +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe" +exit /b 1 + +:detect_blender_done + +%BLENDER_BIN% ^ + --background -noaudio --factory-startup ^ + --python %BLENDER_DIR%/doc/python_api/sphinx_doc_gen.py + +"%SPHINX_BIN%" -b html %SPHINXOPTS% %O% %SOURCEDIR% %BUILDDIR% + +:EOF diff --git a/build_files/windows/find_blender.cmd b/build_files/windows/find_blender.cmd new file mode 100644 index 00000000000..9adbfd35ae9 --- /dev/null +++ b/build_files/windows/find_blender.cmd @@ -0,0 +1,28 @@ +REM First see if there is an environment variable set +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +REM Check the build folder next, if ninja was used there will be no +REM debug/release folder +set BLENDER_BIN=%BUILD_DIR%\bin\blender.exe +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +REM Check the release folder next +set BLENDER_BIN=%BUILD_DIR%\bin\release\blender.exe +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +REM Check the debug folder next +set BLENDER_BIN=%BUILD_DIR%\bin\debug\blender.exe +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +REM at this point, we don't know where blender is, clear the variable +set BLENDER_BIN= + +:detect_blender_done diff --git a/build_files/windows/find_inkscape.cmd b/build_files/windows/find_inkscape.cmd new file mode 100644 index 00000000000..2fa27f70d47 --- /dev/null +++ b/build_files/windows/find_inkscape.cmd @@ -0,0 +1,21 @@ +REM First see if there is an environment variable set +if EXIST "%INKSCAPE_BIN%" ( + goto detect_inkscape_done +) + +REM Then see if inkscape is available in the path +for %%X in (inkscape.exe) do (set INKSCAPE_BIN=%%~$PATH:X) +if EXIST "%INKSCAPE_BIN%" ( + goto detect_inkscape_done +) + +REM Finally see if it is perhaps installed at the default location +set INKSCAPE_BIN=%ProgramFiles%\Inkscape\bin\inkscape.exe +if EXIST "%INKSCAPE_BIN%" ( + goto detect_inkscape_done +) + +REM If still not found clear the variable +set INKSCAPE_BIN= + +:detect_inkscape_done diff --git a/build_files/windows/find_sphinx.cmd b/build_files/windows/find_sphinx.cmd new file mode 100644 index 00000000000..24238e96768 --- /dev/null +++ b/build_files/windows/find_sphinx.cmd @@ -0,0 +1,23 @@ +REM First see if there is an environment variable set +if EXIST "%SPHINX_BIN%" ( + goto detect_sphinx_done +) + +REM Then see if inkscape is available in the path +for %%X in (sphinx-build.exe) do (set SPHINX_BIN=%%~$PATH:X) +if EXIST "%SPHINX_BIN%" ( + goto detect_sphinx_done +) + +echo.The 'sphinx-build' command was not found. Make sure you have Sphinx +echo.installed, then set the SPHINX_BIN environment variable to point +echo.to the full path of the 'sphinx-build' executable. Alternatively you +echo.may add the Sphinx directory to PATH. +echo. +echo.If you don't have Sphinx installed, grab it from +echo.http://sphinx-doc.org/ + +REM If still not found clear the variable +set SPHINX_BIN= + +:detect_sphinx_done diff --git a/build_files/windows/icons.cmd b/build_files/windows/icons.cmd new file mode 100644 index 00000000000..473a40885a8 --- /dev/null +++ b/build_files/windows/icons.cmd @@ -0,0 +1,42 @@ +if EXIST %PYTHON% ( + goto detect_python_done +) + +set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe +if EXIST %PYTHON% ( + goto detect_python_done +) + +echo python not found at %PYTHON% +exit /b 1 + +:detect_python_done +echo found python (%PYTHON%) + +call "%~dp0\find_inkscape.cmd" + +if EXIST "%INKSCAPE_BIN%" ( + goto detect_inkscape_done +) + +echo unable to locate inkscape, run "set inkscape_BIN=full_path_to_inkscape.exe" +exit /b 1 + +:detect_inkscape_done + +call "%~dp0\find_blender.cmd" + +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe" +exit /b 1 + +:detect_blender_done + +%PYTHON% -B %BLENDER_DIR%\release\datafiles\blender_icons_update.py +%PYTHON% -B %BLENDER_DIR%\release\datafiles\prvicons_update.py +%PYTHON% -B %BLENDER_DIR%\release\datafiles\alert_icons_update.py + +:EOF diff --git a/build_files/windows/icons_geom.cmd b/build_files/windows/icons_geom.cmd new file mode 100644 index 00000000000..18312daf35b --- /dev/null +++ b/build_files/windows/icons_geom.cmd @@ -0,0 +1,29 @@ +if EXIST %PYTHON% ( + goto detect_python_done +) + +set PYTHON=%BLENDER_DIR%\..\lib\win64_vc15\python\39\bin\python.exe +if EXIST %PYTHON% ( + goto detect_python_done +) + +echo python not found at %PYTHON% +exit /b 1 + +:detect_python_done +echo found python (%PYTHON%) + +call "%~dp0\find_blender.cmd" + +if EXIST "%BLENDER_BIN%" ( + goto detect_blender_done +) + +echo unable to locate blender, run "set BLENDER_BIN=full_path_to_blender.exe" +exit /b 1 + +:detect_blender_done + +%PYTHON% -B %BLENDER_DIR%\release\datafiles\blender_icons_geom_update.py + +:EOF diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd index 000b98c992e..c63f062dfef 100644 --- a/build_files/windows/parse_arguments.cmd +++ b/build_files/windows/parse_arguments.cmd @@ -107,6 +107,15 @@ if NOT "%1" == "" ( set FORMAT=1 set FORMAT_ARGS=%2 %3 %4 %5 %6 %7 %8 %9 goto EOF + ) else if "%1" == "icons" ( + set ICONS=1 + goto EOF + ) else if "%1" == "icons_geom" ( + set ICONS_GEOM=1 + goto EOF + ) else if "%1" == "doc_py" ( + set DOC_PY=1 + goto EOF ) else ( echo Command "%1" unknown, aborting! goto ERR diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd index 262874713eb..8ba7b4d3307 100644 --- a/build_files/windows/reset_variables.cmd +++ b/build_files/windows/reset_variables.cmd @@ -31,3 +31,6 @@ set PYDEBUG_CMAKE_ARGS= set FORMAT= set TEST= set BUILD_WITH_SCCACHE= +set ICONS= +set ICONS_GEOM= +set DOC_PY= diff --git a/build_files/windows/show_help.cmd b/build_files/windows/show_help.cmd index ee5e9d9dbbd..d914ecab2b8 100644 --- a/build_files/windows/show_help.cmd +++ b/build_files/windows/show_help.cmd @@ -32,6 +32,10 @@ echo - 2019pre ^(build with visual studio 2019 pre-release^) echo - 2019b ^(build with visual studio 2019 Build Tools^) echo. +echo Documentation Targets ^(Not associated with building^) +echo - doc_py ^(Generate sphinx python api docs^) + +echo. echo Experimental options echo - with_opengl_tests ^(enable both the render and draw opengl test suites^) echo - clang ^(enable building with clang^) |