初步支持Arch Linux

This commit is contained in:
gfdgd xi 2024-01-31 20:54:58 +08:00
parent d57d53a659
commit eab5e11e8b
6 changed files with 62 additions and 12 deletions

View File

@ -38,6 +38,11 @@ def InstallSparkWine(wine):
else:
os.system(f"sudo apt install \"{wine}\" -y")
def InstallWineWithYay(wine):
if os.system("which yay > /dev/null"):
os.system("sudo pacman -S yay")
os.system(f"yay -S \"{wine}\"")
###################
# 程序功能
###################
@ -53,6 +58,31 @@ m m "
print("请保证你能有 root 权限以便安装")
print("如果有请按回车,否则按 [Ctrl+C] 退出", end=' ')
input()
# 判断系统版本,如果是 Arch Linux则另外处理
if os.path.exists("/etc/arch-release"):
os.system("sudo pacman -Syu")
print("请问是否要安装原版 winewine64[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo pacman -S wine")
if os.system("which deepin-wine5-stable > /dev/null"):
print("请问是否要安装 deepin-wine5-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
InstallWineWithYay("deepin-wine5-stable")
if os.system("which deepin-wine6-stable > /dev/null"):
print("请问是否要安装 deepin-wine6-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
InstallWineWithYay("deepin-wine6-stable")
if os.system("which deepin-wine8-stable > /dev/null"):
print("请问是否要安装 deepin-wine8-stable[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
InstallWineWithYay("deepin-wine8-stable")
print("全部完成!")
exit()
os.system("sudo apt update")
print("请问是否要更新操作系统?[Y/N]", end=' ')
choose = input().upper()

View File

@ -21,13 +21,13 @@ if [[ $? == 0 ]]; then
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://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box86-debs/debian ./ > /etc/apt/sources.list.d/box86.list"
wget -qO- http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box86-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg
sudo bash -c "echo deb http://gfdgdxi.v5.idcfengye.com/spark-deepin-wine-runner/data/box86-debs/debian ./ > /etc/apt/sources.list.d/box86.list"
wget -qO- http://gfdgdxi.v5.idcfengye.com/spark-deepin-wine-runner/data/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://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box64-debs/debian ./ > /etc/apt/sources.list.d/box64.list"
wget -qO- http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
sudo bash -c "echo deb http://gfdgdxi.v5.idcfengye.com/spark-deepin-wine-runner/data/box64-debs/debian ./ > /etc/apt/sources.list.d/box64.list"
wget -qO- http://gfdgdxi.v5.idcfengye.com/spark-deepin-wine-runner/data/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
@ -40,8 +40,8 @@ echo 按回车键后将会自动安装包名为 box86-generic-arm、box64-generi
echo 其他特殊版本及其包名可见如下链接(如适用于 rk3399 的版本):
echo " - Box64https://github.com/ryanfortner/box64-debs/"
echo " - Box86https://github.com/ryanfortner/box86-debs/"
echo " - Box64国内镜像http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box64-debs"
echo " - Box64国内镜像http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box86-debs"
echo " - Box64国内镜像http://gfdgdxi.v5.idcfengye.com/spark-deepin-wine-runner/data/box64-debs"
echo " - Box64国内镜像http://gfdgdxi.v5.idcfengye.com/spark-deepin-wine-runner/data/box86-debs"
read
sudo apt install -y $installBox
echo 安装完成!按回车键退出

View File

@ -14,7 +14,11 @@ clean:
rm VM-source/VirtualMachine -rfv
rm -rfv VM-source/.qmake.stash
package:
package-pkg:
debtap -q spark-deepin-wine-runner.deb
debtap -q spark-deepin-wine-runner-ace.deb
package-deb:
#cd VM-source && qmake
#cd VM-source && make
#cd wine && make

View File

@ -8,7 +8,7 @@ Certainty: possible
Check: binaries
Type: binary, udeb
Priority: optional
Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo, python3-pyperclip, bubblewrap, zenity, tree
Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo, python3-pyperclip, bubblewrap, zenity, tree, qemu-system, dpkg
Recommends: winbind, wimtools, python3-pyqt5.qtwebengine, binfmt-support, libc6:i386, libc6:armhf, libwine
Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52

View File

@ -16,6 +16,13 @@ python3 -m pip install --upgrade xpinyin --trusted-host https://repo.huaweicloud
# 用于解决老版本 pip 没 --break-system-packages 参数的问题
python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
python3 -m pip install --upgrade xpinyin --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
# 修改 box86/64 国内源错误数据
if [[ -f /etc/apt/sources.list.d/box64.list ]]; then
sed -i 's/http:\/\/seafile.jyx2048.com:2345/http:\/\/gfdgdxi.v5.idcfengye.com/g' /etc/apt/sources.list.d/box64.list
fi
if [[ -f /etc/apt/sources.list.d/box86.list ]]; then
sed -i 's/http:\/\/seafile.jyx2048.com:2345/http:\/\/gfdgdxi.v5.idcfengye.com/g' /etc/apt/sources.list.d/box86.list
fi
echo 执行完成
echo 移除旧组件
if [ -d /opt/apps/deepin-wine-runner/arm-package ]; then

View File

@ -2611,9 +2611,11 @@ exe路径\' 参数 \'
7如果非 X86 的用户的 UOS 专业版用户想要使用的话只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序''')
updateThingsString = QtCore.QCoreApplication.translate("U", '''※1、修复简易打包器在 Deepin/UOS 上无法正常启动的问题
2打包器生成的 deb 修复在非 Deepin/UOS 且未安装星火应用商店的系统中启动器无程序图标的问题
3新增公告和新版本提示功能
4修复公告的链接在部分机器无法正常打开的问题
5新增赞赏入口''')
3修复 Box86/64 国内源源失效的问题
4支持 Arch Linux
5新增公告和新版本提示功能
6修复公告的链接在部分机器无法正常打开的问题
7新增赞赏入口''')
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2024年01月21日"
@ -3454,6 +3456,14 @@ for i in [
if not os.path.exists(i[1]):
for x in i[0]:
x.setDisabled(True)
# 有些功能是 Arch Linux 不适用的,需要屏蔽
if not os.path.exists("/etc/arch-release"):
for i in [installLat, installWineHQ, installWineHQOrg,
installBox86CN, installBox86, installBox86Own, addWineDebMirrorForDeepin20,
installQemuMenu]:
i.setDisabled(True)
for i in actionList:
i.setDisabled(True)
# 有些功能是非 X86 不适用的,需要屏蔽
if subprocess.getoutput("arch").lower() != "x86_64":
p1.setDisabled(True)
@ -3462,7 +3472,6 @@ if subprocess.getoutput("arch").lower() != "x86_64":
#v1.setDisabled(True)
installWineHQ.setDisabled(True)
installWineHQOrg.setDisabled(True)
pass
o1.setCurrentText(setting["DefultWine"])
e1.setEditText(setting["DefultBotton"])
e2.setEditText("")