File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ public sealed class BuildLinuxTask : FrostingTask<BuildContext>
1010 public override void Run ( BuildContext context )
1111 {
1212 // Absolute path to the artifact directory is needed for flags since they don't allow relative path
13+ var arch = RuntimeInformation . OSArchitecture ;
1314 var artifactDir = context . MakeAbsolute ( new DirectoryPath ( context . ArtifactsDir ) ) ;
14- var dependencyDir = context . MakeAbsolute ( new DirectoryPath ( $ "{ context . ArtifactsDir } /../dependencies-linux-x64") ) ;
15+ var dependencyDir = context . MakeAbsolute ( new DirectoryPath ( $ "{ context . ArtifactsDir } /../dependencies-linux-{ ( arch == Architecture . Arm64 ? "arm64" : " x64" ) } ") ) ;
1516 var prefixFlag = $ "--prefix=\" { dependencyDir } \" ";
16- var hostFlag = "--host=\" x86_64-linux-gnu\" " ;
17+ var hostFlag = arch == Architecture . Arm64 ? "--host= \" aarch64-linux-gnu \" " : "--host=\" x86_64-linux-gnu\" " ;
1718 var binDirFlag = $ "--bindir=\" { artifactDir } \" ";
1819
1920 var envVariables = new Dictionary < string , string >
@@ -85,7 +86,8 @@ private static string GetFFMpegConfigureFlags(BuildContext context)
8586 {
8687 var ignoreCommentsAndNewLines = ( string line ) => ! string . IsNullOrWhiteSpace ( line ) && ! line . StartsWith ( '#' ) ;
8788 var configureFlags = context . FileReadLines ( "ffprobe.config" ) . Where ( ignoreCommentsAndNewLines ) ;
88- var osConfigureFlags = context . FileReadLines ( $ "ffprobe.linux-x64.config") . Where ( ignoreCommentsAndNewLines ) ;
89+ var osConfigFile = RuntimeInformation . OSArchitecture == Architecture . Arm64 ? "ffprobe.linux-arm64.config" : "ffprobe.linux-x64.config" ;
90+ var osConfigureFlags = context . FileReadLines ( osConfigFile ) . Where ( ignoreCommentsAndNewLines ) ;
8991 return string . Join ( ' ' , configureFlags ) + " " + string . Join ( ' ' , osConfigureFlags ) ;
9092 }
9193}
You can’t perform that action at this time.
0 commit comments