修改虚拟机标题名称

This commit is contained in:
gfdgd xi 2025-05-17 20:33:43 +08:00
parent d929107117
commit 2bc597ce84
3 changed files with 11 additions and 11 deletions

@ -68,7 +68,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
./VM/kvm-ok ./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "x86_64" ]]; then if [[ $? == 0 ]] && [[ `arch` == "x86_64" ]]; then
echo X86 架构,使用 kvm 加速 echo X86 架构,使用 kvm 加速
$qemuMore qemu-system-x86_64 --enable-kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \ $qemuMore qemu-system-x86_64 --enable-kvm -name Wine运行器虚拟机工具 -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-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 gtk -nic model=rtl8139 $qemuUEFI \ -m ${use}G -display gtk -nic model=rtl8139 $qemuUEFI \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \ -device AC97 -device ES1370 -device intel-hda -device hda-duplex \
@ -120,7 +120,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo $qemuUEFI echo $qemuUEFI
./VM/kvm-ok ./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
$qemuMore qemu-system-arm --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \ $qemuMore qemu-system-arm --enable-kvm -name Wine运行器虚拟机工具 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-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 gtk -usb -nic model=rtl8139 $qemuUEFI \ -m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \ -cpu max -M virt -device virtio-gpu-pci \
@ -132,7 +132,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
> $TMPDIR/tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all > $TMPDIR/tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit exit
fi fi
$qemuMore qemu-system-arm --hda "$HOME/Qemu/Windows/Windows.qcow2" \ $qemuMore qemu-system-arm -name Wine运行器虚拟机工具 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-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 gtk -usb -nic model=rtl8139 $qemuUEFI \ -m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \ -cpu max -M virt -device virtio-gpu-pci \
@ -158,7 +158,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo $qemuUEFI echo $qemuUEFI
./VM/kvm-ok ./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
$qemuMore qemu-system-aarch64 --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \ $qemuMore qemu-system-aarch64 --enable-kvm -name Wine运行器虚拟机工具 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-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 gtk -usb -nic model=rtl8139 $qemuUEFI \ -m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \ -cpu max -M virt \
@ -171,7 +171,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
> $TMPDIR/tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all > $TMPDIR/tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit exit
fi fi
$qemuMore qemu-system-aarch64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \ $qemuMore qemu-system-aarch64 -name Wine运行器虚拟机工具 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-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 gtk -usb -nic model=rtl8139 $qemuUEFI \ -m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \ -cpu max -M virt \

@ -89,9 +89,9 @@ class qemu:
# 如果存在拓展 Qemu则调用此 # 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-arm" qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-arm"
if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "aarch64" and not os.system((self.applicationDirPath() + "/kvm-ok"))): if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "aarch64" and not os.system((self.applicationDirPath() + "/kvm-ok"))):
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &")) return os.system((qemuPath + " -name Wine运行器虚拟机工具 --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -cpu max -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &")) return os.system((qemuPath + " -name Wine运行器虚拟机工具 --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -cpu max -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
def StartAarch64(self): def StartAarch64(self):
bootScreenLogo = "" bootScreenLogo = ""
@ -112,7 +112,7 @@ class qemu:
if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "aarch64" and not os.system((self.applicationDirPath() + "/kvm-ok"))): if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "aarch64" and not os.system((self.applicationDirPath() + "/kvm-ok"))):
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &")) return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -cpu max -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &")) return os.system((qemuPath + " -name Wine运行器虚拟机工具 --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -cpu max -M virt " + self.commandOption + " -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 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
def StartLoong64(self): def StartLoong64(self):
return 1 return 1
@ -137,8 +137,8 @@ class qemu:
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-x86_64" qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-x86_64"
print(self.commandOption) print(self.commandOption)
if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "x86_64" and not os.system((self.applicationDirPath() + "/kvm-ok"))): if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "x86_64" and not os.system((self.applicationDirPath() + "/kvm-ok"))):
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &")) return os.system((qemuPath + " -name Wine运行器虚拟机工具 --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -nic model=rtl8139 " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &")) return os.system((qemuPath + " -name Wine运行器虚拟机工具 --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -nic model=rtl8139 " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
def Stop(self): def Stop(self):
os.system("killall qemu-system-x86_64 -9") os.system("killall qemu-system-x86_64 -9")

@ -1,5 +1,5 @@
{ {
"Version": "4.1.5", "Version": "4.1.6",
"Time": "未知", "Time": "未知",
"Thank": [ "Thank": [
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000新世界的测试机器", "感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000新世界的测试机器",