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
be0b3e61
Commit
be0b3e61
authored
Sep 25, 2015
by
James Robinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #52 from nlacasse/release-debug
run_mojo: Add --mojo-release and --mojo-debug flags.
parents
c35c06e6
f600beeb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
run_mojo.dart
packages/flutter_tools/lib/src/run_mojo.dart
+11
-2
No files found.
packages/flutter_tools/lib/src/run_mojo.dart
View file @
be0b3e61
...
...
@@ -22,6 +22,9 @@ class RunMojoCommand extends Command {
final
description
=
'Run a Flutter app in mojo.'
;
RunMojoCommand
()
{
argParser
.
addFlag
(
'android'
,
negatable:
false
,
help:
'Run on an Android device'
);
argParser
.
addFlag
(
'mojo-debug'
,
negatable:
false
,
help:
'Use Debug build of mojo'
);
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
(
'package-root'
,
defaultsTo:
'packages'
);
...
...
@@ -40,9 +43,10 @@ class RunMojoCommand extends Command {
String
command
=
await
_makePathAbsolute
(
path
.
join
(
results
[
'mojo-path'
],
'mojo'
,
'devtools'
,
'common'
,
'mojo_run'
));
String
appName
=
path
.
basename
(
appPath
);
String
appDir
=
path
.
dirname
(
appPath
);
String
buildFlag
=
argResults
[
'mojo-debug'
]
?
'--debug'
:
'--release'
;
List
<
String
>
args
=
[
'--android'
,
'--release'
,
buildFlag
,
'http://app/
$appName
'
,
'--map-origin=http://app/=
$appDir
'
,
'--map-origin=http://sky_viewer/=
$skyViewerUrl
'
,
...
...
@@ -60,7 +64,8 @@ class RunMojoCommand extends Command {
Future
<
int
>
_runLinux
(
ArgResults
results
,
String
appPath
,
ArtifactStore
artifacts
)
async
{
String
viewerPath
=
await
_makePathAbsolute
(
await
artifacts
.
getPath
(
Artifact
.
SkyViewerMojo
));
String
mojoShellPath
=
await
_makePathAbsolute
(
path
.
join
(
results
[
'mojo-path'
],
'out'
,
'Release'
,
'mojo_shell'
));
String
mojoBuildType
=
argResults
[
'mojo-debug'
]
?
'Debug'
:
'Release'
;
String
mojoShellPath
=
await
_makePathAbsolute
(
path
.
join
(
results
[
'mojo-path'
],
'out'
,
mojoBuildType
,
'mojo_shell'
));
List
<
String
>
args
=
[
'file://
${appPath}
'
,
'--url-mappings=mojo:sky_viewer=file://
${viewerPath}
'
...
...
@@ -75,6 +80,10 @@ class RunMojoCommand extends Command {
_logging
.
severe
(
'Must specify --mojo-path to mojo_run'
);
return
1
;
}
if
(
argResults
[
'mojo-debug'
]
&&
argResults
[
'mojo-release'
])
{
_logging
.
severe
(
'Cannot specify both --mojo-debug and --mojo-release'
);
return
1
;
}
String
packageRoot
=
argResults
[
'package-root'
];
ArtifactStore
artifacts
=
new
ArtifactStore
(
packageRoot
);
String
appPath
=
await
_makePathAbsolute
(
argResults
[
'app'
]);
...
...
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