mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 01:28:28 +08:00
初步rpm更新
This commit is contained in:
parent
b0e62a888c
commit
7e4620f4c3
2
.github/workflows/auto-building-rpm.yml
vendored
2
.github/workflows/auto-building-rpm.yml
vendored
@ -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
|
||||
|
||||
|
4
.github/workflows/auto-building.yml
vendored
4
.github/workflows/auto-building.yml
vendored
@ -1,5 +1,5 @@
|
||||
name: Auto Building Wine Runner
|
||||
run-name: ${{ github.actor }} Auto Building Wine Runner 🚀
|
||||
name: Auto Building Wine Runner(deb)
|
||||
run-name: ${{ github.actor }} Auto Building Wine Runner(deb) 🚀
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
@ -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("请问是否要安装原版 wine(wine64)?[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")
|
||||
|
@ -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
|
||||
|
4
Makefile
4
Makefile
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user