chore: net8后不进行MAA_win7.exe备份

This commit is contained in:
uye
2024-01-02 13:20:43 +08:00
parent 32bda3152a
commit a7e8970741

View File

@@ -222,7 +222,11 @@ namespace MaaWpfGui.ViewModels.UI
return false;
}
File.Copy(Path.Combine(curDir, "MAA.exe"), Path.Combine(curDir, "MAA_win7.exe"), true);
// 如果是 Framework48把 MAA.exe 复制一份,重命名为 MAA_win7.exe
if (RuntimeInformation.FrameworkDescription.Contains("Framework"))
{
File.Copy(Path.Combine(curDir, "MAA.exe"), Path.Combine(curDir, "MAA_win7.exe"), true);
}
string removeListFile = Path.Combine(extractDir, "removelist.txt");
if (File.Exists(removeListFile))
@@ -475,7 +479,8 @@ namespace MaaWpfGui.ViewModels.UI
{
Process.Start(UpdateUrl);
}
});
}
);
_ = Execute.OnUIThreadAsync(() =>
{
using var toast = new ToastNotification((otaFound ? LocalizationHelper.GetString("NewVersionFoundTitle") : LocalizationHelper.GetString("NewVersionFoundButNoPackageTitle")) + " : " + UpdateTag);