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
afe4830a
Unverified
Commit
afe4830a
authored
Nov 14, 2019
by
Zachary Anderson
Committed by
GitHub
Nov 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Various fixes for 'run' for Fuchisa. (#44920)
parent
55530d90
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
8 deletions
+63
-8
flutter_gallery.cmx
examples/flutter_gallery/fuchsia/meta/flutter_gallery.cmx
+18
-0
hello_world.cmx
examples/hello_world/fuchsia/meta/hello_world.cmx
+18
-0
amber_ctl.dart
packages/flutter_tools/lib/src/fuchsia/amber_ctl.dart
+1
-1
fuchsia_device.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+23
-6
fuchsia_kernel_compiler.dart
...lutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart
+3
-1
No files found.
examples/flutter_gallery/fuchsia/meta/flutter_gallery.cmx
0 → 100644
View file @
afe4830a
{
"program": {
"data": "data/flutter_gallery"
},
"sandbox": {
"services": [
"fuchsia.cobalt.LoggerFactory",
"fuchsia.fonts.Provider",
"fuchsia.logger.LogSink",
"fuchsia.modular.Clipboard",
"fuchsia.sys.Environment",
"fuchsia.sys.Launcher",
"fuchsia.ui.input.ImeService",
"fuchsia.ui.policy.Presenter",
"fuchsia.ui.scenic.Scenic"
]
}
}
examples/hello_world/fuchsia/meta/hello_world.cmx
0 → 100644
View file @
afe4830a
{
"program": {
"data": "data/hello_world"
},
"sandbox": {
"services": [
"fuchsia.cobalt.LoggerFactory",
"fuchsia.fonts.Provider",
"fuchsia.logger.LogSink",
"fuchsia.modular.Clipboard",
"fuchsia.sys.Environment",
"fuchsia.sys.Launcher",
"fuchsia.ui.input.ImeService",
"fuchsia.ui.policy.Presenter",
"fuchsia.ui.scenic.Scenic"
]
}
}
packages/flutter_tools/lib/src/fuchsia/amber_ctl.dart
View file @
afe4830a
...
...
@@ -102,7 +102,7 @@ class FuchsiaAmberCtl {
/// the Fuchsia package server that it was accessing via [serverUrl].
Future
<
bool
>
pkgCtlRepoRemove
(
FuchsiaDevice
device
,
FuchsiaPackageServer
server
)
async
{
final
String
repoUrl
=
'fuchsia-pkg://
${server.name}
'
;
final
RunResult
result
=
await
device
.
shell
(
'pkgctl repo r
emove --repo-url
$repoUrl
'
);
final
RunResult
result
=
await
device
.
shell
(
'pkgctl repo r
m
$repoUrl
'
);
return
result
.
exitCode
==
0
;
}
}
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
View file @
afe4830a
...
...
@@ -246,14 +246,25 @@ class FuchsiaDevice extends Device {
printError
(
'Failed to find a free port'
);
return
LaunchResult
.
failed
();
}
// Try Start with a fresh package repo in case one was left over from a
// previous run.
final
Directory
packageRepo
=
fs
.
directory
(
fs
.
path
.
join
(
getFuchsiaBuildDirectory
(),
'.pkg-repo'
));
packageRepo
.
createSync
(
recursive:
true
);
try
{
if
(
packageRepo
.
existsSync
())
{
packageRepo
.
deleteSync
(
recursive:
true
);
}
packageRepo
.
createSync
(
recursive:
true
);
}
catch
(
e
)
{
printError
(
'Failed to create Fuchisa package repo directory '
'at
${packageRepo.path}
:
$e
'
);
return
LaunchResult
.
failed
();
}
final
String
appName
=
FlutterProject
.
current
().
manifest
.
appName
;
final
Status
status
=
logger
.
startProgress
(
'Starting Fuchsia application...'
,
'Starting Fuchsia application
$appName
...'
,
timeout:
null
,
);
FuchsiaPackageServer
fuchsiaPackageServer
;
...
...
@@ -332,8 +343,7 @@ class FuchsiaDevice extends Device {
}
// Instruct tiles_ctl to start the app.
final
String
fuchsiaUrl
=
'fuchsia-pkg://
$packageServerName
/
$appName
#meta/
$appName
.cmx'
;
final
String
fuchsiaUrl
=
'fuchsia-pkg://
$packageServerName
/
$appName
#meta/
$appName
.cmx'
;
if
(!
await
fuchsiaDeviceTools
.
tilesCtl
.
add
(
this
,
fuchsiaUrl
,
<
String
>[]))
{
printError
(
'Failed to add the app to tiles'
);
return
LaunchResult
.
failed
();
...
...
@@ -345,8 +355,15 @@ class FuchsiaDevice extends Device {
await
fuchsiaDeviceTools
.
amberCtl
.
pkgCtlRepoRemove
(
this
,
fuchsiaPackageServer
);
}
// Shutdown the package server and delete the package repo;
printTrace
(
'Shutting down the tool
\'
s package server.'
);
fuchsiaPackageServer
?.
stop
();
packageRepo
.
deleteSync
(
recursive:
true
);
printTrace
(
'Removing the tool
\'
s package repo: at
${packageRepo.path}
'
);
try
{
packageRepo
.
deleteSync
(
recursive:
true
);
}
catch
(
e
)
{
printError
(
'Failed to remove Fuchsia package repo directory '
'at
${packageRepo.path}
:
$e
.'
);
}
status
.
cancel
();
}
...
...
packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart
View file @
afe4830a
...
...
@@ -58,7 +58,9 @@ class FuchsiaKernelCompiler {
'--filesystem-root'
,
fsRoot
,
'--packages'
,
'
$multiRootScheme
:///
$relativePackagesFile
'
,
'--output'
,
fs
.
path
.
join
(
outDir
,
'
$appName
.dil'
),
'--no-link-platform'
,
// TODO(zra): Add back when this is supported again.
// See: https://github.com/flutter/flutter/issues/44925
// '--no-link-platform',
'--split-output-by-packages'
,
'--manifest'
,
manifestPath
,
'--component-name'
,
appName
,
...
...
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