mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-05-24 17:09:49 +08:00
调整Mips Qemu路径
This commit is contained in:
parent
35246e6046
commit
01adbc9e20
20
StartVM.sh
20
StartVM.sh
@ -8,6 +8,7 @@
|
||||
# 基于 Python3 的 tkinter 构建
|
||||
###########################################################################################
|
||||
cd `dirname $0`
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
VBoxManage showvminfo Windows
|
||||
if [[ 0 == $? ]]; then
|
||||
# 检测到虚拟机存在,启动虚拟机
|
||||
@ -70,8 +71,25 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
||||
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
|
||||
exit
|
||||
fi
|
||||
# 判断系统版本以选择 Qemu
|
||||
isUOS=0
|
||||
qemuPath=qemu-system-x86_64
|
||||
cat /etc/os-version | grep -i uos
|
||||
if [[ $? == 0 ]]; then
|
||||
isUOS=1
|
||||
fi
|
||||
cat /etc/os-version | grep -i unio
|
||||
if [[ $? == 0 ]]; then
|
||||
isUOS=1
|
||||
fi
|
||||
if [[ $isUOS == 1 ]]; then
|
||||
arch=`uname -m`
|
||||
if [[ $arch == "mips64" ]] || [[ $arch == "mips64el" ]]; then
|
||||
qemuPath="bwrap --dev-bind / / --bind ./VM/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so ./VM/MipsQemu/usr/bin/qemu-system-x86_64"
|
||||
fi
|
||||
fi
|
||||
echo 不使用 kvm 加速
|
||||
qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
|
||||
$qemuPath --hda "$HOME/Qemu/Windows/Windows.qcow2" \
|
||||
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
|
||||
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
|
||||
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
|
||||
|
@ -151,11 +151,11 @@ int qemu::Start(bool unShown)
|
||||
}
|
||||
// UOS 3a4000 使用程序自带的 qemu
|
||||
QString info = SystemInfo().toLower();
|
||||
if(!info.contains("uos") || info.contains("unio")) {
|
||||
if(info.contains("uos") || info.contains("unio")) {
|
||||
// 判断架构
|
||||
QString arch = GetArch();
|
||||
if(arch != "mips64" || arch == "mipsel64") {
|
||||
qemuPath = "bwrap --dev-bind / / --bind '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so' /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so qemu-system-x86_64";
|
||||
if(arch == "mips64" || arch == "mipsel64") {
|
||||
qemuPath = "bwrap --dev-bind / / --bind '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so' /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/bin/qemu-system-x86_64' ";
|
||||
}
|
||||
}
|
||||
qDebug() << commandOption;
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user