gen_snapshot: fix Platform.operatingSystem issue (#213)
This change fixes an issue that `Platform.operatingSystem` returns Android on x64 hosts and when cross-building for arm64 targets on x64 hosts. To fix the issue, use the gen_snapshot of linux and elinux instead of Android's one. Fixed https://github.com/sony/flutter-elinux/issues/212 Signed-off-by: Hidenori Matsubayashi <[email protected]>
This commit is contained in:
@@ -88,12 +88,11 @@ class BuildPackageCommand extends BuildSubCommand
|
||||
@override
|
||||
Future<Set<DevelopmentArtifact>> get requiredArtifacts async =>
|
||||
<DevelopmentArtifact>{
|
||||
// Use gensnapshot for Arm64 Linux when the host is arm64 because
|
||||
// the artifacts for arm64 host don't support self-building now.
|
||||
// Use gen_snapshot of the arm64 linux-desktop when self-building
|
||||
// on arm64 hosts. This is because elinux's artifacts for arm64
|
||||
// doesn't support self-build as of now.
|
||||
if (_getCurrentHostPlatformArchName() == 'arm64')
|
||||
DevelopmentArtifact.linux,
|
||||
if (_getCurrentHostPlatformArchName() == 'x64')
|
||||
DevelopmentArtifact.androidGenSnapshot,
|
||||
ELinuxDevelopmentArtifact.elinux,
|
||||
};
|
||||
|
||||
|
||||
@@ -18,12 +18,11 @@ class ELinuxRunCommand extends RunCommand
|
||||
@override
|
||||
Future<Set<DevelopmentArtifact>> get requiredArtifacts async =>
|
||||
<DevelopmentArtifact>{
|
||||
// Use gensnapshot for Arm64 Linux when the host is arm64 because
|
||||
// the artifacts for arm64 host don't support self-building now.
|
||||
// Use gen_snapshot of the arm64 linux-desktop when self-building
|
||||
// on arm64 hosts. This is because elinux's artifacts for arm64
|
||||
// doesn't support self-build as of now.
|
||||
if (_getCurrentHostPlatformArchName() == 'arm64')
|
||||
DevelopmentArtifact.linux,
|
||||
if (_getCurrentHostPlatformArchName() == 'x64')
|
||||
DevelopmentArtifact.androidGenSnapshot,
|
||||
ELinuxDevelopmentArtifact.elinux,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user