初步rpm更新

This commit is contained in:
gfdgd xi 2024-02-02 18:07:06 +08:00
parent b0e62a888c
commit 7e4620f4c3
7 changed files with 53 additions and 6 deletions

View File

@ -23,7 +23,7 @@ jobs:
- name: upload result
uses: actions/upload-artifact@v1
with:
name: spark-deepin-wine-runner.deb
name: spark-deepin-wine-runner.rpm
path: /home/runner/spark-deepin-wine-runner.rpm

View File

@ -1,5 +1,5 @@
name: Auto Building Wine Runner
run-name: ${{ github.actor }} Auto Building Wine Runner 🚀
name: Auto Building Wine Runnerdeb
run-name: ${{ github.actor }} Auto Building Wine Runnerdeb 🚀
on:
push:
workflow_dispatch:

View File

@ -58,6 +58,15 @@ m m "
print("请保证你能有 root 权限以便安装")
print("如果有请按回车,否则按 [Ctrl+C] 退出", end=' ')
input()
# 如果是 Fedora
if os.path.exists("/etc/fedora-release"):
os.system("sudo pacman -Syu")
print("请问是否要安装原版 winewine64[Y/N]", end=' ')
choose = input().upper()
if not choose == "N":
os.system("sudo yum install wine")
print("全部完成!")
exit()
# 判断系统版本,如果是 Arch Linux则另外处理
if os.path.exists("/etc/arch-release"):
os.system("sudo pacman -Syu")

View File

@ -6,12 +6,21 @@ if [[ $? == 0 ]]; then
read
exit 1
fi
# 判断是不是 Fedora
if [[ -f /etc/fedora-release ]]; then
sudo yum update -y
sudo yum install qemu-user qemu-user-static -y
echo 安装完成,按回车键后退出
read
exit
fi
# 判断是不是 Arch Linux
if [[ -f /etc/arch-release ]]; then
sudo pacman -Syu
sudo pacman -S qemu-user qemu-user-static --noconfirm
echo 安装完成,按回车键后退出
read
exit
fi
sudo apt update
sudo apt install binfmt-support qemu-user qemu-user-static -y

View File

@ -31,8 +31,8 @@ package-rpm:
package-pkg:
#sudo debtap -u
debtap -Q spark-deepin-wine-runner.deb
debtap -Q spark-deepin-wine-runner-ace.deb
fakeroot debtap -Q spark-deepin-wine-runner.deb
fakeroot debtap -Q spark-deepin-wine-runner-ace.deb
package-deb:
#cd VM-source && qmake

View File

@ -1,8 +1,18 @@
#!/bin/bash
# 如果是 Fedora
if [[-f /etc/fedora-release ]]; then
sudo yum update -y
sudo yum install qemu
echo 安装完成!按回车键退出
read
exit
fi
# 如果是 Arch Linux
if [[-f /etc/arch-release ]]; then
sudo pacman -Syu
sudo pacman -S qemu-user qemu-user-static qemu-full --noconfirm
echo 安装完成!按回车键退出
read
exit
fi
sudo apt update

View File

@ -1281,10 +1281,15 @@ class UpdateWindow():
os.makedirs("/tmp/spark-deepin-wine-runner/update")
unPackageNew = False
isArch = False
isFedora = False
if os.path.exists("/etc/arch-release"):
isArch = True
if UpdateWindow.data["Url-pkg"][0] == None:
unPackageNew = True
if os.path.exists("/etc/fedora-release"):
isFedora = True
if UpdateWindow.data["Url-rpm"][0] == None:
unPackageNew = True
try:
print(UpdateWindow.data["Url"])
if os.path.exists(f"{programPath}/off-line.lock") or programPath != "/opt/apps/deepin-wine-runner" or unPackageNew:
@ -1320,6 +1325,20 @@ echo 安装安装包
pacman -U /tmp/spark-deepin-wine-runner/update/* --noconfirm
notify-send -i "{iconPath}" "更新完毕!"
zenity --info --text=\"更新完毕!\" --ellipsize
""")
elif isFedora:
# 使用 yum 安装更新
write_txt("/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash
echo 删除多余的安装包
rm -rfv /tmp/spark-deepin-wine-runner/update/*
echo 关闭Wine 运行器
python3 "{programPath}/updatekiller.py"
echo 下载安装包
wget -P /tmp/spark-deepin-wine-runner/update {UpdateWindow.data["Url-rpm"][0]} -o spark-deepin-wine-runner.rpm
echo 安装安装包
yum install /tmp/spark-deepin-wine-runner/update/spark-deepin-wine-runner.rpm -y
notify-send -i "{iconPath}" "更新完毕!"
zenity --info --text=\"更新完毕!\" --ellipsize
""")
else:
# 使用 deb 安装更新
@ -3485,7 +3504,7 @@ for i in [
for x in i[0]:
x.setDisabled(True)
# 有些功能是 Arch Linux 不适用的,需要屏蔽
if os.path.exists("/etc/arch-release"):
if os.path.exists("/etc/arch-release") or os.path.exists("/etc/fedora-release"):
if os.path.exists(f"{programPath}/off-line.lock"):
for i in [p1]:
i.setDisabled(True)