forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Windows] Set Platform.executable on engine start (flutter#35560)
When setting FlutterProjectArgs.command_line_argv prior to launching the engine, we were previously setting a placeholder value rather than the executable name. This resulted in Platform.executable (from dart:io) returning "placeholder" in application code. This updates the Windows implementation for consistency with macOS and guarantees that Platform.executable will return a reasonable value in Dart code. Note that this does not affect Platform.resolvedExecutable, which returns a full, resolved path, and is implemented in the Dart runtime itself. Previously the code: print(Platform.executable); print(Platform.resolvedExecutable); resulted in the following output on Windows: flutter: placeholder flutter: C:\path\to\project\build\windows\runner\Debug\project.exe after this patch, it results in: flutter: project.exe flutter: C:\path\to\project\build\windows\runner\Debug\project.exe Issue: flutter/flutter#83921
- Loading branch information
Showing
5 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters