@ECHO offREM Copyright 2014 The Flutter Authors. All rights reserved.REM Use of this source code is governed by a BSD-style license that can beREM found in the LICENSE file.REM ---------------------------------- NOTE ----------------------------------REMREM Please keep the logic in this file consistent with the logic in theREM `flutter-dev` script in the same directory to ensure that Flutter & DartREM continue to work across all platforms!REMREM --------------------------------------------------------------------------SETLOCALREM This is a helper script for development purposes. It runs the Flutter toolREM from source code directly, without using the prebuilt snapshot. This isREM useful for development, as it allows you to make changes to the tool and seeREM the effects immediately, but is much slower than using the prebuilt snapshot.REM To debug the tool, you can uncomment the following line to enable debug mode:REM SET FLUTTER_TOOL_ARGS="--enable-asserts %FLUTTER_TOOL_ARGS%"FOR %%i IN ("%~dp0..") DO SET FLUTTER_ROOT=%%~fiREM If available, add location of bundled mingit to PATHSET mingit_path=%FLUTTER_ROOT%\bin\mingit\cmdIF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%REM Test if Git is available on the hostWHERE /Q gitIF "%ERRORLEVEL%" NEQ "0" (ECHO Error: Unable to find git in your PATH.EXIT /B 1)REM Detect which PowerShell executable is available on the hostREM PowerShell version <= 5: PowerShell.exeREM PowerShell version >= 6: pwsh.exeWHERE /Q pwsh && (SET "powershell_executable=call pwsh") || WHERE /Q PowerShell.exe && (SET powershell_executable=PowerShell.exe) || (ECHO Error: PowerShell executable not found. 1>&2ECHO Either pwsh.exe or PowerShell.exe must be in your PATH. 1>&2EXIT /B 1)REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would failIF NOT EXIST "%flutter_root%\.git" (ECHO Error: The Flutter directory is not a clone of the GitHub project.ECHO The flutter tool requires Git in order to operate properly;ECHO to set up Flutter, run the following command:ECHO git clone -b stable https://github.com/flutter/flutter.gitEXIT 1)REM Include shared scripts in shared.batSET shared_bin=%FLUTTER_ROOT%\bin\internal\shared.batCALL "%shared_bin%"SET flutter_tools_dir=%FLUTTER_ROOT%\packages\flutter_toolsSET cache_dir=%FLUTTER_ROOT%\bin\cacheSET script_path=%flutter_tools_dir%\bin\flutter_tools.dartSET dart_sdk_path=%cache_dir%\dart-sdkSET dart=%dart_sdk_path%\bin\dart.exeSET exit_with_errorlevel=%FLUTTER_ROOT%/bin/internal/exit_with_errorlevel.batREM Chaining the call to 'dart' and 'exit' with an ampersand ensures thatREM Windows reads both commands into memory once before executing them. ThisREM avoids nasty errors that may otherwise occur when the dart command (e.g. asREM part of 'flutter upgrade') modifies this batch script while it is executing.REMREM Do not use the CALL command in the next line to execute Dart. CALL causesREM Windows to re-read the line from disk after the CALL command has finishedREM regardless of the ampersand chain."%dart%" run --resident --packages="%flutter_tools_dir%\.dart_tool\package_config.json" %FLUTTER_TOOL_ARGS% "%script_path%" %* & "%exit_with_errorlevel%"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。