启动器图标支持启动UEFI

This commit is contained in:
2023-08-10 14:36:41 +08:00
parent e642d17828
commit db622c93ba
6 changed files with 135 additions and 95 deletions

View File

@@ -120,8 +120,16 @@ int qemu::OpenUSB(){
return 0;
}
int qemu::EnabledUEFI(bool status){
if(status){
commandOption += "--bios /usr/share/qemu/OVMF.fd ";
if(!status){
return 0;
}
return 0;
if(QFile::exists("/usr/share/qemu/OVMF.fd")){
commandOption += "--bios /usr/share/qemu/OVMF.fd ";
return 0;
}
if(QFile::exists(QCoreApplication::applicationDirPath() + "/OVMF.fd")){
commandOption += "--bios '" + QCoreApplication::applicationDirPath() + "/OVMF.fd' ";
return 0;
}
return 1;
}