mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-05-24 08:59:49 +08:00
修改Windows安装器提示文本
This commit is contained in:
parent
9f5b96adeb
commit
72ce381c17
@ -7,7 +7,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -77,7 +77,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -147,7 +147,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -217,7 +217,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -287,7 +287,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -357,7 +357,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -427,7 +427,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -497,7 +497,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -567,7 +567,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -637,7 +637,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -707,7 +707,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -777,7 +777,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -847,7 +847,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -917,7 +917,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -987,7 +987,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -1057,77 +1057,7 @@
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
"-std=gnu++11",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-D_REENTRANT",
|
||||
"-fPIC",
|
||||
"-fsyntax-only",
|
||||
"-m64",
|
||||
"--target=x86_64-linux-gnu",
|
||||
"-DQ_CREATOR_RUN",
|
||||
"-DQT_DEPRECATED_WARNINGS",
|
||||
"-DQT_NO_DEBUG",
|
||||
"-DQT_WIDGETS_LIB",
|
||||
"-DQT_GUI_LIB",
|
||||
"-DQT_NETWORK_LIB",
|
||||
"-DQT_CORE_LIB",
|
||||
"-I",
|
||||
"/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtGui",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtNetwork",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtCore",
|
||||
"-I",
|
||||
"/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++",
|
||||
"-isystem",
|
||||
"/usr/include/c++/11",
|
||||
"-isystem",
|
||||
"/usr/include/x86_64-linux-gnu/c++/11",
|
||||
"-isystem",
|
||||
"/usr/include/c++/11/backward",
|
||||
"-isystem",
|
||||
"/usr/local/include",
|
||||
"-isystem",
|
||||
"/usr/lib/llvm-13/lib/clang/13.0.1/include",
|
||||
"-isystem",
|
||||
"/usr/include/x86_64-linux-gnu",
|
||||
"-isystem",
|
||||
"/usr/include",
|
||||
"-fmessage-length=0",
|
||||
"-fdiagnostics-show-note-include-stack",
|
||||
"-fretain-comments-from-system-headers",
|
||||
"-fmacro-backtrace-limit=0",
|
||||
"-ferror-limit=1000",
|
||||
"-x",
|
||||
"c++-header",
|
||||
"-Wno-unknown-pragmas",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-documentation-unknown-command",
|
||||
"/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/ui_mainwindow.h"
|
||||
],
|
||||
"directory": "/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/.qtc_clangd",
|
||||
"file": "/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/ui_mainwindow.h"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
"clang",
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders",
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-NXqKOr/clang-uiheader-YSsUJt",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
@ -1188,5 +1118,75 @@
|
||||
],
|
||||
"directory": "/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/.qtc_clangd",
|
||||
"file": "/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/ui_qemusetting.h"
|
||||
},
|
||||
{
|
||||
"arguments": [
|
||||
"clang",
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders",
|
||||
"-I",
|
||||
"/usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore",
|
||||
"-I",
|
||||
"/tmp/QtCreator-GlmWVk/clang-uiheader-woUjcu",
|
||||
"-nostdinc",
|
||||
"-nostdinc++",
|
||||
"-pipe",
|
||||
"-std=gnu++11",
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-D_REENTRANT",
|
||||
"-fPIC",
|
||||
"-fsyntax-only",
|
||||
"-m64",
|
||||
"--target=x86_64-linux-gnu",
|
||||
"-DQ_CREATOR_RUN",
|
||||
"-DQT_DEPRECATED_WARNINGS",
|
||||
"-DQT_NO_DEBUG",
|
||||
"-DQT_WIDGETS_LIB",
|
||||
"-DQT_GUI_LIB",
|
||||
"-DQT_NETWORK_LIB",
|
||||
"-DQT_CORE_LIB",
|
||||
"-I",
|
||||
"/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtWidgets",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtGui",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtNetwork",
|
||||
"-I",
|
||||
"/usr/include/x86_64-linux-gnu/qt5/QtCore",
|
||||
"-I",
|
||||
"/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++",
|
||||
"-isystem",
|
||||
"/usr/include/c++/11",
|
||||
"-isystem",
|
||||
"/usr/include/x86_64-linux-gnu/c++/11",
|
||||
"-isystem",
|
||||
"/usr/include/c++/11/backward",
|
||||
"-isystem",
|
||||
"/usr/local/include",
|
||||
"-isystem",
|
||||
"/usr/lib/llvm-13/lib/clang/13.0.1/include",
|
||||
"-isystem",
|
||||
"/usr/include/x86_64-linux-gnu",
|
||||
"-isystem",
|
||||
"/usr/include",
|
||||
"-fmessage-length=0",
|
||||
"-fdiagnostics-show-note-include-stack",
|
||||
"-fretain-comments-from-system-headers",
|
||||
"-fmacro-backtrace-limit=0",
|
||||
"-ferror-limit=1000",
|
||||
"-x",
|
||||
"c++-header",
|
||||
"-Wno-unknown-pragmas",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-documentation-unknown-command",
|
||||
"/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/ui_mainwindow.h"
|
||||
],
|
||||
"directory": "/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/.qtc_clangd",
|
||||
"file": "/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/ui_mainwindow.h"
|
||||
}
|
||||
]
|
@ -106,7 +106,7 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
||||
//vbox *box = new vbox("Window");
|
||||
//vbox vm("Windows");
|
||||
qemu vm("Windows");
|
||||
|
||||
bool setISOAlready = 0;
|
||||
switch (id) {
|
||||
case 0:
|
||||
vm.Create("Windows7");
|
||||
@ -129,20 +129,42 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
||||
vm.Create("Windows11_64");
|
||||
vm.SetDisplayMemory(128);
|
||||
vm.EnabledUEFI(true);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
case 5:
|
||||
vm.Create("WindowsXP_32");
|
||||
vm.SetDisplayMemory(32);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
case 6:
|
||||
vm.Create("WindowsNT_64");
|
||||
vm.SetDisplayMemory(32);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
case 7:
|
||||
vm.Create("WindowsNT_64");
|
||||
vm.SetDisplayMemory(32);
|
||||
vm.EnabledUEFI(true);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
}
|
||||
vm.CreateDiskControl();
|
||||
//vm.CreateDiskControl("storage_controller_2");
|
||||
vm.CreateDisk(QDir::homePath() + "/Qemu/Windows/Windows.qcow2", 131072);
|
||||
vm.MountDisk(QDir::homePath() + "/Qemu/Windows/Windows.qcow2");
|
||||
vm.MountISO(isoPath, "storage_controller_1", 0, 1);
|
||||
switch (id) {
|
||||
case 0:
|
||||
vm.MountISO(programPath + "/Windows7X86Auto.iso", "storage_controller_1", 1, 2);
|
||||
break;
|
||||
case 1:
|
||||
vm.MountISO(programPath + "/Windows7X64Auto.iso", "storage_controller_1", 1, 2);
|
||||
break;
|
||||
if(!setISOAlready){
|
||||
vm.MountISO(isoPath, "storage_controller_1", 0, 1);
|
||||
switch (id) {
|
||||
case 0:
|
||||
vm.MountISO(programPath + "/Windows7X86Auto.iso", "storage_controller_1", 1, 2);
|
||||
break;
|
||||
case 1:
|
||||
vm.MountISO(programPath + "/Windows7X64Auto.iso", "storage_controller_1", 1, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
vm.AutoInstall(isoPath);
|
||||
}
|
||||
/*vm.MountISO(isoPath, "storage_controller_1", 0, 1);
|
||||
switch (id) {
|
||||
@ -184,7 +206,7 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
||||
//vbox *box = new vbox("Window");
|
||||
vbox vm("Windows");
|
||||
//qemu vm("Windows");
|
||||
|
||||
bool setISOAlready = 1;
|
||||
switch (id) {
|
||||
case 0:
|
||||
vm.Create("Windows7");
|
||||
@ -207,22 +229,44 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
|
||||
vm.Create("Windows11_64");
|
||||
vm.SetDisplayMemory(128);
|
||||
vm.EnabledUEFI(true);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
vm.Create("WindowsXP_32");
|
||||
vm.SetDisplayMemory(32);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
case 6:
|
||||
vm.Create("WindowsNT_64");
|
||||
vm.SetDisplayMemory(32);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
case 7:
|
||||
vm.Create("WindowsNT_64");
|
||||
vm.SetDisplayMemory(32);
|
||||
vm.EnabledUEFI(true);
|
||||
setISOAlready = 1;
|
||||
break;
|
||||
}
|
||||
QDir dir("/home/gfdgd_xi/Qemu/Windows/");
|
||||
dir.mkpath("/home/gfdgd_xi/Qemu/Windows/");
|
||||
vm.CreateDiskControl();
|
||||
//vm.CreateDiskControl("storage_controller_2");
|
||||
vm.CreateDisk(QDir::homePath() + "/VirtualBox VMs/Windows/Windows.vdi", 131072);
|
||||
vm.MountDisk(QDir::homePath() + "/VirtualBox VMs/Windows/Windows.vdi");
|
||||
vm.MountISO(isoPath, "storage_controller_1", 0, 1);
|
||||
switch (id) {
|
||||
case 0:
|
||||
vm.MountISO(programPath + "/Windows7X86Auto.iso", "storage_controller_1", 1, 0);
|
||||
break;
|
||||
case 1:
|
||||
vm.MountISO(programPath + "/Windows7X64Auto.iso", "storage_controller_1", 1, 0);
|
||||
break;
|
||||
if(!setISOAlready){
|
||||
vm.MountISO(isoPath, "storage_controller_1", 0, 1);
|
||||
switch (id) {
|
||||
case 0:
|
||||
vm.MountISO(programPath + "/Windows7X86Auto.iso", "storage_controller_1", 1, 0);
|
||||
break;
|
||||
case 1:
|
||||
vm.MountISO(programPath + "/Windows7X64Auto.iso", "storage_controller_1", 1, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
vm.AutoInstall(isoPath);
|
||||
}
|
||||
|
||||
// 判断 VirtualBox Guest ISO 是否存在
|
||||
|
@ -197,6 +197,9 @@ void MainWindow::on_install_clicked()
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
if(ui->vmChooser->currentIndex() == 0){
|
||||
QMessageBox::warning(this, "提示", "Qemu 不支持该选项!");
|
||||
return;
|
||||
|
@ -99,6 +99,21 @@
|
||||
<string>安装 WIndows 11(不支持自动安装)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>安装其他 Windows XP(支持自动安装,只支持 VirtualBox)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>安装其他 Windows (支持自动安装,传统启动,只支持 VirtualBox)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>安装其他 Windows(支持自动安装,UEFI 启动,只支持 VirtualBox)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -216,7 +231,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">百度网盘:</span><a href="https://pan.baidu.com/s/19WbvinITCQJFZpAdZutrjg?pwd=me4y"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">https://pan.baidu.com/s/19WbvinITCQJFZpAdZutrjg?pwd=me4y</span></a><span style=" font-size:10pt;"> 提取码: me4y</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">(如果下载这个,系统版本选第一项,一般推荐这个)</span><a href="ed2k://|file|cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso|2653276160|7503E4B9B8738DFCB95872445C72AEFB|/"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">ed2k://|file|cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso|2653276160|7503E4B9B8738DFCB95872445C72AEFB|/</span></a></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">(如果下载这个,系统版本选第二项)</span><a href="ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|3420557312|B58548681854236C7939003B583A8078|/"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|3420557312|B58548681854236C7939003B583A8078|/</span></a></p>
|
||||
<hr /></body></html></string>
|
||||
<hr /></body></html><br/><p>UOS 3a4000 用户需要安装 Debian10 原版的 Qemu,下载链接:</p></string>
|
||||
</property>
|
||||
<property name="openLinks">
|
||||
<bool>false</bool>
|
||||
|
3
qemu.cpp
3
qemu.cpp
@ -133,3 +133,6 @@ int qemu::EnabledUEFI(bool status){
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
int qemu::AutoInstall(QString iso){
|
||||
return 0;
|
||||
}
|
||||
|
1
qemu.h
1
qemu.h
@ -39,6 +39,7 @@ public:
|
||||
int SetKeyboardPS2();
|
||||
int OpenUSB();
|
||||
int EnabledUEFI(bool status);
|
||||
int AutoInstall(QString iso);
|
||||
private:
|
||||
QString commandOption = "";
|
||||
|
||||
|
88
test-kvm.asm
Normal file
88
test-kvm.asm
Normal file
@ -0,0 +1,88 @@
|
||||
mov ax,0xb800
|
||||
mov es,ax
|
||||
; 清屏
|
||||
mov cx,80*25
|
||||
clean:
|
||||
mov di,cx
|
||||
add di,di
|
||||
mov byte [es:di],''
|
||||
add di,1
|
||||
mov byte [es:di],0x0F
|
||||
loop clean
|
||||
; 显示上方白条
|
||||
; 移除(0,0)的S字符
|
||||
mov byte [es:0x00],''
|
||||
mov cx,80*2-1
|
||||
mov di,0
|
||||
headtitle:
|
||||
mov di,cx
|
||||
mov byte [es:di],0xF0
|
||||
; 写入空字符
|
||||
add di,di
|
||||
mov byte [es:di],''
|
||||
;inc cx
|
||||
;sub cx,1
|
||||
loop headtitle
|
||||
|
||||
mov di,0
|
||||
mov cx,80*2-1
|
||||
; 显示下方白条
|
||||
tailtitle:
|
||||
mov di,cx
|
||||
add di,80*2*24
|
||||
mov byte [es:di],0xF0
|
||||
; 写入空字符
|
||||
mov di,cx
|
||||
add di,di
|
||||
add di,80*2*24
|
||||
mov byte [es:di],''
|
||||
loop tailtitle
|
||||
; 在第一行写入文本 Hello World!
|
||||
jmp near showHeadText
|
||||
headText: db 'Hello World!'
|
||||
showHeadText:
|
||||
; 虽然可以简单粗暴的用 movsw,但是会出现问题
|
||||
mov cx,showHeadText-headText
|
||||
mov ax,0x7c0
|
||||
mov ds,ax ; 定位到汇编程序所在的内存地址
|
||||
showHeadTextLoop:
|
||||
mov dx,cx
|
||||
mov di,cx
|
||||
add di,di
|
||||
mov si,headText
|
||||
sub dx,1
|
||||
add si,dx
|
||||
; inc si
|
||||
; mov al,1000
|
||||
mov al,[ds:si]
|
||||
mov byte [es:di],al
|
||||
loop showHeadTextLoop
|
||||
jmp near showTailText
|
||||
tailText: db '2020~Now gfdgd xi'
|
||||
showTailText:
|
||||
mov cx,showTailText-tailText
|
||||
mov ax,0x7c0
|
||||
mov ds,ax
|
||||
showTailTextLoop:
|
||||
mov dx,cx
|
||||
mov di,cx
|
||||
add di,di
|
||||
add di,80*2*24
|
||||
mov si,tailText
|
||||
sub dx,1
|
||||
add si,dx
|
||||
mov al,[ds:si]
|
||||
mov byte [es:di],al
|
||||
loop showTailTextLoop
|
||||
|
||||
poweroff:
|
||||
; 跳过关机
|
||||
jmp near end
|
||||
; 关机
|
||||
mov ax,5307H ; 高级电源管理功能,设置电源状态
|
||||
mov bx,0001H ; 设备ID,1:所有设备
|
||||
mov cx,0003H ; 状态,3:表示关机
|
||||
int 15h
|
||||
end:
|
||||
times 510-($-$$) db 0
|
||||
db 0x55,0xaa
|
BIN
test-kvm.asm.bin
Normal file
BIN
test-kvm.asm.bin
Normal file
Binary file not shown.
3
vbox.cpp
3
vbox.cpp
@ -108,3 +108,6 @@ int vbox::EnabledUEFI(bool status){
|
||||
}
|
||||
return system(("\"" + managerPath + "\" modifyvm \"" + name + "\" --firmware=bios").toLatin1());
|
||||
}
|
||||
int vbox::AutoInstall(QString iso){
|
||||
return system(("vboxmanage unattended install '" + name + "' '--iso=" + iso + "'").toLatin1());
|
||||
}
|
||||
|
2
vbox.h
2
vbox.h
@ -39,7 +39,7 @@ public:
|
||||
int SetKeyboardPS2();
|
||||
int OpenUSB();
|
||||
int EnabledUEFI(bool status);
|
||||
|
||||
int AutoInstall(QString iso);
|
||||
private:
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user