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
48034289
Unverified
Commit
48034289
authored
Oct 10, 2019
by
Jonah Williams
Committed by
GitHub
Oct 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch desktop build commands to use process utils (#42373)
parent
94515ba5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
60 deletions
+25
-60
build_linux.dart
packages/flutter_tools/lib/src/linux/build_linux.dart
+2
-13
build_macos.dart
packages/flutter_tools/lib/src/macos/build_macos.dart
+13
-25
build_windows.dart
packages/flutter_tools/lib/src/windows/build_windows.dart
+10
-22
No files found.
packages/flutter_tools/lib/src/linux/build_linux.dart
View file @
48034289
...
@@ -5,12 +5,10 @@
...
@@ -5,12 +5,10 @@
import
'../artifacts.dart'
;
import
'../artifacts.dart'
;
import
'../base/common.dart'
;
import
'../base/common.dart'
;
import
'../base/file_system.dart'
;
import
'../base/file_system.dart'
;
import
'../base/io.dart'
;
import
'../base/logger.dart'
;
import
'../base/logger.dart'
;
import
'../base/process
_manager
.dart'
;
import
'../base/process.dart'
;
import
'../build_info.dart'
;
import
'../build_info.dart'
;
import
'../cache.dart'
;
import
'../cache.dart'
;
import
'../convert.dart'
;
import
'../globals.dart'
;
import
'../globals.dart'
;
import
'../project.dart'
;
import
'../project.dart'
;
import
'../reporting/reporting.dart'
;
import
'../reporting/reporting.dart'
;
...
@@ -54,21 +52,12 @@ export PROJECT_DIR=${linuxProject.project.directory.path}
...
@@ -54,21 +52,12 @@ export PROJECT_DIR=${linuxProject.project.directory.path}
);
);
int
result
;
int
result
;
try
{
try
{
final
Process
process
=
await
processManager
.
start
(<
String
>[
result
=
await
processUtils
.
stream
(<
String
>[
'make'
,
'make'
,
'-C'
,
'-C'
,
linuxProject
.
makeFile
.
parent
.
path
,
linuxProject
.
makeFile
.
parent
.
path
,
'BUILD=
$buildFlag
'
,
'BUILD=
$buildFlag
'
,
]);
]);
process
.
stderr
.
transform
(
utf8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
(
printError
);
process
.
stdout
.
transform
(
utf8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
(
printTrace
);
result
=
await
process
.
exitCode
;
}
on
ArgumentError
{
}
on
ArgumentError
{
throwToolExit
(
'make not found. Run
\'
flutter doctor
\'
for more information.'
);
throwToolExit
(
'make not found. Run
\'
flutter doctor
\'
for more information.'
);
}
finally
{
}
finally
{
...
...
packages/flutter_tools/lib/src/macos/build_macos.dart
View file @
48034289
...
@@ -4,16 +4,13 @@
...
@@ -4,16 +4,13 @@
import
'../base/common.dart'
;
import
'../base/common.dart'
;
import
'../base/file_system.dart'
;
import
'../base/file_system.dart'
;
import
'../base/io.dart'
;
import
'../base/logger.dart'
;
import
'../base/logger.dart'
;
import
'../base/process
_manager
.dart'
;
import
'../base/process.dart'
;
import
'../build_info.dart'
;
import
'../build_info.dart'
;
import
'../convert.dart'
;
import
'../globals.dart'
;
import
'../globals.dart'
;
import
'../ios/xcodeproj.dart'
;
import
'../ios/xcodeproj.dart'
;
import
'../project.dart'
;
import
'../project.dart'
;
import
'../reporting/reporting.dart'
;
import
'../reporting/reporting.dart'
;
import
'cocoapod_utils.dart'
;
import
'cocoapod_utils.dart'
;
/// Builds the macOS project through xcodebuild.
/// Builds the macOS project through xcodebuild.
...
@@ -65,7 +62,13 @@ Future<void> buildMacOS({
...
@@ -65,7 +62,13 @@ Future<void> buildMacOS({
// Run the Xcode build.
// Run the Xcode build.
final
Stopwatch
sw
=
Stopwatch
()..
start
();
final
Stopwatch
sw
=
Stopwatch
()..
start
();
final
Process
process
=
await
processManager
.
start
(<
String
>[
final
Status
status
=
logger
.
startProgress
(
'Building macOS application...'
,
timeout:
null
,
);
int
result
;
try
{
result
=
await
processUtils
.
stream
(<
String
>[
'/usr/bin/env'
,
'/usr/bin/env'
,
'xcrun'
,
'xcrun'
,
'xcodebuild'
,
'xcodebuild'
,
...
@@ -77,21 +80,6 @@ Future<void> buildMacOS({
...
@@ -77,21 +80,6 @@ Future<void> buildMacOS({
'SYMROOT=
${fs.path.join(flutterBuildDir.absolute.path, 'Build', 'Products')}
'
,
'SYMROOT=
${fs.path.join(flutterBuildDir.absolute.path, 'Build', 'Products')}
'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
'COMPILER_INDEX_STORE_ENABLE=NO'
,
]);
]);
final
Status
status
=
logger
.
startProgress
(
'Building macOS application...'
,
timeout:
null
,
);
int
result
;
try
{
process
.
stderr
.
transform
(
utf8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
(
printError
);
process
.
stdout
.
transform
(
utf8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
(
printTrace
);
result
=
await
process
.
exitCode
;
}
finally
{
}
finally
{
status
.
cancel
();
status
.
cancel
();
}
}
...
...
packages/flutter_tools/lib/src/windows/build_windows.dart
View file @
48034289
...
@@ -5,16 +5,13 @@
...
@@ -5,16 +5,13 @@
import
'../artifacts.dart'
;
import
'../artifacts.dart'
;
import
'../base/common.dart'
;
import
'../base/common.dart'
;
import
'../base/file_system.dart'
;
import
'../base/file_system.dart'
;
import
'../base/io.dart'
;
import
'../base/logger.dart'
;
import
'../base/logger.dart'
;
import
'../base/process
_manager
.dart'
;
import
'../base/process.dart'
;
import
'../build_info.dart'
;
import
'../build_info.dart'
;
import
'../cache.dart'
;
import
'../cache.dart'
;
import
'../convert.dart'
;
import
'../globals.dart'
;
import
'../globals.dart'
;
import
'../project.dart'
;
import
'../project.dart'
;
import
'../reporting/reporting.dart'
;
import
'../reporting/reporting.dart'
;
import
'msbuild_utils.dart'
;
import
'msbuild_utils.dart'
;
import
'visual_studio.dart'
;
import
'visual_studio.dart'
;
...
@@ -63,30 +60,21 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {S
...
@@ -63,30 +60,21 @@ Future<void> buildWindows(WindowsProject windowsProject, BuildInfo buildInfo, {S
final
String
configuration
=
buildInfo
.
isDebug
?
'Debug'
:
'Release'
;
final
String
configuration
=
buildInfo
.
isDebug
?
'Debug'
:
'Release'
;
final
String
solutionPath
=
windowsProject
.
solutionFile
.
path
;
final
String
solutionPath
=
windowsProject
.
solutionFile
.
path
;
final
Stopwatch
sw
=
Stopwatch
()..
start
();
final
Stopwatch
sw
=
Stopwatch
()..
start
();
final
Status
status
=
logger
.
startProgress
(
'Building Windows application...'
,
timeout:
null
,
);
int
result
;
try
{
// Run the script with a relative path to the project using the enclosing
// Run the script with a relative path to the project using the enclosing
// directory as the workingDirectory, to avoid hitting the limit on command
// directory as the workingDirectory, to avoid hitting the limit on command
// lengths in batch scripts if the absolute path to the project is long.
// lengths in batch scripts if the absolute path to the project is long.
final
Process
process
=
await
processManager
.
start
(<
String
>[
result
=
await
processUtils
.
stream
(<
String
>[
buildScript
,
buildScript
,
vcvarsScript
,
vcvarsScript
,
fs
.
path
.
basename
(
solutionPath
),
fs
.
path
.
basename
(
solutionPath
),
configuration
,
configuration
,
],
workingDirectory:
fs
.
path
.
dirname
(
solutionPath
));
],
workingDirectory:
fs
.
path
.
dirname
(
solutionPath
));
final
Status
status
=
logger
.
startProgress
(
'Building Windows application...'
,
timeout:
null
,
);
int
result
;
try
{
process
.
stderr
.
transform
(
utf8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
(
printError
);
process
.
stdout
.
transform
(
utf8
.
decoder
)
.
transform
(
const
LineSplitter
())
.
listen
(
printTrace
);
result
=
await
process
.
exitCode
;
}
finally
{
}
finally
{
status
.
cancel
();
status
.
cancel
();
}
}
...
...
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