SHA256
Set Specific Version of FFmpeg to Download
This commit is contained in:
2 files changed
+29
-8
No files matched your search
+24
-8
@@ -25,8 +25,8 @@ namespace ADOFAIRenderer.UI
|
|||||||
private bool _isDownloading;
|
private bool _isDownloading;
|
||||||
private string DownloadUrl => Application.platform switch
|
private string DownloadUrl => Application.platform switch
|
||||||
{
|
{
|
||||||
RuntimePlatform.WindowsPlayer => "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip",
|
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/latest/ffmpeg-master-latest-linux64-gpl-shared.tar.xz"
|
_ => "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;
|
private System.Threading.CancellationTokenSource? _cts;
|
||||||
@@ -37,15 +37,31 @@ namespace ADOFAIRenderer.UI
|
|||||||
var userLibs = MelonEnvironment.UserLibsDirectory;
|
var userLibs = MelonEnvironment.UserLibsDirectory;
|
||||||
if (!Directory.Exists(userLibs)) return false;
|
if (!Directory.Exists(userLibs)) return false;
|
||||||
|
|
||||||
var searchPattern = Application.platform switch
|
string[] searchPatterns = Application.platform switch
|
||||||
{
|
{
|
||||||
RuntimePlatform.WindowsPlayer => "avcodec-*.dll",
|
RuntimePlatform.WindowsPlayer => new[]
|
||||||
RuntimePlatform.OSXPlayer => "libavcodec.*.dylib",
|
{
|
||||||
_ => "libavcodec.so*"
|
"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);
|
foreach (var pattern in searchPatterns)
|
||||||
return files.Length > 0;
|
{
|
||||||
|
if (Directory.GetFiles(userLibs, pattern).Length == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowDownloadUI()
|
public static void ShowDownloadUI()
|
||||||
|
|||||||
@@ -789,6 +789,11 @@ namespace ADOFAIRenderer.Util.FFmpeg
|
|||||||
_isInitialized = true;
|
_isInitialized = true;
|
||||||
_loggedConversionMode = false;
|
_loggedConversionMode = false;
|
||||||
}
|
}
|
||||||
|
catch (NotSupportedException ex)
|
||||||
|
{
|
||||||
|
Dispose();
|
||||||
|
throw new Exception("FFmpeg 네이티브 라이브러리(DLL)를 로드할 수 없습니다. UserLibs 폴더의 FFmpeg DLL 파일(avcodec, avformat 등)이 누락되었거나 손상되었는지 확인하고, UserLibs 폴더의 FFmpeg DLL 파일들을 삭제한 후 게임을 재시작하세요.", ex);
|
||||||
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
// 초기화 도중 실패 시 부분 할당된 리소스를 모두 정리합니다.
|
// 초기화 도중 실패 시 부분 할당된 리소스를 모두 정리합니다.
|
||||||
|
|||||||
Reference in new issue
Block a user