Set Specific Version of FFmpeg to Download

This commit is contained in:
copecone committed 2026-07-23 00:41:05 +09:00
1 parent 1999f0bfb3
commit 0e720b5d47
2 files changed
+30 -9

No files matched your search

+25 -9
View File
@@ -25,8 +25,8 @@ namespace ADOFAIRenderer.UI
private bool _isDownloading;
private string DownloadUrl => Application.platform switch
{
RuntimePlatform.WindowsPlayer => "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip",
_ => "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl-shared.tar.xz"
RuntimePlatform.WindowsPlayer => "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-05-31-13-22/ffmpeg-N-124714-g49a77d37be-win64-gpl-shared.zip",
_ => "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-05-31-13-22/ffmpeg-N-124714-g49a77d37be-linux64-gpl-shared.tar.xz"
};
private System.Threading.CancellationTokenSource? _cts;
@@ -37,15 +37,31 @@ namespace ADOFAIRenderer.UI
var userLibs = MelonEnvironment.UserLibsDirectory;
if (!Directory.Exists(userLibs)) return false;
var searchPattern = Application.platform switch
string[] searchPatterns = Application.platform switch
{
RuntimePlatform.WindowsPlayer => "avcodec-*.dll",
RuntimePlatform.OSXPlayer => "libavcodec.*.dylib",
_ => "libavcodec.so*"
RuntimePlatform.WindowsPlayer => new[]
{
"avcodec-*.dll", "avformat-*.dll", "avutil-*.dll", "swscale-*.dll", "swresample-*.dll"
},
RuntimePlatform.OSXPlayer => new[]
{
"libavcodec.*.dylib", "libavformat.*.dylib", "libavutil.*.dylib", "libswscale.*.dylib", "libswresample.*.dylib"
},
_ => new[]
{
"libavcodec.so*", "libavformat.so*", "libavutil.so*", "libswscale.so*", "libswresample.so*"
}
};
var files = Directory.GetFiles(userLibs, searchPattern);
return files.Length > 0;
foreach (var pattern in searchPatterns)
{
if (Directory.GetFiles(userLibs, pattern).Length == 0)
{
return false;
}
}
return true;
}
public static void ShowDownloadUI()