From 5dcc4a9b6944efa643aaa57398bfd9dbf8e94ffb Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Tue, 28 Feb 2023 22:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E5=80=BC=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- InstallBox86.sh | 28 ++++++++++++++++++++++++++++ QemuDownload.py | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 InstallBox86.sh diff --git a/InstallBox86.sh b/InstallBox86.sh new file mode 100755 index 0000000..d308f0b --- /dev/null +++ b/InstallBox86.sh @@ -0,0 +1,28 @@ +#!/bin/bash +PCArch=`arch` +if [[ $PCArch != "" ]] && [[ $PCArch != "" ]]; then + echo 非 ARM 架构,无法继续 + echo 按任意键退出 + read + exit 1 +fi +if [[ -f /etc/apt/sources.list.d/box86.list ]]; then + echo 已安装,结束 + echo 按任意键退出 + read + exit 1 +fi +#sudo wget https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list +echo deb https://code.gitlink.org.cn/gfdgd_xi/weekly-box86-debs/raw/branch/main/debian / > /etc/apt/sources.list.d/box86.list +echo "adding key..." +wget -qO- https://code.gitlink.org.cn/gfdgd_xi/weekly-box86-debs/raw/branch/main/debian/KEY.gpg | sudo apt-key add - +installBox=box86 +if [[ $PCArch == "" ]]; then + installBox="box86 box64" + sudo dpkg --add-architecture armhf +fi +echo " + sudo apt update" +sudo apt update +sudo apt install -y $installBox +echo 安装完成! +read \ No newline at end of file diff --git a/QemuDownload.py b/QemuDownload.py index fbea5b2..279b129 100755 --- a/QemuDownload.py +++ b/QemuDownload.py @@ -254,7 +254,7 @@ class DownloadThread(QtCore.QThread): #progressbar.update(int(part / show)) filePart.write(chunk) bytesRead += 1024 - self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024) + self.ChangeDialog.emit(self.dialog, int(bytesRead / allSize * 100), int(bytesRead / 1024 / 1024), int(allSize / 1024 / 1024)) self.ChangeDialog.emit(self.dialog, 100, 100, 100) # 写入配置文件 rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")