mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-14 16:57:22 +00:00
1a8f6dbed8
* libs: removed cxxheaderparser submodule, expecting one from toolchain * toolchain: v38 * vscode: now using clangd from toolchain * vscode: clangd path in config is now generated by fbt * vscode, fbt: improved clangd path generation * fbt: fixed LANG_SERVER handling; switched to clangd as default * vscode: removed deprecated options from config * ufbt: project template: updated clang-format, added clangd config * ufbt: now using clangd as default language server * ufbt: now using clangd as default language server
62 lines
1.8 KiB
Batchfile
62 lines
1.8 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=38"
|
|
|
|
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%" || exit /b
|
|
)
|
|
|
|
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%" || exit /b
|
|
)
|
|
|
|
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%" || exit /b
|
|
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
|
|
)
|
|
|
|
exit /b 0
|