Add support for LOCAL_ENGINE_HOST to Linux/Mac/Win builds. (#132579)
Partial work towards https://github.com/flutter/flutter/issues/132245. I also couldn't help myself to do a very minor refactor and add some comments to `LocalEngineInfo` because I was getting confused myself implementing it.
This commit is contained in:
@@ -56,9 +56,11 @@ Future<void> buildLinux(
|
||||
environmentConfig['FLUTTER_TARGET'] = target;
|
||||
final LocalEngineInfo? localEngineInfo = globals.artifacts?.localEngineInfo;
|
||||
if (localEngineInfo != null) {
|
||||
final String engineOutPath = localEngineInfo.engineOutPath;
|
||||
environmentConfig['FLUTTER_ENGINE'] = globals.fs.path.dirname(globals.fs.path.dirname(engineOutPath));
|
||||
environmentConfig['LOCAL_ENGINE'] = localEngineInfo.localEngineName;
|
||||
final String targetOutPath = localEngineInfo.targetOutPath;
|
||||
// $ENGINE/src/out/foo_bar_baz -> $ENGINE/src
|
||||
environmentConfig['FLUTTER_ENGINE'] = globals.fs.path.dirname(globals.fs.path.dirname(targetOutPath));
|
||||
environmentConfig['LOCAL_ENGINE'] = localEngineInfo.localTargetName;
|
||||
environmentConfig['LOCAL_ENGINE_HOST'] = localEngineInfo.localHostName;
|
||||
}
|
||||
writeGeneratedCmakeConfig(Cache.flutterRoot!, linuxProject, buildInfo, environmentConfig, logger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user