mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
启动脚本跟进logo
This commit is contained in:
parent
1bf5eab4e0
commit
950eca478c
14
StartVM.sh
14
StartVM.sh
@ -49,14 +49,16 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
if [[ -f $HOME/.config/deepin-wine-runner/QEMU-EFI ]]; then
|
if [[ -f $HOME/.config/deepin-wine-runner/QEMU-EFI ]]; then
|
||||||
echo 使用 UEFI 启动
|
echo 使用 UEFI 启动
|
||||||
if [[ -f /usr/share/qemu/OVMF.fd ]]; then
|
if [[ -f /usr/share/qemu/OVMF.fd ]]; then
|
||||||
qemuUEFI="--bios /usr/share/qemu/OVMF.fd"
|
qemuUEFI="--bios /usr/share/qemu/OVMF.fd -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 "
|
||||||
else
|
else
|
||||||
if [[ -f `dirname $0`/VM/OVMF.fd ]]; then
|
if [[ -f `dirname $0`/VM/OVMF.fd ]]; then
|
||||||
qemuUEFI="--bios `dirname $0`/VM/OVMF.fd"
|
qemuUEFI="--bios `dirname $0`/VM/OVMF.fd -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 "
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo $qemuUEFI
|
else
|
||||||
|
qemuUEFI="-vga virtio -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 "
|
||||||
fi
|
fi
|
||||||
|
echo $qemuUEFI
|
||||||
./VM/kvm-ok
|
./VM/kvm-ok
|
||||||
if [[ $? == 0 ]] && [[ `arch` == "x86_64" ]]; then
|
if [[ $? == 0 ]] && [[ `arch` == "x86_64" ]]; then
|
||||||
echo X86 架构,使用 kvm 加速
|
echo X86 架构,使用 kvm 加速
|
||||||
@ -64,6 +66,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
|
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
|
||||||
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
|
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
|
||||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||||
|
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
|
||||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -72,6 +75,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
|
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
|
||||||
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
|
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
|
||||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||||
|
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
|
||||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -97,6 +101,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
||||||
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
||||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||||
|
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
|
||||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -108,6 +113,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
||||||
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
||||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||||
|
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
|
||||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -134,6 +140,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
||||||
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
||||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||||
|
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
|
||||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -146,6 +153,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
|
||||||
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
|
||||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||||
|
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
|
||||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
@ -146,7 +146,7 @@ int qemu::Start(bool unShown)
|
|||||||
newCommandOption += " -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 ";
|
newCommandOption += " -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 ";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newCommandOption += " -vga virtio -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 ";
|
newCommandOption += " -vga virtio -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 ";
|
||||||
}
|
}
|
||||||
qDebug() << commandOption;
|
qDebug() << commandOption;
|
||||||
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "x86_64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
|
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "x86_64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
|
||||||
@ -257,6 +257,7 @@ int qemu::UseOtherEFI(QString fdFilePath)
|
|||||||
|
|
||||||
int qemu::EnabledUEFI(bool status)
|
int qemu::EnabledUEFI(bool status)
|
||||||
{
|
{
|
||||||
|
isUEFI = status;
|
||||||
if(!status){
|
if(!status){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -268,7 +269,6 @@ int qemu::EnabledUEFI(bool status)
|
|||||||
commandOption += "--bios '" + QCoreApplication::applicationDirPath() + "/OVMF.fd' ";
|
commandOption += "--bios '" + QCoreApplication::applicationDirPath() + "/OVMF.fd' ";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
isUEFI = status;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user