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
587f6e27
Commit
587f6e27
authored
Oct 29, 2015
by
Alhaad Gokhale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify run_mojo command to take path to devtools.
Made changes as discussed. R=@jamesr
parent
0da7c7c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
run_mojo.dart
packages/flutter_tools/lib/src/commands/run_mojo.dart
+12
-6
No files found.
packages/flutter_tools/lib/src/commands/run_mojo.dart
View file @
587f6e27
...
...
@@ -27,7 +27,8 @@ class RunMojoCommand extends Command {
argParser
.
addFlag
(
'mojo-release'
,
negatable:
false
,
help:
'Use Release build of mojo (default)'
);
argParser
.
addOption
(
'app'
,
defaultsTo:
'app.flx'
);
argParser
.
addOption
(
'mojo-path'
,
help:
'Path to directory containing mojo_shell and services'
);
argParser
.
addOption
(
'mojo-path'
,
help:
'Path to directory containing mojo_shell and services. This is required for a Linux build.'
);
argParser
.
addOption
(
'devtools-path'
,
help:
'Path to the mojo_run script in mojo devtools. This is required for an Android build.'
);
}
// TODO(abarth): Why not use path.absolute?
...
...
@@ -39,9 +40,9 @@ class RunMojoCommand extends Command {
return
file
.
absolute
.
path
;
}
Future
<
int
>
_runAndroid
(
String
mojo
Path
,
_MojoConfig
mojoConfig
,
String
appPath
,
List
<
String
>
additionalArgs
)
{
Future
<
int
>
_runAndroid
(
String
devtools
Path
,
_MojoConfig
mojoConfig
,
String
appPath
,
List
<
String
>
additionalArgs
)
{
String
skyViewerUrl
=
ArtifactStore
.
googleStorageUrl
(
'viewer'
,
'android-arm'
);
String
command
=
_makePathAbsolute
(
path
.
join
(
mojoPath
,
'mojo'
,
'devtools'
,
'common'
,
'mojo_run'
)
);
String
command
=
_makePathAbsolute
(
devtoolsPath
);
String
appName
=
path
.
basename
(
appPath
);
String
appDir
=
path
.
dirname
(
appPath
);
String
buildFlag
=
mojoConfig
==
_MojoConfig
.
Debug
?
'--debug'
:
'--release'
;
...
...
@@ -79,8 +80,13 @@ class RunMojoCommand extends Command {
@override
Future
<
int
>
run
()
async
{
if
(
argResults
[
'mojo-path'
]
==
null
)
{
_logging
.
severe
(
'Must specify --mojo-path to mojo_run'
);
if
(
argResults
[
'mojo-path'
]
==
null
&&
!
argResults
[
'android'
])
{
_logging
.
severe
(
'Must specify --mojo-path for Linux.'
);
return
1
;
}
if
(
argResults
[
'devtools-path'
]
==
null
&&
argResults
[
'android'
])
{
_logging
.
severe
(
'Must specify --devtools-path for Android.'
);
return
1
;
}
if
(
argResults
[
'mojo-debug'
]
&&
argResults
[
'mojo-release'
])
{
...
...
@@ -97,7 +103,7 @@ class RunMojoCommand extends Command {
args
.
addAll
(
argResults
.
rest
);
if
(
argResults
[
'android'
])
{
return
_runAndroid
(
mojoPath
,
mojoConfig
,
appPath
,
args
);
return
_runAndroid
(
argResults
[
'devtools-path'
]
,
mojoConfig
,
appPath
,
args
);
}
else
{
return
_runLinux
(
mojoPath
,
mojoConfig
,
appPath
,
args
);
}
...
...
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