unleashed-firmware/scripts/toolchain/fbtenv.cmd
hedger 14dabf523a
New toolchain with gcc 12 (#3254)
* changes for xPack 12.3
* support for gcc 13.2
* Update tools name
* Add new linux toolchain
* Fixed copro submodule
* Fix gdb-py
* Fixes for c++ apps
* Fix gdb-py3, add udev rules
* Fixed udev rules location
* Add MacOS arm, fix fbt toolchain download
* Fixed downloading error file
* fbt: fixed linker warnings; removed gcc 10 from list of supported toolchains
* ufbt: fixed supported toolchain versions
* nfc: replaced local malloc with calloc
* restored code with Warray-bounds to older state
* Update fbtenv.cmd
* Suppressing warnings
* Bump to 25
* Bump to 26
* lint: reformatted macros for new clang-format
* Bump to 27
* Fix m type word
* Bump to 28
* furi: added FURI_DEPRECATED macro
* scripts: toolchain download on Windows: fixing partially extracted cases

Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
2024-02-12 09:04:12 +07:00

60 lines
1.7 KiB
Batchfile

@echo off
if not ["%FBT_ROOT%"] == [""] (
goto already_set
)
set "FBT_ROOT=%~dp0\..\..\"
pushd "%FBT_ROOT%"
set "FBT_ROOT=%cd%"
popd
if not ["%FBT_NOENV%"] == [""] (
exit /b 0
)
set "FLIPPER_TOOLCHAIN_VERSION=28"
if ["%FBT_TOOLCHAIN_PATH%"] == [""] (
set "FBT_TOOLCHAIN_PATH=%FBT_ROOT%"
)
set "FBT_TOOLCHAIN_ROOT=%FBT_TOOLCHAIN_PATH%\toolchain\x86_64-windows"
set "FBT_TOOLCHAIN_VERSION_FILE=%FBT_TOOLCHAIN_ROOT%\VERSION"
if not exist "%FBT_TOOLCHAIN_ROOT%" (
powershell -ExecutionPolicy Bypass -File "%FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1" %flipper_toolchain_version% "%FBT_TOOLCHAIN_ROOT%"
)
if not exist "%FBT_TOOLCHAIN_VERSION_FILE%" (
powershell -ExecutionPolicy Bypass -File "%FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1" %flipper_toolchain_version% "%FBT_TOOLCHAIN_ROOT%"
)
set /p REAL_TOOLCHAIN_VERSION=<"%FBT_TOOLCHAIN_VERSION_FILE%"
if not "%REAL_TOOLCHAIN_VERSION%" == "%FLIPPER_TOOLCHAIN_VERSION%" (
echo FBT: starting toolchain upgrade process..
powershell -ExecutionPolicy Bypass -File "%FBT_ROOT%\scripts\toolchain\windows-toolchain-download.ps1" %flipper_toolchain_version% "%FBT_TOOLCHAIN_ROOT%"
set /p REAL_TOOLCHAIN_VERSION=<"%FBT_TOOLCHAIN_VERSION_FILE%"
)
if defined FBT_VERBOSE (
echo FBT: using toolchain version %REAL_TOOLCHAIN_VERSION%
)
set "HOME=%USERPROFILE%"
set "PYTHONHOME=%FBT_TOOLCHAIN_ROOT%\python"
set "PYTHONPATH="
set "PYTHONNOUSERSITE=1"
set "PATH=%FBT_TOOLCHAIN_ROOT%\bin;%FBT_TOOLCHAIN_ROOT%\python;%PATH%"
set "PROMPT=(fbt) %PROMPT%"
:already_set
if not "%1" == "env" (
echo *********************************
echo * fbt build environment *
echo *********************************
cd "%FBT_ROOT%"
cmd /k
)