2019-11-08 16:01:00 +00:00
|
|
|
if EXIST %BLENDER_DIR%\..\lib\win64_vc15\llvm\bin\clang-format.exe (
|
|
|
|
set CF_PATH=..\lib\win64_vc15\llvm\bin
|
2019-04-16 15:05:31 +00:00
|
|
|
goto detect_done
|
|
|
|
)
|
|
|
|
|
|
|
|
echo clang-format not found
|
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:detect_done
|
|
|
|
echo found clang-format in %CF_PATH%
|
|
|
|
|
2022-01-25 16:19:03 +00:00
|
|
|
if NOT EXIST %PYTHON% (
|
|
|
|
echo python not found, required for this operation
|
|
|
|
exit /b 1
|
2019-08-13 23:03:09 +00:00
|
|
|
)
|
|
|
|
|
2019-04-16 14:47:05 +00:00
|
|
|
set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py
|
2019-04-16 13:34:32 +00:00
|
|
|
|
|
|
|
REM The formatting script expects clang-format to be in the current PATH.
|
2019-04-16 15:05:31 +00:00
|
|
|
set PATH=%CF_PATH%;%PATH%
|
2019-04-16 13:34:32 +00:00
|
|
|
|
2019-08-23 17:35:02 +00:00
|
|
|
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
|
|
|
%PYTHON% -B %FORMAT_PATHS% %FORMAT_ARGS%
|
2019-04-16 13:34:32 +00:00
|
|
|
|
|
|
|
:EOF
|