2022-06-26 12:00:03 +00:00
|
|
|
@echo off
|
2024-02-14 13:51:10 +00:00
|
|
|
call "%~dp0scripts\toolchain\fbtenv.cmd" env || exit /b
|
2022-06-30 16:06:12 +00:00
|
|
|
|
2022-10-25 22:15:02 +00:00
|
|
|
set SCONS_EP=python -m SCons
|
2022-06-30 16:06:12 +00:00
|
|
|
|
2022-07-04 17:38:18 +00:00
|
|
|
if [%FBT_NO_SYNC%] == [] (
|
2023-10-23 09:55:36 +00:00
|
|
|
set _FBT_CLONE_FLAGS=--jobs %NUMBER_OF_PROCESSORS%
|
|
|
|
if not [%FBT_GIT_SUBMODULE_SHALLOW%] == [] (
|
|
|
|
set _FBT_CLONE_FLAGS=%_FBT_CLONE_FLAGS% --depth 1
|
|
|
|
)
|
2022-07-14 16:24:26 +00:00
|
|
|
if exist ".git" (
|
2023-10-23 09:55:36 +00:00
|
|
|
git submodule update --init --recursive %_FBT_CLONE_FLAGS%
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
|
|
echo Failed to update submodules, set FBT_NO_SYNC to skip
|
|
|
|
exit /b 1
|
|
|
|
)
|
2022-07-14 16:24:26 +00:00
|
|
|
) else (
|
2023-10-23 09:55:36 +00:00
|
|
|
echo .git not found, please clone repo with "git clone"
|
2022-07-14 16:24:26 +00:00
|
|
|
exit /b 1
|
|
|
|
)
|
2022-06-26 12:00:03 +00:00
|
|
|
)
|
|
|
|
|
2023-02-17 12:22:08 +00:00
|
|
|
set "SCONS_DEFAULT_FLAGS=--warn=target-not-built"
|
|
|
|
|
|
|
|
if not defined FBT_VERBOSE (
|
|
|
|
set "SCONS_DEFAULT_FLAGS=%SCONS_DEFAULT_FLAGS% -Q"
|
|
|
|
)
|
|
|
|
|
2022-10-25 22:15:02 +00:00
|
|
|
%SCONS_EP% %SCONS_DEFAULT_FLAGS% %*
|