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
239a717d
Commit
239a717d
authored
May 26, 2016
by
Todd Volkert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Pass the local engine config through Xcode (#4190)"
This reverts commit
8f69cccc
.
parent
bc35d09b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
24 deletions
+10
-24
process.dart
packages/flutter_tools/lib/src/base/process.dart
+3
-9
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-2
flutter_command_runner.dart
.../flutter_tools/lib/src/runner/flutter_command_runner.dart
+6
-13
No files found.
packages/flutter_tools/lib/src/base/process.dart
View file @
239a717d
...
...
@@ -10,8 +10,6 @@ import '../globals.dart';
typedef
String
StringConverter
(
String
string
);
final
Map
<
String
,
String
>
childEnvironmentOverrides
=
new
Map
<
String
,
String
>();
/// This runs the command in the background from the specified working
/// directory. Completes when the process has been started.
Future
<
Process
>
runCommand
(
List
<
String
>
cmd
,
{
String
workingDirectory
})
async
{
...
...
@@ -21,8 +19,7 @@ Future<Process> runCommand(List<String> cmd, { String workingDirectory }) async
Process
process
=
await
Process
.
start
(
executable
,
arguments
,
workingDirectory:
workingDirectory
,
environment:
childEnvironmentOverrides
workingDirectory:
workingDirectory
);
return
process
;
}
...
...
@@ -112,11 +109,8 @@ String _runWithLoggingSync(List<String> cmd, {
if
(
truncateCommand
&&
cmdText
.
length
>
160
)
cmdText
=
cmdText
.
substring
(
0
,
160
)
+
'…'
;
printTrace
(
cmdText
);
ProcessResult
results
=
Process
.
runSync
(
cmd
[
0
],
cmd
.
getRange
(
1
,
cmd
.
length
).
toList
(),
workingDirectory:
workingDirectory
,
environment:
childEnvironmentOverrides
);
ProcessResult
results
=
Process
.
runSync
(
cmd
[
0
],
cmd
.
getRange
(
1
,
cmd
.
length
).
toList
(),
workingDirectory:
workingDirectory
);
printTrace
(
'Exit code
${results.exitCode}
from:
${cmd.join(' ')}
'
);
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
239a717d
...
...
@@ -151,8 +151,7 @@ Future<bool> buildIOSXcodeProject(ApplicationPackage app, BuildMode mode,
printTrace
(
commands
.
join
(
' '
));
ProcessResult
result
=
Process
.
runSync
(
commands
.
first
,
commands
.
sublist
(
1
),
workingDirectory:
app
.
rootPath
,
environment:
childEnvironmentOverrides
commands
.
first
,
commands
.
sublist
(
1
),
workingDirectory:
app
.
rootPath
);
if
(
result
.
exitCode
!=
0
)
{
...
...
packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
View file @
239a717d
...
...
@@ -21,7 +21,6 @@ import '../version.dart';
const
String
kFlutterRootEnvironmentVariableName
=
'FLUTTER_ROOT'
;
// should point to //flutter/ (root of flutter/flutter repo)
const
String
kFlutterEngineEnvironmentVariableName
=
'FLUTTER_ENGINE'
;
// should point to //engine/src/ (root of flutter/engine repo)
const
String
kFlutterBuildConfigEnvironmentVariableName
=
'FLUTTER_BUILD_CONFIG'
;
// the directory in the out directory to use for local builds
const
String
kSnapshotFileName
=
'flutter_tools.snapshot'
;
// in //flutter/bin/cache/
const
String
kFlutterToolsScriptFileName
=
'flutter_tools.dart'
;
// in //flutter/packages/flutter_tools/bin/
const
String
kFlutterEnginePackageName
=
'sky_engine'
;
...
...
@@ -77,7 +76,6 @@ class FlutterCommandRunner extends CommandRunner {
hide:
!
verboseHelp
,
help:
'Name of a build output within the engine out directory, if you are building Flutter locally.
\n
'
'Defaults to
\$
$kFlutterBuildConfigEnvironmentVariableName
if set.
\n
'
'Use this to select a specific version of the engine if you have built multiple engine targets.
\n
'
'This path is relative to --local-engine-src-path/out.'
);
}
...
...
@@ -156,11 +154,6 @@ class FlutterCommandRunner extends CommandRunner {
if
(
enginePath
!=
null
)
{
ToolConfiguration
.
instance
.
engineSrcPath
=
enginePath
;
ToolConfiguration
.
instance
.
engineBuildPath
=
_findEngineBuildPath
(
globalResults
,
enginePath
);
// Forwards configuration information to recursive runs of the tool.
if
(
globalResults
[
'local-engine-src-path'
]
!=
null
)
childEnvironmentOverrides
[
kFlutterEngineEnvironmentVariableName
]
=
globalResults
[
'local-engine-src-path'
];
if
(
globalResults
[
'local-engine'
]
!=
null
)
childEnvironmentOverrides
[
kFlutterBuildConfigEnvironmentVariableName
]
=
globalResults
[
'local-engine'
];
}
// The Android SDK could already have been set by tests.
...
...
@@ -187,12 +180,10 @@ class FlutterCommandRunner extends CommandRunner {
return
null
;
}
String
_getLocalBuildConfig
(
ArgResults
globalResults
)
=>
globalResults
[
'local-engine'
]
??
Platform
.
environment
[
kFlutterBuildConfigEnvironmentVariableName
];
String
_findEnginePath
(
ArgResults
globalResults
)
{
String
engineSourcePath
=
globalResults
[
'local-engine-src-path'
]
??
Platform
.
environment
[
kFlutterEngineEnvironmentVariableName
];
if
(
engineSourcePath
==
null
&&
_getLocalBuildConfig
(
globalResults
)
!=
null
)
{
if
(
engineSourcePath
==
null
&&
globalResults
[
'local-engine'
]
!=
null
)
{
try
{
Uri
engineUri
=
PackageMap
.
instance
.
map
[
kFlutterEnginePackageName
];
engineSourcePath
=
path
.
dirname
(
path
.
dirname
(
path
.
dirname
(
path
.
dirname
(
engineUri
.
path
))));
...
...
@@ -224,13 +215,15 @@ class FlutterCommandRunner extends CommandRunner {
}
String
_findEngineBuildPath
(
ArgResults
globalResults
,
String
enginePath
)
{
String
buildConfig
=
_getLocalBuildConfig
(
globalResults
);
if
(
buildConfig
==
null
)
{
String
localEngine
;
if
(
globalResults
[
'local-engine'
]
!=
null
)
{
localEngine
=
globalResults
[
'local-engine'
];
}
else
{
printError
(
'You must specify --local-engine if you are using a locally built engine.'
);
throw
new
ProcessExit
(
2
);
}
String
engineBuildPath
=
path
.
normalize
(
path
.
join
(
enginePath
,
'out'
,
buildConfig
));
String
engineBuildPath
=
path
.
normalize
(
path
.
join
(
enginePath
,
'out'
,
localEngine
));
if
(!
FileSystemEntity
.
isDirectorySync
(
engineBuildPath
))
{
printError
(
'No Flutter engine build found at
$engineBuildPath
.'
);
throw
new
ProcessExit
(
2
);
...
...
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