From 7e99989746d70ed39e3036617025ec9becf120a4 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sun, 30 Aug 2020 09:03:18 +1000 Subject: [PATCH] Omit ".exe" from FFmpeg on Unix, and hack a note into the downloader --- src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs | 3 +++ src/BizHawk.Client.EmuHawk/Program.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs index 0509e3c496..06397e4d3a 100644 --- a/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs +++ b/src/BizHawk.Client.EmuHawk/AVOut/FFmpegDownloaderForm.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Linq; using System.Threading; using System.Windows.Forms; @@ -18,6 +19,8 @@ namespace BizHawk.Client.EmuHawk txtLocation.Text = FFmpegService.FFmpegPath; txtUrl.Text = FFmpegService.Url; + + if (OSTailoredCode.IsUnixHost) textBox1.Text = string.Join("\n", textBox1.Text.Split('\n').Take(3)) + $"\n\n(Linux user: Create a symlink with the below filename pointing to the ffmpeg binary with version {FFmpegService.Version}.)"; } int pct = 0; diff --git a/src/BizHawk.Client.EmuHawk/Program.cs b/src/BizHawk.Client.EmuHawk/Program.cs index 6c5ee3beb9..73fca1921d 100644 --- a/src/BizHawk.Client.EmuHawk/Program.cs +++ b/src/BizHawk.Client.EmuHawk/Program.cs @@ -130,7 +130,7 @@ namespace BizHawk.Client.EmuHawk } GlobalWin.Config.ResolveDefaults(); - FFmpegService.FFmpegPath = Path.Combine(PathUtils.DllDirectoryPath, "ffmpeg.exe"); + FFmpegService.FFmpegPath = Path.Combine(PathUtils.DllDirectoryPath, OSTC.IsUnixHost ? "ffmpeg" : "ffmpeg.exe"); StringLogUtil.DefaultToDisk = GlobalWin.Config.Movies.MoviesOnDisk;