Box86/64国内源

This commit is contained in:
gfdgd xi 2023-07-07 10:33:23 +08:00
parent 075478029d
commit aff9996515
3 changed files with 55 additions and 4 deletions

47
InstallBox86-cn.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/bash
if [[ `whoami` != root ]]; then
echo 请以 root 权限运行
echo 按任意键退出
read
exit 1
fi
PCArch=`dpkg --print-architecture`
if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
echo 非 ARM 架构,无法继续
echo 按任意键退出
read
exit 1
fi
which box86
if [[ $? == 0 ]]; then
echo 已安装,结束
echo 按回车键退出
read
exit 1
fi
echo 使用国内源
#sudo wget https://ryanfortner.github.io/box86-debs/box86.list -O /etc/apt/sources.list.d/box86.list
sudo bash -c "echo deb http://jihulab.com/gfdgd-xi/box86-debs/-/raw/master/debian ./ > /etc/apt/sources.list.d/box86.list"
wget -qO- http://jihulab.com/gfdgd-xi/box86-debs/-/raw/master/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg
echo "adding key..."
installBox=box86-generic-arm
if [[ $PCArch == "arm64" ]]; then
sudo bash -c "echo deb https://atomgit.com/gfdgd-xi/box64-debs/raw/master/debian ./ > /etc/apt/sources.list.d/box64.list"
wget -qO- https://atomgit.com/gfdgd-xi/box64-debs/raw/master/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
installBox="box86-generic-arm box64-generic-arm"
sudo dpkg --add-architecture armhf
fi
echo " + sudo apt update"
sudo apt update
sudo apt install binfmt-support -y
echo apt 源添加完毕!按回车键继续安装 Box86/Box64若想要停止安装则请按 Ctrl+C 或按终端右上角 ×(叉叉)退出
echo 按回车键后将会自动安装包名为 box86-generic-arm、box64-generic-armbox64 要在 aarch64 系统才可安装)的 Box86/Box64 包(适用于通用 ARM 系统)
echo 其他特殊版本及其包名可见如下链接(如适用于 rk3399 的版本):
echo " - Box64https://github.com/ryanfortner/box64-debs/"
echo " - Box86https://github.com/ryanfortner/box86-debs/"
echo " - Box64国内镜像https://jihulab.com/gfdgd-xi/box64-debs"
echo " - Box64国内镜像https://jihulab.com/gfdgd-xi/box86-debs"
read
sudo apt install -y $installBox
echo 安装完成!按回车键退出
read

View File

@ -19,14 +19,15 @@ if [[ $? == 0 ]]; then
read
exit 1
fi
echo 使用 Github 源
#sudo wget https://ryanfortner.github.io/box86-debs/box86.list -O /etc/apt/sources.list.d/box86.list
sudo bash -c "echo deb http://jihulab.com/gfdgd-xi/box64-debs/-/raw/master/debian ./ > /etc/apt/sources.list.d/box86.list"
sudo wget https://ryanfortner.github.io/box86-debs/box86.list -O /etc/apt/sources.list.d/box86.list
wget -qO- https://ryanfortner.github.io/box86-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg
echo "adding key..."
installBox=box86-generic-arm
if [[ $PCArch == "arm64" ]]; then
sudo bash -c "echo deb http://jihulab.com/gfdgd-xi/box86-debs/-/raw/master/debian ./ > /etc/apt/sources.list.d/box64.list"
wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
sudo wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list
wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
installBox="box86-generic-arm box64-generic-arm"
sudo dpkg --add-architecture armhf
fi

View File

@ -2683,7 +2683,8 @@ installWineHQOrg = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/w
installWineHQ = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "安装 WineHQ国内清华大学镜像源"))
installMoreWine = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/more-wine.png"), transla.transe("U", "安装更多 Wine"))
downloadChrootBottle = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transla.transe("U", "下载 Chroot 容器"))
installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86/Box64"))
installBox86CN = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86/Box64国内源"))
installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86/Box64国外 Github 源)"))
addWineDebMirrorForDeepin20 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "添加 Wine 运行器源以安装较新版本的 WineHQ支持 Deepin20/Debian10"))
p2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), transla.transe("U", "设置程序(&S)"))
enabledAll = QtWidgets.QAction(transla.transe("U", "强制启用所有被禁用的组件(不推荐)"))
@ -2699,6 +2700,7 @@ programmenu.addAction(installWineHQOrg)
programmenu.addAction(addWineDebMirrorForDeepin20)
programmenu.addAction(installMoreWine)
programmenu.addAction(downloadChrootBottle)
programmenu.addAction(installBox86CN)
programmenu.addAction(installBox86)
programmenu.addSeparator()
programmenu.addAction(p2)
@ -2729,6 +2731,7 @@ installMoreWine.triggered.connect(InstallMoreWine)
downloadChrootBottle.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/QemuDownload.py'"]).start())
p2.triggered.connect(ProgramSetting.ShowWindow)
enabledAll.triggered.connect(lambda: DisableButton(False))
installBox86CN.triggered.connect(lambda: OpenTerminal(f"pkexec bash '{programPath}/InstallBox86-cn.sh'"))
installBox86.triggered.connect(lambda: OpenTerminal(f"pkexec bash '{programPath}/InstallBox86.sh'"))
p3.triggered.connect(CleanProgramHistory)
cleanCache.triggered.connect(CleanProgramCache)