mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
修复核心数和线程数识别问题
This commit is contained in:
parent
afefb854b6
commit
c05371b856
@ -34,11 +34,11 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
|||||||
use=$(echo "scale=4; $MemTotal / 3" | bc)
|
use=$(echo "scale=4; $MemTotal / 3" | bc)
|
||||||
if [[ `arch` == "x86_64" ]]; then
|
if [[ `arch` == "x86_64" ]]; then
|
||||||
echo X86 架构,使用 kvm 加速
|
echo X86 架构,使用 kvm 加速
|
||||||
kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuCount)),threads=$(($CpuSocketNum / $CpuCoreNum / $CpuCount)) -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb -nic model=rtl8139
|
kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb -nic model=rtl8139
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
echo 非 X86 架构,不使用 kvm 加速
|
echo 非 X86 架构,不使用 kvm 加速
|
||||||
qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuCount)),threads=$(($CpuSocketNum / $CpuCoreNum / $CpuCount)) -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb -nic model=rtl8139
|
qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb -nic model=rtl8139
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
zenity --question --no-wrap --text="检查到您未创建所指定的虚拟机,是否创建虚拟机并继续?\n如果不创建将无法使用"
|
zenity --question --no-wrap --text="检查到您未创建所指定的虚拟机,是否创建虚拟机并继续?\n如果不创建将无法使用"
|
||||||
|
Loading…
Reference in New Issue
Block a user