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
9f28b4ff
Commit
9f28b4ff
authored
Jan 27, 2017
by
Michael Goderbauer
Committed by
GitHub
Jan 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows Fixes for Flutter Tools (#7678)
parent
aff4e828
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
flutter.ps1
bin/flutter.ps1
+5
-2
asset.dart
packages/flutter_tools/lib/src/asset.dart
+2
-2
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+5
-0
build_aot.dart
packages/flutter_tools/lib/src/commands/build_aot.dart
+6
-4
No files found.
bin/flutter.ps1
View file @
9f28b4ff
...
...
@@ -52,10 +52,13 @@ if (!(Test-Path $snapshotPath) `
Invoke-Expression
"
$flutterRoot
\bin\internal\update_dart_sdk.ps1"
Write-Host
"Building flutter tool..."
Set-Location
$flutterToolsDir
if
(
Test-Path
"
$flutterToolsDir
\pubspec.lock"
)
{
Remove-Item
"
$flutterToolsDir
\pubspec.lock"
}
Push-Location
Set-Location
$flutterToolsDir
Invoke-Expression
"
$pub
get --verbosity=error --no-packages-dir"
Set-Location
$flutterRoot
Pop-Location
Invoke-Expression
"
$dart
--snapshot=
`"
$snapshotPath
`"
`"
$scriptPath
`"
--packages=
`"
$flutterToolsDir
\.packages
`"
"
$revision
|
Out-File
$stampPath
}
...
...
packages/flutter_tools/lib/src/asset.dart
View file @
9f28b4ff
...
...
@@ -212,7 +212,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
for
(
Map
<
String
,
dynamic
>
font
in
family
[
'fonts'
])
{
String
assetKey
=
font
[
'asset'
];
result
.
add
(
new
_Asset
(
base:
'
${Cache.flutterRoot}
/bin/cache/artifacts/material_fonts'
,
base:
path
.
join
(
Cache
.
flutterRoot
,
'bin'
,
'cache'
,
'artifacts'
,
'material_fonts'
)
,
source
:
path
.
basename
(
assetKey
),
relativePath:
assetKey
));
...
...
@@ -438,7 +438,7 @@ dynamic _loadFlutterManifest(String manifestPath) {
Future
<
int
>
_validateFlutterManifest
(
Object
manifest
)
async
{
String
schemaPath
=
path
.
join
(
path
.
absolute
(
Cache
.
flutterRoot
),
'packages'
,
'flutter_tools'
,
'schema'
,
'pubspec_yaml.json'
);
Schema
schema
=
await
Schema
.
createSchemaFromUrl
(
'file://
$schemaPath
'
);
Schema
schema
=
await
Schema
.
createSchemaFromUrl
(
path
.
toUri
(
schemaPath
).
toString
()
);
Validator
validator
=
new
Validator
(
schema
);
if
(
validator
.
validate
(
manifest
))
{
...
...
packages/flutter_tools/lib/src/build_info.dart
View file @
9f28b4ff
...
...
@@ -45,6 +45,7 @@ bool isEmulatorBuildMode(BuildMode mode) => mode == BuildMode.debug;
enum
HostPlatform
{
darwin_x64
,
linux_x64
,
windows_x64
,
}
String
getNameForHostPlatform
(
HostPlatform
platform
)
{
...
...
@@ -53,6 +54,8 @@ String getNameForHostPlatform(HostPlatform platform) {
return
'darwin-x64'
;
case
HostPlatform
.
linux_x64
:
return
'linux-x64'
;
case
HostPlatform
.
windows_x64
:
return
'windows-x64'
;
}
assert
(
false
);
return
null
;
...
...
@@ -110,6 +113,8 @@ HostPlatform getCurrentHostPlatform() {
return
HostPlatform
.
darwin_x64
;
if
(
platform
.
isLinux
)
return
HostPlatform
.
linux_x64
;
if
(
platform
.
isWindows
)
return
HostPlatform
.
windows_x64
;
printError
(
'Unsupported host platform, defaulting to Linux'
);
...
...
packages/flutter_tools/lib/src/commands/build_aot.dart
View file @
9f28b4ff
...
...
@@ -9,6 +9,7 @@ import 'package:path/path.dart' as path;
import
'../base/common.dart'
;
import
'../base/file_system.dart'
;
import
'../base/logger.dart'
;
import
'../base/os.dart'
;
import
'../base/process.dart'
;
import
'../base/utils.dart'
;
import
'../build_info.dart'
;
...
...
@@ -118,16 +119,17 @@ Future<String> _buildAotSnapshot(
String
entryPointsDir
,
dartEntryPointsDir
,
snapshotterDir
,
genSnapshot
;
String
engineSrc
=
tools
.
engineSrcPath
;
String
genSnapshotExecutable
=
os
.
getExecutableName
(
'gen_snapshot'
);
if
(
engineSrc
!=
null
)
{
entryPointsDir
=
path
.
join
(
engineSrc
,
'flutter'
,
'runtime'
);
dartEntryPointsDir
=
path
.
join
(
engineSrc
,
'dart'
,
'runtime'
,
'bin'
);
snapshotterDir
=
path
.
join
(
engineSrc
,
'flutter'
,
'lib'
,
'snapshot'
);
String
engineOut
=
tools
.
getEngineArtifactsDirectory
(
platform
,
buildMode
).
path
;
if
(
platform
==
TargetPlatform
.
ios
)
{
genSnapshot
=
path
.
join
(
engineOut
,
'clang_x64'
,
'gen_snapshot'
);
genSnapshot
=
path
.
join
(
engineOut
,
'clang_x64'
,
genSnapshotExecutable
);
}
else
{
String
host32BitToolchain
=
getCurrentHostPlatform
()
==
HostPlatform
.
darwin_x64
?
'clang_i386'
:
'clang_x86'
;
genSnapshot
=
path
.
join
(
engineOut
,
host32BitToolchain
,
'gen_snapshot'
);
genSnapshot
=
path
.
join
(
engineOut
,
host32BitToolchain
,
genSnapshotExecutable
);
}
}
else
{
String
artifactsDir
=
tools
.
getEngineArtifactsDirectory
(
platform
,
buildMode
).
path
;
...
...
@@ -135,10 +137,10 @@ Future<String> _buildAotSnapshot(
dartEntryPointsDir
=
entryPointsDir
;
snapshotterDir
=
entryPointsDir
;
if
(
platform
==
TargetPlatform
.
ios
)
{
genSnapshot
=
path
.
join
(
artifactsDir
,
'gen_snapshot'
);
genSnapshot
=
path
.
join
(
artifactsDir
,
genSnapshotExecutable
);
}
else
{
String
hostToolsDir
=
path
.
join
(
artifactsDir
,
getNameForHostPlatform
(
getCurrentHostPlatform
()));
genSnapshot
=
path
.
join
(
hostToolsDir
,
'gen_snapshot'
);
genSnapshot
=
path
.
join
(
hostToolsDir
,
genSnapshotExecutable
);
}
}
...
...
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