forked from bartvdbraak/blender
f26c36c96b
Several sub commands tried on their own to locate python, given I wanted to look in several locations for a broader libdir compatibility this is best done in a central location. Python 3.9 is still preferred, but if 3.10-3.12 are available that be accepted as well. note: this is about the python version make.bat uses to run various python helper scripts, this change has no influence on the python version blender itself uses.
26 lines
642 B
Batchfile
26 lines
642 B
Batchfile
if EXIST %BLENDER_DIR%\..\lib\win64_vc15\llvm\bin\clang-format.exe (
|
|
set CF_PATH=..\lib\win64_vc15\llvm\bin
|
|
goto detect_done
|
|
)
|
|
|
|
echo clang-format not found
|
|
exit /b 1
|
|
|
|
:detect_done
|
|
echo found clang-format in %CF_PATH%
|
|
|
|
if NOT EXIST %PYTHON% (
|
|
echo python not found, required for this operation
|
|
exit /b 1
|
|
)
|
|
|
|
set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py
|
|
|
|
REM The formatting script expects clang-format to be in the current PATH.
|
|
set PATH=%CF_PATH%;%PATH%
|
|
|
|
REM Use -B to avoid writing __pycache__ in lib directory and causing update conflicts.
|
|
%PYTHON% -B %FORMAT_PATHS% %FORMAT_ARGS%
|
|
|
|
:EOF
|