mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-02-05 12:58:02 +08:00
新增安装Windows11功能(只限VirtualBox)
This commit is contained in:
parent
a2424e08ba
commit
a1b2915e3a
@ -7,7 +7,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -77,7 +77,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -147,7 +147,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -217,7 +217,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -287,7 +287,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -357,7 +357,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -427,7 +427,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -497,7 +497,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -567,7 +567,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -637,7 +637,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -707,7 +707,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -777,7 +777,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -847,7 +847,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -917,7 +917,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -987,7 +987,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -1057,7 +1057,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
@ -1127,7 +1127,7 @@
|
|||||||
"-I",
|
"-I",
|
||||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||||
"-I",
|
"-I",
|
||||||
"/tmp/QtCreator-OUNQoP/clang-uiheader-OYkbQU",
|
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||||
"-nostdinc",
|
"-nostdinc",
|
||||||
"-nostdinc++",
|
"-nostdinc++",
|
||||||
"-pipe",
|
"-pipe",
|
||||||
|
@ -110,15 +110,24 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
|||||||
switch (id) {
|
switch (id) {
|
||||||
case 0:
|
case 0:
|
||||||
vm.Create("Windows7");
|
vm.Create("Windows7");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
vm.Create("Windows7_64");
|
vm.Create("Windows7_64");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
vm.Create("WindowsNT_64");
|
vm.Create("WindowsNT_64");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
vm.Create("WindowsNT_64");
|
vm.Create("WindowsNT_64");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
|
vm.EnabledUEFI(true);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
vm.Create("Windows11_64");
|
||||||
|
vm.SetDisplayMemory(128);
|
||||||
vm.EnabledUEFI(true);
|
vm.EnabledUEFI(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -158,7 +167,6 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
|||||||
infoUtils::memoryRate(memory, memoryAll, swap, swapAll);
|
infoUtils::memoryRate(memory, memoryAll, swap, swapAll);
|
||||||
//memoryRate(memory, memoryAll, swap, swapAll);
|
//memoryRate(memory, memoryAll, swap, swapAll);
|
||||||
vm.SetMemory(memoryAll / 3 / 1024);
|
vm.SetMemory(memoryAll / 3 / 1024);
|
||||||
vm.SetDisplayMemory(32);
|
|
||||||
vm.SetNetBridge(net);
|
vm.SetNetBridge(net);
|
||||||
vm.EnabledAudio();
|
vm.EnabledAudio();
|
||||||
vm.EnabledClipboardMode();
|
vm.EnabledClipboardMode();
|
||||||
@ -180,16 +188,25 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
|||||||
switch (id) {
|
switch (id) {
|
||||||
case 0:
|
case 0:
|
||||||
vm.Create("Windows7");
|
vm.Create("Windows7");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
vm.Create("Windows7_64");
|
vm.Create("Windows7_64");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
vm.Create("WindowsNT_64");
|
vm.Create("WindowsNT_64");
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
vm.Create("WindowsNT_64");
|
vm.Create("WindowsNT_64");
|
||||||
vm.EnabledUEFI(true);
|
vm.EnabledUEFI(true);
|
||||||
|
vm.SetDisplayMemory(32);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
vm.Create("Windows11_64");
|
||||||
|
vm.SetDisplayMemory(128);
|
||||||
|
vm.EnabledUEFI(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
QDir dir("/home/gfdgd_xi/Qemu/Windows/");
|
QDir dir("/home/gfdgd_xi/Qemu/Windows/");
|
||||||
@ -213,8 +230,8 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
|||||||
if(QFile::exists("/usr/share/virtualbox/VBoxGuestAdditions.iso")){
|
if(QFile::exists("/usr/share/virtualbox/VBoxGuestAdditions.iso")){
|
||||||
vm.MountISO("/usr/share/virtualbox/VBoxGuestAdditions.iso", "storage_controller_1", 1, 1);
|
vm.MountISO("/usr/share/virtualbox/VBoxGuestAdditions.iso", "storage_controller_1", 1, 1);
|
||||||
}
|
}
|
||||||
|
// VirtualBox 的 CPU 数量设置方法和 Qemu 不一样
|
||||||
vm.SetCPU(get_nprocs(), GetCPUSocket(), GetCPUCore());
|
vm.SetCPU(GetCPUCore(), GetCPUSocket(), GetCPUCore());
|
||||||
long memory = 0;
|
long memory = 0;
|
||||||
long memoryAll = 0;
|
long memoryAll = 0;
|
||||||
long swap = 0;
|
long swap = 0;
|
||||||
@ -222,7 +239,6 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
|||||||
infoUtils::memoryRate(memory, memoryAll, swap, swapAll);
|
infoUtils::memoryRate(memory, memoryAll, swap, swapAll);
|
||||||
//memoryRate(memory, memoryAll, swap, swapAll);
|
//memoryRate(memory, memoryAll, swap, swapAll);
|
||||||
vm.SetMemory(memoryAll / 3 / 1024);
|
vm.SetMemory(memoryAll / 3 / 1024);
|
||||||
vm.SetDisplayMemory(32);
|
|
||||||
vm.SetNetBridge(net);
|
vm.SetNetBridge(net);
|
||||||
vm.EnabledAudio();
|
vm.EnabledAudio();
|
||||||
vm.EnabledClipboardMode();
|
vm.EnabledClipboardMode();
|
||||||
|
@ -196,6 +196,12 @@ void MainWindow::on_install_clicked()
|
|||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
if(ui->vmChooser->currentIndex() == 0){
|
||||||
|
QMessageBox::warning(this, "提示", "Qemu 不支持该选项!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if(ui->vmChooser->currentIndex() == 0 && QFile::exists(QDir::homePath() + "/.config/deepin-wine-runner/QEMU-EFI")){
|
if(ui->vmChooser->currentIndex() == 0 && QFile::exists(QDir::homePath() + "/.config/deepin-wine-runner/QEMU-EFI")){
|
||||||
QFile::remove(QDir::homePath() + "/.config/deepin-wine-runner/QEMU-EFI");
|
QFile::remove(QDir::homePath() + "/.config/deepin-wine-runner/QEMU-EFI");
|
||||||
|
@ -94,6 +94,11 @@
|
|||||||
<string>其他 Windows 系统(不支持自动安装,UEFI 启动,推荐 Windows 8 及以上)</string>
|
<string>其他 Windows 系统(不支持自动安装,UEFI 启动,推荐 Windows 8 及以上)</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>安装 WIndows 11(不支持自动安装)</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user