mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
chore: 添加移动 MAA.exe 的解决方案 (#10565)
* chore: 添加移动 MAA.exe 的解决方案 * i18n: tweak kR --------- Co-authored-by: HX3N <128385247+HX3N@users.noreply.github.com>
This commit is contained in:
@@ -174,6 +174,18 @@ namespace MaaWpfGui.Main
|
||||
ConfigurationHelper.Load();
|
||||
LocalizationHelper.Load();
|
||||
ETagCache.Load();
|
||||
|
||||
// 检查 MaaCore.dll 是否存在
|
||||
if (!File.Exists("MaaCore.dll"))
|
||||
{
|
||||
throw new FileNotFoundException("MaaCore.dll not found!");
|
||||
}
|
||||
|
||||
// 检查 resource 文件夹是否存在
|
||||
if (!Directory.Exists("resource"))
|
||||
{
|
||||
throw new DirectoryNotFoundException("resource folder not found!");
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsUserAdministrator()
|
||||
|
||||
@@ -648,6 +648,7 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla
|
||||
<system:String x:Key="ErrorProlog">MAA has encountered an error</system:String>
|
||||
<system:String x:Key="ErrorDetails">Details</system:String>
|
||||
<system:String x:Key="ErrorSolution">Solution</system:String>
|
||||
<system:String x:Key="ErrorSolutionMoveMaaExeOutOfFolder">Do not move the MAA.exe file alone. If you need to change the software location, please move the entire folder, or create a shortcut for MAA.exe in this folder and then drag the shortcut to another location.</system:String>
|
||||
<system:String x:Key="ErrorSolutionCrash">Please refer to the documentation: 「FAQ - Crashes」 to solve.</system:String>
|
||||
<system:String x:Key="ErrorSolutionUpdatePackageExtractionFailed">Failed to extract the update package. Please try to manually extract the update package in the root directory.</system:String>
|
||||
<system:String x:Key="ErrorSolutionReplaceAdb">Please retry after shutting down the emulator and killing ADB. Otherwise restart your computer, then run MAA as administrator without opening the emulator, finally retry it.</system:String>
|
||||
|
||||
@@ -650,6 +650,7 @@
|
||||
<system:String x:Key="ErrorProlog">MAA に問題が発生しました</system:String>
|
||||
<system:String x:Key="ErrorDetails">詳細情報</system:String>
|
||||
<system:String x:Key="ErrorSolution">解決策</system:String>
|
||||
<system:String x:Key="ErrorSolutionMoveMaaExeOutOfFolder">MAA.exe ファイルを単独で移動しないでください。ソフトウェアの場所を変更する必要がある場合は、フォルダー全体を移動するか、このフォルダーに MAA.exe のショートカットを作成してから、ショートカットを別の場所にドラッグしてください。</system:String>
|
||||
<system:String x:Key="ErrorSolutionCrash">ドキュメント「よくある問題 - クラッシュ」を参照してください。</system:String>
|
||||
<system:String x:Key="ErrorSolutionUpdatePackageExtractionFailed">アップデートパッケージの解凍に失敗しました。ルートディレクトリにあるアップデートパッケージを手動で解凍してみてください。</system:String>
|
||||
<system:String x:Key="ErrorSolutionReplaceAdb">エミュレータとADBを閉じるか、コンピューターを再起動してから、管理者権限でMAAを開いて操作してください。</system:String>
|
||||
|
||||
@@ -651,6 +651,7 @@ OF-1을 해금하지 않았다면 선택하지 말아 주세요.</system:String>
|
||||
<system:String x:Key="ErrorProlog">MAA에서 오류가 발생했습니다</system:String>
|
||||
<system:String x:Key="ErrorDetails">세부 정보</system:String>
|
||||
<system:String x:Key="ErrorSolution">해결 방법</system:String>
|
||||
<system:String x:Key="ErrorSolutionMoveMaaExeOutOfFolder">MAA.exe 파일을 단독으로 옮기지 마세요. 소프트웨어 위치를 변경해야 하는 경우 전체 폴더를 이동하거나, MAA.exe의 바로 가기를 만든 다음 바로 가기를 옮기세요.</system:String>
|
||||
<system:String x:Key="ErrorSolutionCrash">FAQ 문서의 크래시 관련 문단을 참고하세요.</system:String>
|
||||
<system:String x:Key="ErrorSolutionUpdatePackageExtractionFailed">업데이트 패키지 압축 해제에 실패했습니다. 루트 디렉토리에 있는 업데이트 패키지를 수동으로 압축 해제해 보십시오.</system:String>
|
||||
<system:String x:Key="ErrorSolutionReplaceAdb">에뮬레이터와 ADB를 종료하거나 컴퓨터를 재시작하고 관리자 권한으로 MAA를 실행해 주세요.</system:String>
|
||||
|
||||
@@ -650,6 +650,7 @@
|
||||
<system:String x:Key="ErrorProlog">MAA 遇到了问题</system:String>
|
||||
<system:String x:Key="ErrorDetails">详细信息</system:String>
|
||||
<system:String x:Key="ErrorSolution">解决方案</system:String>
|
||||
<system:String x:Key="ErrorSolutionMoveMaaExeOutOfFolder">请勿单独移动 MAA.exe 文件。若需更改软件位置,请移动整个文件夹,或在本文件夹中创建 MAA.exe 的快捷方式,然后将快捷方式拖到其他位置。</system:String>
|
||||
<system:String x:Key="ErrorSolutionCrash">请参考文档: 常见问题 - 闪退 进行操作。</system:String>
|
||||
<system:String x:Key="ErrorSolutionUpdatePackageExtractionFailed">解压更新包失败,请尝试手动解压根目录下更新包。</system:String>
|
||||
<system:String x:Key="ErrorSolutionReplaceAdb">请「关闭模拟器与 ADB」或「重启电脑后在未开启模拟器的情况下使用管理员权限打开 MAA」后进行操作。</system:String>
|
||||
|
||||
@@ -650,6 +650,7 @@
|
||||
<system:String x:Key="ErrorProlog">MAA 遇到了問題</system:String>
|
||||
<system:String x:Key="ErrorDetails">詳細資訊</system:String>
|
||||
<system:String x:Key="ErrorSolution">解決方法</system:String>
|
||||
<system:String x:Key="ErrorSolutionMoveMaaExeOutOfFolder">請勿單獨移動 MAA.exe 文件。若需更改軟件位置,請移動整個文件夾,或在本文件夾中創建 MAA.exe 的快捷方式,然後將快捷方式拖到其他位置。</system:String>
|
||||
<system:String x:Key="ErrorSolutionCrash">請參考文件: 常見問題 - 閃退 進行操作。</system:String>
|
||||
<system:String x:Key="ErrorSolutionUpdatePackageExtractionFailed">解壓更新包失敗,請嘗試手動解壓根目錄下更新包。</system:String>
|
||||
<system:String x:Key="ErrorSolutionReplaceAdb">請關閉模擬器與 ADB 或重開電腦後,使用系統管理員身分執行 MAA 進行操作。</system:String>
|
||||
|
||||
@@ -80,6 +80,12 @@ namespace MaaWpfGui.Views.UI
|
||||
private static string GetSolution(string error, string details)
|
||||
{
|
||||
_ = error; // To avoid warning
|
||||
if (details.Contains("MaaCore.dll not found!") ||
|
||||
details.Contains("resource folder not found!"))
|
||||
{
|
||||
return LocalizationHelper.GetString("ErrorSolutionMoveMaaExeOutOfFolder");
|
||||
}
|
||||
|
||||
if (details.Contains("AsstGetVersion()") ||
|
||||
details.Contains("DllNotFoundException") ||
|
||||
details.Contains("lambda_method") ||
|
||||
|
||||
Reference in New Issue
Block a user