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
23120977
Unverified
Commit
23120977
authored
Mar 20, 2023
by
Loïc Sharma
Committed by
GitHub
Mar 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Tool] [Windows] Output app path on build completion (#122928)
[Tool] [Windows] Output app path on build completion
parent
bca0d2cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
run_tests.dart
dev/devicelab/lib/tasks/run_tests.dart
+22
-0
build_windows.dart
packages/flutter_tools/lib/src/windows/build_windows.dart
+18
-0
No files found.
dev/devicelab/lib/tasks/run_tests.dart
View file @
23120977
...
...
@@ -177,6 +177,9 @@ class WindowsRunOutputTest extends DesktopRunOutputTest {
r'Building Windows application\.\.\.\s*\d+(\.\d+)?(ms|s)'
,
multiLine:
true
,
);
static
final
RegExp
_builtOutput
=
RegExp
(
r'Built build\\windows\\runner\\(Debug|Release)\\\w+\.exe( \(\d+(\.\d+)?MB\))?\.'
,
);
@override
void
verifyBuildOutput
(
List
<
String
>
stdout
)
{
...
...
@@ -185,6 +188,25 @@ class WindowsRunOutputTest extends DesktopRunOutputTest {
_buildOutput
.
hasMatch
,
'Building Windows application...'
,
);
final
String
buildMode
=
release
?
'Release'
:
'Debug'
;
_findNextMatcherInList
(
stdout
,
(
String
line
)
{
if
(!
_builtOutput
.
hasMatch
(
line
)
||
!
line
.
contains
(
buildMode
))
{
return
false
;
}
// Size information is only included in release builds.
final
bool
hasSize
=
line
.
contains
(
'MB).'
);
if
(
release
!=
hasSize
)
{
return
false
;
}
return
true
;
},
'Built build
\\
windows
\\
runner
\\
$buildMode
\\
app.exe'
,
);
}
}
...
...
packages/flutter_tools/lib/src/windows/build_windows.dart
View file @
23120977
...
...
@@ -8,6 +8,7 @@ import '../base/common.dart';
import
'../base/file_system.dart'
;
import
'../base/logger.dart'
;
import
'../base/project_migrator.dart'
;
import
'../base/terminal.dart'
;
import
'../base/utils.dart'
;
import
'../build_info.dart'
;
import
'../cache.dart'
;
...
...
@@ -92,6 +93,23 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {
}
finally
{
status
.
stop
();
}
final
String
?
binaryName
=
getCmakeExecutableName
(
windowsProject
);
final
File
appFile
=
buildDirectory
.
childDirectory
(
'runner'
)
.
childDirectory
(
sentenceCase
(
buildModeName
))
.
childFile
(
'
$binaryName
.exe'
);
if
(
appFile
.
existsSync
())
{
final
String
appSize
=
(
buildInfo
.
mode
==
BuildMode
.
debug
)
?
''
// Don't display the size when building a debug variant.
:
' (
${getSizeAsMB(appFile.lengthSync())}
)'
;
globals
.
logger
.
printStatus
(
'
${globals.logger.terminal.successMark}
'
'Built
${globals.fs.path.relative(appFile.path)}$appSize
.'
,
color:
TerminalColor
.
green
,
);
}
if
(
buildInfo
.
codeSizeDirectory
!=
null
&&
sizeAnalyzer
!=
null
)
{
final
String
arch
=
getNameForTargetPlatform
(
TargetPlatform
.
windows_x64
);
final
File
codeSizeFile
=
globals
.
fs
.
directory
(
buildInfo
.
codeSizeDirectory
)
...
...
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