@@ -92,8 +92,14 @@ enum HostArtifact {
92
92
idevicesyslog,
93
93
idevicescreenshot,
94
94
iproxy,
95
+
95
96
/// The root of the sky_engine package.
96
97
skyEnginePath,
98
+
99
+ // The Impeller shader compiler.
100
+ impellerc,
101
+ // Impeller's tessellation library.
102
+ libtessellator,
97
103
}
98
104
99
105
// TODO(knopp): Remove once darwin artifacts are universal and moved out of darwin-x64
@@ -202,8 +208,14 @@ String? _artifactToFileName(Artifact artifact, [ TargetPlatform? platform, Build
202
208
}
203
209
}
204
210
205
- String _hostArtifactToFileName (HostArtifact artifact, bool windows) {
206
- final String exe = windows ? '.exe' : '' ;
211
+ String _hostArtifactToFileName (HostArtifact artifact, Platform platform) {
212
+ final String exe = platform.isWindows ? '.exe' : '' ;
213
+ String dll = '.so' ;
214
+ if (platform.isWindows) {
215
+ dll = '.dll' ;
216
+ } else if (platform.isMacOS) {
217
+ dll = '.dylib' ;
218
+ }
207
219
switch (artifact) {
208
220
case HostArtifact .flutterWebSdk:
209
221
return '' ;
@@ -247,6 +259,10 @@ String _hostArtifactToFileName(HostArtifact artifact, bool windows) {
247
259
case HostArtifact .webPrecompiledCanvaskitSoundSdkSourcemaps:
248
260
case HostArtifact .webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps:
249
261
return 'dart_sdk.js.map' ;
262
+ case HostArtifact .impellerc:
263
+ return 'impellerc$exe ' ;
264
+ case HostArtifact .libtessellator:
265
+ return 'libtessellator$dll ' ;
250
266
}
251
267
}
252
268
@@ -337,63 +353,68 @@ class CachedArtifacts implements Artifacts {
337
353
final String path = _dartSdkPath (_cache);
338
354
return _fileSystem.directory (path);
339
355
case HostArtifact .engineDartBinary:
340
- final String path = _fileSystem.path.join (_dartSdkPath (_cache), 'bin' , _hostArtifactToFileName (artifact, _platform.isWindows ));
356
+ final String path = _fileSystem.path.join (_dartSdkPath (_cache), 'bin' , _hostArtifactToFileName (artifact, _platform));
341
357
return _fileSystem.file (path);
342
358
case HostArtifact .flutterWebSdk:
343
359
final String path = _getFlutterWebSdkPath ();
344
360
return _fileSystem.directory (path);
345
361
case HostArtifact .flutterWebLibrariesJson:
346
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), _hostArtifactToFileName (artifact, _platform.isWindows ));
362
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), _hostArtifactToFileName (artifact, _platform));
347
363
return _fileSystem.file (path);
348
364
case HostArtifact .webPlatformKernelDill:
349
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform.isWindows ));
365
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform));
350
366
return _fileSystem.file (path);
351
367
case HostArtifact .webPlatformSoundKernelDill:
352
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform.isWindows ));
368
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform));
353
369
return _fileSystem.file (path);
354
370
case HostArtifact .webPrecompiledSdk:
355
371
case HostArtifact .webPrecompiledSdkSourcemaps:
356
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd' , _hostArtifactToFileName (artifact, _platform.isWindows ));
372
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd' , _hostArtifactToFileName (artifact, _platform));
357
373
return _fileSystem.file (path);
358
374
case HostArtifact .webPrecompiledCanvaskitSdk:
359
375
case HostArtifact .webPrecompiledCanvaskitSdkSourcemaps:
360
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit' , _hostArtifactToFileName (artifact, _platform.isWindows ));
376
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit' , _hostArtifactToFileName (artifact, _platform));
361
377
return _fileSystem.file (path);
362
378
case HostArtifact .webPrecompiledCanvaskitAndHtmlSdk:
363
379
case HostArtifact .webPrecompiledCanvaskitAndHtmlSdkSourcemaps:
364
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html' , _hostArtifactToFileName (artifact, _platform.isWindows ));
380
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html' , _hostArtifactToFileName (artifact, _platform));
365
381
return _fileSystem.file (path);
366
382
case HostArtifact .webPrecompiledSoundSdk:
367
383
case HostArtifact .webPrecompiledSoundSdkSourcemaps:
368
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-sound' , _hostArtifactToFileName (artifact, _platform.isWindows ));
384
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-sound' , _hostArtifactToFileName (artifact, _platform));
369
385
return _fileSystem.file (path);
370
386
case HostArtifact .webPrecompiledCanvaskitSoundSdk:
371
387
case HostArtifact .webPrecompiledCanvaskitSoundSdkSourcemaps:
372
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-sound' , _hostArtifactToFileName (artifact, _platform.isWindows ));
388
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-sound' , _hostArtifactToFileName (artifact, _platform));
373
389
return _fileSystem.file (path);
374
390
case HostArtifact .webPrecompiledCanvaskitAndHtmlSoundSdk:
375
391
case HostArtifact .webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps:
376
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html-sound' , _hostArtifactToFileName (artifact, _platform.isWindows ));
392
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html-sound' , _hostArtifactToFileName (artifact, _platform));
377
393
return _fileSystem.file (path);
378
394
case HostArtifact .idevicesyslog:
379
395
case HostArtifact .idevicescreenshot:
380
- final String artifactFileName = _hostArtifactToFileName (artifact, _platform.isWindows );
396
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
381
397
return _cache.getArtifactDirectory ('libimobiledevice' ).childFile (artifactFileName);
382
398
case HostArtifact .skyEnginePath:
383
399
final Directory dartPackageDirectory = _cache.getCacheDir ('pkg' );
384
- final String path = _fileSystem.path.join (dartPackageDirectory.path, _hostArtifactToFileName (artifact, _platform.isWindows ));
400
+ final String path = _fileSystem.path.join (dartPackageDirectory.path, _hostArtifactToFileName (artifact, _platform));
385
401
return _fileSystem.directory (path);
386
402
case HostArtifact .dart2jsSnapshot:
387
403
case HostArtifact .dartdevcSnapshot:
388
404
case HostArtifact .kernelWorkerSnapshot:
389
- final String path = _fileSystem.path.join (_dartSdkPath (_cache), 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform.isWindows ));
405
+ final String path = _fileSystem.path.join (_dartSdkPath (_cache), 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform));
390
406
return _fileSystem.file (path);
391
407
case HostArtifact .iosDeploy:
392
- final String artifactFileName = _hostArtifactToFileName (artifact, _platform.isWindows );
408
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
393
409
return _cache.getArtifactDirectory ('ios-deploy' ).childFile (artifactFileName);
394
410
case HostArtifact .iproxy:
395
- final String artifactFileName = _hostArtifactToFileName (artifact, _platform.isWindows );
411
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
396
412
return _cache.getArtifactDirectory ('usbmuxd' ).childFile (artifactFileName);
413
+ case HostArtifact .impellerc:
414
+ case HostArtifact .libtessellator:
415
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
416
+ final String engineDir = _getEngineArtifactsPath (_currentHostPlatform (_platform, _operatingSystemUtils))! ;
417
+ return _fileSystem.file (_fileSystem.path.join (engineDir, artifactFileName));
397
418
}
398
419
}
399
420
@@ -757,67 +778,71 @@ class CachedLocalEngineArtifacts implements LocalEngineArtifacts {
757
778
final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' );
758
779
return _fileSystem.directory (path);
759
780
case HostArtifact .engineDartBinary:
760
- final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' , 'bin' , _hostArtifactToFileName (artifact, _platform.isWindows ));
781
+ final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' , 'bin' , _hostArtifactToFileName (artifact, _platform));
761
782
return _fileSystem.file (path);
762
783
case HostArtifact .dart2jsSnapshot:
763
- final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' , 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform.isWindows ));
784
+ final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' , 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform));
764
785
return _fileSystem.file (path);
765
786
case HostArtifact .dartdevcSnapshot:
766
- final String path = _fileSystem.path.join (_dartSdkPath (_cache), 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform.isWindows ));
787
+ final String path = _fileSystem.path.join (_dartSdkPath (_cache), 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform));
767
788
return _fileSystem.file (path);
768
789
case HostArtifact .kernelWorkerSnapshot:
769
- final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' , 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform.isWindows ));
790
+ final String path = _fileSystem.path.join (_hostEngineOutPath, 'dart-sdk' , 'bin' , 'snapshots' , _hostArtifactToFileName (artifact, _platform));
770
791
return _fileSystem.file (path);
771
792
case HostArtifact .flutterWebSdk:
772
793
final String path = _getFlutterWebSdkPath ();
773
794
return _fileSystem.directory (path);
774
795
case HostArtifact .flutterWebLibrariesJson:
775
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), _hostArtifactToFileName (artifact, _platform.isWindows ));
796
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), _hostArtifactToFileName (artifact, _platform));
776
797
return _fileSystem.file (path);
777
798
case HostArtifact .webPlatformKernelDill:
778
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform.isWindows ));
799
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform));
779
800
return _fileSystem.file (path);
780
801
case HostArtifact .webPlatformSoundKernelDill:
781
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform.isWindows ));
802
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , _hostArtifactToFileName (artifact, _platform));
782
803
return _fileSystem.file (path);
783
804
case HostArtifact .webPrecompiledSdk:
784
805
case HostArtifact .webPrecompiledSdkSourcemaps:
785
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd' , _hostArtifactToFileName (artifact, _platform.isWindows ));
806
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd' , _hostArtifactToFileName (artifact, _platform));
786
807
return _fileSystem.file (path);
787
808
case HostArtifact .webPrecompiledCanvaskitSdk:
788
809
case HostArtifact .webPrecompiledCanvaskitSdkSourcemaps:
789
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit' , _hostArtifactToFileName (artifact, _platform.isWindows ));
810
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit' , _hostArtifactToFileName (artifact, _platform));
790
811
return _fileSystem.file (path);
791
812
case HostArtifact .webPrecompiledCanvaskitAndHtmlSdk:
792
813
case HostArtifact .webPrecompiledCanvaskitAndHtmlSdkSourcemaps:
793
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html' , _hostArtifactToFileName (artifact, _platform.isWindows ));
814
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html' , _hostArtifactToFileName (artifact, _platform));
794
815
return _fileSystem.file (path);
795
816
case HostArtifact .webPrecompiledSoundSdk:
796
817
case HostArtifact .webPrecompiledSoundSdkSourcemaps:
797
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-sound' , _hostArtifactToFileName (artifact, _platform.isWindows ));
818
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-sound' , _hostArtifactToFileName (artifact, _platform));
798
819
return _fileSystem.file (path);
799
820
case HostArtifact .webPrecompiledCanvaskitSoundSdk:
800
821
case HostArtifact .webPrecompiledCanvaskitSoundSdkSourcemaps:
801
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-sound' , _hostArtifactToFileName (artifact, _platform.isWindows ));
822
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-sound' , _hostArtifactToFileName (artifact, _platform));
802
823
return _fileSystem.file (path);
803
824
case HostArtifact .webPrecompiledCanvaskitAndHtmlSoundSdk:
804
825
case HostArtifact .webPrecompiledCanvaskitAndHtmlSoundSdkSourcemaps:
805
- final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html-sound' , _hostArtifactToFileName (artifact, _platform.isWindows ));
826
+ final String path = _fileSystem.path.join (_getFlutterWebSdkPath (), 'kernel' , 'amd-canvaskit-html-sound' , _hostArtifactToFileName (artifact, _platform));
806
827
return _fileSystem.file (path);
807
828
case HostArtifact .idevicesyslog:
808
829
case HostArtifact .idevicescreenshot:
809
- final String artifactFileName = _hostArtifactToFileName (artifact, _platform.isWindows );
830
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
810
831
return _cache.getArtifactDirectory ('libimobiledevice' ).childFile (artifactFileName);
811
832
case HostArtifact .skyEnginePath:
812
833
final Directory dartPackageDirectory = _cache.getCacheDir ('pkg' );
813
- final String path = _fileSystem.path.join (dartPackageDirectory.path, _hostArtifactToFileName (artifact, _platform.isWindows ));
834
+ final String path = _fileSystem.path.join (dartPackageDirectory.path, _hostArtifactToFileName (artifact, _platform));
814
835
return _fileSystem.directory (path);
815
836
case HostArtifact .iosDeploy:
816
- final String artifactFileName = _hostArtifactToFileName (artifact, _platform.isWindows );
837
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
817
838
return _cache.getArtifactDirectory ('ios-deploy' ).childFile (artifactFileName);
818
839
case HostArtifact .iproxy:
819
- final String artifactFileName = _hostArtifactToFileName (artifact, _platform.isWindows );
840
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
820
841
return _cache.getArtifactDirectory ('usbmuxd' ).childFile (artifactFileName);
842
+ case HostArtifact .impellerc:
843
+ case HostArtifact .libtessellator:
844
+ final String artifactFileName = _hostArtifactToFileName (artifact, _platform);
845
+ return _fileSystem.file (_fileSystem.path.join (_hostEngineOutPath, artifactFileName));
821
846
}
822
847
}
823
848
0 commit comments