@@ -21,6 +21,8 @@ enum Artifact {
21
21
skySnapshot,
22
22
snapshotDart,
23
23
flutterFramework,
24
+ vmSnapshotData,
25
+ isolateSnapshotData
24
26
}
25
27
26
28
String _artifactToFileName (Artifact artifact) {
@@ -49,6 +51,10 @@ String _artifactToFileName(Artifact artifact) {
49
51
return 'snapshot.dart' ;
50
52
case Artifact .flutterFramework:
51
53
return 'Flutter.framework' ;
54
+ case Artifact .vmSnapshotData:
55
+ return 'vm_isolate_snapshot.bin' ;
56
+ case Artifact .isolateSnapshotData:
57
+ return 'isolate_snapshot.bin' ;
52
58
}
53
59
assert (false , 'Invalid artifact $artifact .' );
54
60
return null ;
@@ -85,6 +91,7 @@ class CachedArtifacts extends Artifacts {
85
91
return _getIosArtifactPath (artifact, platform, mode);
86
92
case TargetPlatform .darwin_x64:
87
93
case TargetPlatform .linux_x64:
94
+ case TargetPlatform .windows_x64:
88
95
assert (mode == null , 'Platform $platform does not support different build modes.' );
89
96
return _getHostArtifactPath (artifact, platform);
90
97
}
@@ -139,6 +146,16 @@ class CachedArtifacts extends Artifacts {
139
146
switch (artifact) {
140
147
case Artifact .skyShell:
141
148
case Artifact .skySnapshot:
149
+ if (platform == TargetPlatform .windows_x64)
150
+ throw new UnimplementedError ('Artifact $artifact not available on platfrom $platform .' );
151
+ continue returnResourcePath;
152
+ case Artifact .genSnapshot:
153
+ case Artifact .vmSnapshotData:
154
+ case Artifact .isolateSnapshotData:
155
+ if (platform != TargetPlatform .windows_x64)
156
+ throw new UnimplementedError ('Artifact $artifact not available on platfrom $platform .' );
157
+ continue returnResourcePath;
158
+ returnResourcePath:
142
159
case Artifact .icudtlDat:
143
160
String engineArtifactsPath = cache.getArtifactDirectory ('engine' ).path;
144
161
String platformDirName = getNameForTargetPlatform (platform);
@@ -147,6 +164,8 @@ class CachedArtifacts extends Artifacts {
147
164
assert (false , 'Artifact $artifact not available for platform $platform .' );
148
165
return null ;
149
166
}
167
+ assert (false , 'Artifact $artifact not available for platform $platform .' );
168
+ return null ;
150
169
}
151
170
152
171
String _getEngineArtifactsPath (TargetPlatform platform, [BuildMode mode]) {
@@ -155,6 +174,7 @@ class CachedArtifacts extends Artifacts {
155
174
switch (platform) {
156
175
case TargetPlatform .linux_x64:
157
176
case TargetPlatform .darwin_x64:
177
+ case TargetPlatform .windows_x64:
158
178
assert (mode == null , 'Platform $platform does not support different build modes.' );
159
179
return fs.path.join (engineDir, platformName);
160
180
case TargetPlatform .ios:
@@ -174,6 +194,8 @@ class CachedArtifacts extends Artifacts {
174
194
return TargetPlatform .darwin_x64;
175
195
if (platform.isLinux)
176
196
return TargetPlatform .linux_x64;
197
+ if (platform.isWindows)
198
+ return TargetPlatform .windows_x64;
177
199
throw new UnimplementedError ('Host OS not supported.' );
178
200
}
179
201
}
@@ -193,15 +215,12 @@ class LocalEngineArtifacts extends Artifacts {
193
215
case Artifact .dartIoEntriesTxt:
194
216
return fs.path.join (_engineSrcPath, 'dart' , 'runtime' , 'bin' , _artifactToFileName (artifact));
195
217
case Artifact .dartVmEntryPointsTxt:
196
- return fs.path.join (_engineSrcPath, 'flutter' , 'runtime' , _artifactToFileName (artifact));
197
218
case Artifact .dartVmEntryPointsAndroidTxt:
198
219
return fs.path.join (_engineSrcPath, 'flutter' , 'runtime' , _artifactToFileName (artifact));
199
220
case Artifact .snapshotDart:
200
221
return fs.path.join (_engineSrcPath, 'flutter' , 'lib' , 'snapshot' , _artifactToFileName (artifact));
201
222
case Artifact .classesDexJar:
202
223
return fs.path.join (engineOutPath, 'gen' , 'flutter' , 'shell' , 'platform' , 'android' , 'android' , _artifactToFileName (artifact));
203
- case Artifact .icudtlDat:
204
- return fs.path.join (engineOutPath, _artifactToFileName (artifact));
205
224
case Artifact .libskyShellSo:
206
225
String abi = _getAbiDirectory (platform);
207
226
return fs.path.join (engineOutPath, 'gen' , 'flutter' , 'shell' , 'platform' , 'android' , 'android' , fs.path.join ('android' , 'libs' , abi, _artifactToFileName (artifact)));
@@ -211,6 +230,10 @@ class LocalEngineArtifacts extends Artifacts {
211
230
return _skyShellPath (platform);
212
231
case Artifact .skySnapshot:
213
232
return _skySnapshotPath ();
233
+ case Artifact .isolateSnapshotData:
234
+ case Artifact .vmSnapshotData:
235
+ return fs.path.join (engineOutPath, 'gen' , 'flutter' , 'lib' , 'snapshot' , _artifactToFileName (artifact));
236
+ case Artifact .icudtlDat:
214
237
case Artifact .flutterFramework:
215
238
return fs.path.join (engineOutPath, _artifactToFileName (artifact));
216
239
}
0 commit comments