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
7be58b1a
Commit
7be58b1a
authored
Nov 17, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #442 from abarth/run_flutter_mojo
Switch flutter run_mojo over to flutter.mojo
parents
2734627a
b8e16d7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
30 deletions
+30
-30
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+9
-9
run_mojo.dart
packages/flutter_tools/lib/src/commands/run_mojo.dart
+19
-19
bundle.dart
packages/flx/lib/bundle.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/artifacts.dart
View file @
7be58b1a
...
...
@@ -56,7 +56,7 @@ String _getCloudStorageBaseUrl({String category, String platform, String revisio
enum
ArtifactType
{
snapshot
,
shell
,
viewer
,
mojo
,
}
class
Artifact
{
...
...
@@ -121,17 +121,17 @@ class ArtifactStore {
hostPlatform:
HostPlatform
.
mac
),
const
Artifact
.
_
(
name:
'
Sky Viewer
'
,
fileName:
'
sky_view
er.mojo'
,
category:
_k
Viewer
Category
,
type:
ArtifactType
.
viewer
,
name:
'
Flutter for Mojo
'
,
fileName:
'
flutt
er.mojo'
,
category:
_k
Shell
Category
,
type:
ArtifactType
.
mojo
,
targetPlatform:
TargetPlatform
.
android
),
const
Artifact
.
_
(
name:
'
Sky Viewer
'
,
fileName:
'
sky_view
er.mojo'
,
category:
_k
Viewer
Category
,
type:
ArtifactType
.
viewer
,
name:
'
Flutter for Mojo
'
,
fileName:
'
flutt
er.mojo'
,
category:
_k
Shell
Category
,
type:
ArtifactType
.
mojo
,
targetPlatform:
TargetPlatform
.
linux
),
];
...
...
packages/flutter_tools/lib/src/commands/run_mojo.dart
View file @
7be58b1a
...
...
@@ -73,39 +73,39 @@ class RunMojoCommand extends FlutterCommand {
}
Future
<
List
<
String
>>
_getShellConfig
()
async
{
List
<
String
>
args
=
[];
List
<
String
>
args
=
<
String
>
[];
final
useDevtools
=
_useDevtools
();
final
command
=
useDevtools
?
_getDevtoolsPath
()
:
_getMojoShellPath
();
final
bool
useDevtools
=
_useDevtools
();
final
String
command
=
useDevtools
?
_getDevtoolsPath
()
:
_getMojoShellPath
();
args
.
add
(
command
);
if
(
argResults
[
'android'
])
{
args
.
add
(
'--android'
);
final
skyViewerUrl
=
ArtifactStore
.
getCloudStorageBaseUrl
(
'viewer
'
,
'android-arm'
);
final
appPath
=
_makePathAbsolute
(
argResults
[
'app'
]);
final
appName
=
path
.
basename
(
appPath
);
final
appDir
=
path
.
dirname
(
appPath
);
final
String
cloudStorageBaseUrl
=
ArtifactStore
.
getCloudStorageBaseUrl
(
'shell
'
,
'android-arm'
);
final
String
appPath
=
_makePathAbsolute
(
argResults
[
'app'
]);
final
String
appName
=
path
.
basename
(
appPath
);
final
String
appDir
=
path
.
dirname
(
appPath
);
args
.
add
(
'http://app/
$appName
'
);
args
.
add
(
'--map-origin=http://app/=
$appDir
'
);
args
.
add
(
'--map-origin=http://
sky_viewer/=
$skyViewer
Url
'
);
args
.
add
(
'--url-mappings=mojo:
sky_viewer=http://sky_viewer/sky_view
er.mojo'
);
args
.
add
(
'--map-origin=http://
flutter/=
$cloudStorageBase
Url
'
);
args
.
add
(
'--url-mappings=mojo:
flutter=http://flutter/flutt
er.mojo'
);
}
else
{
final
appPath
=
_makePathAbsolute
(
argResults
[
'app'
]);
String
view
erPath
;
final
String
appPath
=
_makePathAbsolute
(
argResults
[
'app'
]);
String
flutt
erPath
;
BuildConfiguration
config
=
_getCurrentHostConfig
();
if
(
config
.
type
==
BuildType
.
prebuilt
)
{
Artifact
artifact
=
ArtifactStore
.
getArtifact
(
type:
ArtifactType
.
viewer
,
targetPlatform:
TargetPlatform
.
linux
);
view
erPath
=
_makePathAbsolute
(
await
ArtifactStore
.
getPath
(
artifact
));
if
(
config
==
null
||
config
.
type
==
BuildType
.
prebuilt
)
{
Artifact
artifact
=
ArtifactStore
.
getArtifact
(
type:
ArtifactType
.
mojo
,
targetPlatform:
TargetPlatform
.
linux
);
flutt
erPath
=
_makePathAbsolute
(
await
ArtifactStore
.
getPath
(
artifact
));
}
else
{
String
localPath
=
path
.
join
(
config
.
buildDir
,
'
sky_view
er.mojo'
);
view
erPath
=
_makePathAbsolute
(
localPath
);
String
localPath
=
path
.
join
(
config
.
buildDir
,
'
flutt
er.mojo'
);
flutt
erPath
=
_makePathAbsolute
(
localPath
);
}
args
.
add
(
'file://
$appPath
'
);
args
.
add
(
'--url-mappings=mojo:
sky_viewer=file://
$view
erPath
'
);
args
.
add
(
'--url-mappings=mojo:
flutter=file://
$flutt
erPath
'
);
}
if
(
useDevtools
)
{
final
buildFlag
=
argResults
[
'mojo-debug'
]
?
'--debug'
:
'--release'
;
final
String
buildFlag
=
argResults
[
'mojo-debug'
]
?
'--debug'
:
'--release'
;
args
.
add
(
buildFlag
);
if
(
_logging
.
level
<=
Level
.
INFO
)
{
args
.
add
(
'--verbose'
);
...
...
@@ -116,7 +116,7 @@ class RunMojoCommand extends FlutterCommand {
}
if
(
argResults
[
'checked'
])
{
args
.
add
(
'--args-for=mojo:
sky_view
er --enable-checked-mode'
);
args
.
add
(
'--args-for=mojo:
flutt
er --enable-checked-mode'
);
}
args
.
addAll
(
argResults
.
rest
);
...
...
packages/flx/lib/bundle.dart
View file @
7be58b1a
...
...
@@ -12,7 +12,7 @@ import 'package:bignum/bignum.dart';
import
'signing.dart'
;
// Magic string we put at the top of all bundle files.
const
String
kBundleMagic
=
'#!mojo mojo:
sky_view
er
\n
'
;
const
String
kBundleMagic
=
'#!mojo mojo:
flutt
er
\n
'
;
// Prefix of the above, used when reading bundle files. This allows us to be
// more flexbile about what we accept.
...
...
@@ -135,7 +135,7 @@ class Bundle {
void
writeSync
()
{
assert
(
_contentBytes
!=
null
);
RandomAccessFile
outputFile
=
new
File
(
path
).
openSync
(
mode:
FileMode
.
WRITE
);
outputFile
.
writeStringSync
(
'#!mojo mojo:sky_viewer
\n
'
);
outputFile
.
writeStringSync
(
kBundleMagic
);
_writeBytesWithLengthSync
(
outputFile
,
signatureBytes
);
_writeBytesWithLengthSync
(
outputFile
,
manifestBytes
);
outputFile
.
writeFromSync
(
_contentBytes
);
...
...
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