veilid/veilid-flutter/setup_flutter.bat

63 lines
2.0 KiB
Batchfile
Raw Normal View History

2022-01-16 18:21:46 -05:00
@ECHO OFF
SETLOCAL
PUSHD %~dp0
SET ROOTDIR=%CD%
POPD
REM ensure flutter is installed
FOR %%X IN (flutter.bat) DO (SET FLUTTER_FOUND=%%~$PATH:X)
IF NOT DEFINED FLUTTER_FOUND (
echo Flutter is not available in the path, install Flutter from here: https://docs.flutter.dev/get-started/install
goto end
)
echo [X] Flutter is available in the path
REM ensure dart is installed
FOR %%X IN (dart.bat) DO (SET DART_FOUND=%%~$PATH:X)
IF NOT DEFINED DART_FOUND (
echo Dart is not available in the path, check your environment variables and that Flutter is installed correctly
goto end
)
echo [X] Dart is available in the path
REM ensure cargo is installed
FOR %%X IN (cargo.exe) DO (SET CARGO_FOUND=%%~$PATH:X)
IF NOT DEFINED CARGO_FOUND (
echo Cargo is not available in the path, ensure Rust is installed correctly
goto end
)
echo [X] Cargo is available in the path
2022-03-12 15:27:15 -05:00
@REM REM ensure winget is installed
@REM FOR %%X IN (winget.exe) DO (SET WINGET_FOUND=%%~$PATH:X)
@REM IF NOT DEFINED WINGET_FOUND (
@REM echo Winget is not available in the path, ensure your version of Windows is new enough and has Winget installed from the Microsoft Store
@REM echo https://docs.microsoft.com/en-us/windows/package-manager/winget/
@REM goto end
@REM )
@REM echo [X] Winget is available in the path
2022-01-16 18:21:46 -05:00
2022-03-12 15:27:15 -05:00
@REM rem install cargo cbindgen
@REM cargo install cbindgen
2022-01-16 18:21:46 -05:00
2022-03-12 15:27:15 -05:00
@REM rem install dart ffigen
@REM call dart pub global activate ffigen
2022-01-16 18:21:46 -05:00
2022-03-12 15:27:15 -05:00
@REM rem install flutter_rust_bridge_codegen
@REM cargo install flutter_rust_bridge_codegen
2022-01-16 18:21:46 -05:00
2022-03-12 15:27:15 -05:00
@REM rem install just
@REM cargo install just
2022-03-12 15:27:15 -05:00
@REM rem ensure packages are installed
@REM winget install -e --id LLVM.LLVM --accept-package-agreements --accept-source-agreements
2022-01-16 18:21:46 -05:00
rem ensure windows is enabled in flutter
2022-01-16 19:22:23 -05:00
call flutter config --enable-windows-desktop --no-enable-android
2022-01-16 18:21:46 -05:00
2022-01-16 19:22:23 -05:00
rem turn off analytics
call flutter config --no-analytics
call dart --disable-analytics
call flutter doctor -v