mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 13:09:49 +04:00
Merge remote-tracking branch 'OFW/hedger/toochain_29' into new_c_version
This commit is contained in:
@@ -13,7 +13,7 @@ if not ["%FBT_NOENV%"] == [""] (
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
set "FLIPPER_TOOLCHAIN_VERSION=28"
|
||||
set "FLIPPER_TOOLCHAIN_VERSION=32"
|
||||
|
||||
if ["%FBT_TOOLCHAIN_PATH%"] == [""] (
|
||||
set "FBT_TOOLCHAIN_PATH=%FBT_ROOT%"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# public variables
|
||||
DEFAULT_SCRIPT_PATH="$(pwd -P)";
|
||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"28"}";
|
||||
FBT_TOOLCHAIN_VERSION="${FBT_TOOLCHAIN_VERSION:-"32"}";
|
||||
|
||||
if [ -z ${FBT_TOOLCHAIN_PATH+x} ] ; then
|
||||
FBT_TOOLCHAIN_PATH_WAS_SET=0;
|
||||
@@ -208,7 +208,9 @@ fbtenv_show_unpack_percentage()
|
||||
fbtenv_unpack_toolchain()
|
||||
{
|
||||
echo "Unpacking toolchain to '$FBT_TOOLCHAIN_PATH/toolchain':";
|
||||
rm "$FBT_TOOLCHAIN_PATH/toolchain/current" || true;
|
||||
if [ -L "$FBT_TOOLCHAIN_PATH/toolchain/current" ]; then
|
||||
rm "$FBT_TOOLCHAIN_PATH/toolchain/current";
|
||||
fi
|
||||
tar -xvf "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_TAR" -C "$FBT_TOOLCHAIN_PATH/toolchain" 2>&1 | fbtenv_show_unpack_percentage;
|
||||
mkdir -p "$FBT_TOOLCHAIN_PATH/toolchain" || return 1;
|
||||
mv "$FBT_TOOLCHAIN_PATH/toolchain/$TOOLCHAIN_DIR" "$TOOLCHAIN_ARCH_DIR" || return 1;
|
||||
|
||||
@@ -13,19 +13,21 @@ $toolchain_zip = "$toolchain_dist_folder-$toolchain_version.zip"
|
||||
$toolchain_zip_temp_path = "$download_dir\$toolchain_zip"
|
||||
$toolchain_dist_temp_path = "$download_dir\$toolchain_dist_folder"
|
||||
|
||||
try {
|
||||
|
||||
if (Test-Path -LiteralPath "$toolchain_target_path") {
|
||||
Write-Host -NoNewline "Removing old Windows toolchain.."
|
||||
Remove-Item -LiteralPath "$toolchain_target_path" -Force -Recurse
|
||||
Write-Host "done!"
|
||||
}
|
||||
|
||||
if (Test-path -Path "$toolchain_target_path\..\current") {
|
||||
if (Test-path -LiteralPath "$toolchain_target_path\..\current") {
|
||||
Write-Host -NoNewline "Unlinking 'current'.."
|
||||
Remove-Item -LiteralPath "$toolchain_target_path\..\current" -Force
|
||||
Write-Host "done!"
|
||||
}
|
||||
|
||||
if (!(Test-Path -Path "$toolchain_zip_temp_path" -PathType Leaf)) {
|
||||
if (!(Test-Path -LiteralPath "$toolchain_zip_temp_path" -PathType Leaf)) {
|
||||
Write-Host -NoNewline "Downloading Windows toolchain.."
|
||||
$wc = New-Object net.webclient
|
||||
$wc.Downloadfile("$toolchain_url", "$toolchain_zip_temp_path")
|
||||
@@ -57,4 +59,10 @@ Write-Host -NoNewline "Cleaning up temporary files.."
|
||||
Remove-Item -LiteralPath "$toolchain_zip_temp_path" -Force
|
||||
Write-Host "done!"
|
||||
|
||||
# dasdasd
|
||||
} catch {
|
||||
Write-Host "An error occurred"
|
||||
Write-Host $_
|
||||
Write-Host "Please close VSCode and any other programs that may be using the toolchain and try again."
|
||||
$host.SetShouldExit(1)
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user