Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b84bfa35
Unverified
Commit
b84bfa35
authored
Sep 19, 2022
by
jensjoha
Committed by
GitHub
Sep 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Faster wrapper script on Windows (#111465)
parent
085a187e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
flutter.bat
bin/flutter.bat
+1
-2
shared.bat
bin/internal/shared.bat
+24
-16
No files found.
bin/flutter.bat
View file @
b84bfa35
...
@@ -22,8 +22,7 @@ REM If available, add location of bundled mingit to PATH
...
@@ -22,8 +22,7 @@ REM If available, add location of bundled mingit to PATH
SET mingit_path=%FLUTTER_ROOT%\bin\mingit\cmd
SET mingit_path=%FLUTTER_ROOT%\bin\mingit\cmd
IF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%
IF EXIST "%mingit_path%" SET PATH=%PATH%;%mingit_path%
REM Test if Git is available on the Host
REM We test if Git is available on the Host as we run git in shared.bat
where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
IF NOT EXIST "%flutter_root%\.git" (
IF NOT EXIST "%flutter_root%\.git" (
ECHO Error: The Flutter directory is not a clone of the GitHub project.
ECHO Error: The Flutter directory is not a clone of the GitHub project.
...
...
bin/internal/shared.bat
View file @
b84bfa35
...
@@ -25,19 +25,6 @@ SET pub_cache_path=%FLUTTER_ROOT%\.pub-cache
...
@@ -25,19 +25,6 @@ SET pub_cache_path=%FLUTTER_ROOT%\.pub-cache
SET dart=%dart_sdk_path%\bin\dart.exe
SET dart=%dart_sdk_path%\bin\dart.exe
REM Detect which PowerShell executable is available on the Host
REM PowerShell version <= 5: PowerShell.exe
REM PowerShell version >= 6: pwsh.exe
WHERE /Q pwsh.exe && (
SET powershell_executable=pwsh.exe
) || WHERE /Q PowerShell.exe && (
SET powershell_executable=PowerShell.exe
) || (
ECHO Error: PowerShell executable not found. 1>&2
ECHO Either pwsh.exe or PowerShell.exe must be in your PATH. 1>&2
EXIT 1
)
REM Ensure that bin/cache exists.
REM Ensure that bin/cache exists.
IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%"
IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%"
...
@@ -66,9 +53,18 @@ GOTO :after_subroutine
...
@@ -66,9 +53,18 @@ GOTO :after_subroutine
CALL "%bootstrap_path%"
CALL "%bootstrap_path%"
)
)
PUSHD "%flutter_root%"
REM Check that git exists and get the revision
FOR /f %%r IN ('git rev-parse HEAD') DO SET revision=%%r
SET git_exists=false
POPD
2>NUL (
PUSHD "%flutter_root%"
FOR /f %%r IN ('git rev-parse HEAD') DO (
SET git_exists=true
SET revision=%%r
)
POPD
)
REM If git didn't execute we don't have git. Exit without /B to avoid retrying.
if %git_exists% == false echo Error: Unable to find git in your PATH. && EXIT 1
SET compilekey="%revision%:%FLUTTER_TOOL_ARGS%"
SET compilekey="%revision%:%FLUTTER_TOOL_ARGS%"
REM Invalidate cache if:
REM Invalidate cache if:
...
@@ -101,6 +97,18 @@ GOTO :after_subroutine
...
@@ -101,6 +97,18 @@ GOTO :after_subroutine
EXIT /B
EXIT /B
:do_sdk_update_and_snapshot
:do_sdk_update_and_snapshot
REM Detect which PowerShell executable is available on the Host
REM PowerShell version <= 5: PowerShell.exe
REM PowerShell version >= 6: pwsh.exe
WHERE /Q pwsh.exe && (
SET powershell_executable=pwsh.exe
) || WHERE /Q PowerShell.exe && (
SET powershell_executable=PowerShell.exe
) || (
ECHO Error: PowerShell executable not found. 1>&2
ECHO Either pwsh.exe or PowerShell.exe must be in your PATH. 1>&2
EXIT 1
)
ECHO Checking Dart SDK version... 1>&2
ECHO Checking Dart SDK version... 1>&2
SET update_dart_bin=%FLUTTER_ROOT%\bin\internal\update_dart_sdk.ps1
SET update_dart_bin=%FLUTTER_ROOT%\bin\internal\update_dart_sdk.ps1
REM Escape apostrophes from the executable path
REM Escape apostrophes from the executable path
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment