Honour `$BIZHAWK_DATA_HOME` when downloading FFmpeg
also stop looking for `/ffmpeg.exe` in DiscoHawk when it's always downloaded to `/dll/ffmpeg.exe`
This commit is contained in:
parent
b8d5dd8990
commit
7f87cc258f
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.PathExtensions;
|
||||
using BizHawk.Emulation.DiscSystem;
|
||||
|
||||
using OSTC = EXE_PROJECT.OSTailoredCode;
|
||||
|
@ -73,10 +74,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
OSTC.LinkedLibManager.FreeByPtr(lib);
|
||||
}
|
||||
|
||||
var ffmpegPath = Path.Combine(GetExeDirectoryAbsolute(), "ffmpeg.exe");
|
||||
if (!File.Exists(ffmpegPath))
|
||||
ffmpegPath = Path.Combine(Path.Combine(GetExeDirectoryAbsolute(), "dll"), "ffmpeg.exe");
|
||||
FFmpegService.FFmpegPath = ffmpegPath;
|
||||
FFmpegService.FFmpegPath = Path.Combine(PathUtils.DataDirectoryPath, "dll", OSTC.IsUnixHost ? "ffmpeg" : "ffmpeg.exe");
|
||||
|
||||
if (args.Length == 0)
|
||||
{
|
||||
|
|
|
@ -89,6 +89,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (exiting)
|
||||
return;
|
||||
|
||||
DirectoryInfo parentDir = new(Path.GetDirectoryName(FFmpegService.FFmpegPath)!);
|
||||
if (!parentDir.Exists) parentDir.Create();
|
||||
File.WriteAllBytes(FFmpegService.FFmpegPath, data);
|
||||
if (OSTailoredCode.IsUnixHost)
|
||||
{
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
initialConfig.ResolveDefaults();
|
||||
// initialConfig should really be globalConfig as it's mutable
|
||||
|
||||
FFmpegService.FFmpegPath = Path.Combine(PathUtils.DllDirectoryPath, OSTC.IsUnixHost ? "ffmpeg" : "ffmpeg.exe");
|
||||
FFmpegService.FFmpegPath = Path.Combine(PathUtils.DataDirectoryPath, "dll", OSTC.IsUnixHost ? "ffmpeg" : "ffmpeg.exe");
|
||||
|
||||
StringLogUtil.DefaultToDisk = initialConfig.Movies.MoviesOnDisk;
|
||||
|
||||
|
|
Loading…
Reference in New Issue