2022-06-26 12:00:03 +00:00
|
|
|
@echo off
|
2022-06-30 16:06:12 +00:00
|
|
|
|
|
|
|
set SCONS_EP=%~dp0\lib\scons\scripts\scons.py
|
|
|
|
|
2022-07-04 17:38:18 +00:00
|
|
|
if [%FBT_NO_SYNC%] == [] (
|
|
|
|
if exist ".git" (
|
|
|
|
git submodule update --init
|
|
|
|
) else (
|
|
|
|
echo Not in a git repo, please clone with git clone --recursive
|
|
|
|
exit /b 1
|
|
|
|
)
|
2022-06-26 12:00:03 +00:00
|
|
|
)
|
2022-07-02 14:03:48 +00:00
|
|
|
set "flipper_toolchain_version=2"
|
2022-07-01 23:31:16 +00:00
|
|
|
set "toolchainRoot=%~dp0toolchain\i686-windows"
|
2022-06-26 12:00:03 +00:00
|
|
|
set "SCONS_DEFAULT_FLAGS=-Q --warn=target-not-built"
|
2022-07-04 18:57:40 +00:00
|
|
|
|
2022-07-01 23:31:16 +00:00
|
|
|
if not exist "%toolchainRoot%" (
|
2022-07-02 14:03:48 +00:00
|
|
|
powershell -ExecutionPolicy Bypass -File %~dp0scripts\toolchain\windows-toolchain-download.ps1 "%flipper_toolchain_version%"
|
|
|
|
)
|
|
|
|
if not exist "%toolchainRoot%\VERSION" (
|
|
|
|
powershell -ExecutionPolicy Bypass -File %~dp0scripts\toolchain\windows-toolchain-download.ps1 "%flipper_toolchain_version%"
|
|
|
|
)
|
|
|
|
set /p real_toolchain_version=<%toolchainRoot%\VERSION
|
|
|
|
if not "%real_toolchain_version%" == "%flipper_toolchain_version%" (
|
|
|
|
powershell -ExecutionPolicy Bypass -File %~dp0scripts\toolchain\windows-toolchain-download.ps1 "%flipper_toolchain_version%"
|
2022-07-01 23:31:16 +00:00
|
|
|
)
|
|
|
|
cmd /V /C "set "PATH=%toolchainRoot%\python;%toolchainRoot%\bin;%toolchainRoot%\protoc\bin;%toolchainRoot%\openocd\bin;%PATH%" && python lib\scons\scripts\scons.py %SCONS_DEFAULT_FLAGS% %*"
|