处理UOS arm dwine6不同的问题

This commit is contained in:
gfdgd xi 2024-06-07 11:17:31 +08:00
parent 3cd38c0032
commit 006b8ae773

8
ShellList/repair-arm-package-problem-to-uos.py Normal file → Executable file

@ -11,10 +11,14 @@ def Replace(path):
isReplace = False
isSparkHelper = False
# 替换 Wine 包名
data = data.replace("deepin-wine6-stable,", "deepin-wine6-stable | com.deepin-wine6-stable.deepin,")
data = data.replace("deepin-wine6-stable | deepin-wine6-stable-bcm | deepin-wine6-stable-dcm,", "deepin-wine6-stable | deepin-wine6-stable-bcm | deepin-wine6-stable-dcm | com.deepin-wine6-stable.deepin,")
if "spark-dwine-helper | store.spark-app.spark-dwine-helper" in data and not isReplace:
isReplace = True
isSparkHelper = True
data = data.replace("spark-dwine-helper | store.spark-app.spark-dwine-helper", "deepin-wine-helper | com.wine-helper.deepin")
if "deepin-wine-helper (>= 5.1.30-1)" in data and not isReplace:
isReplace = True
data = data.replace("deepin-wine-helper (>= 5.1.30-1)", "deepin-wine-helper | com.wine-helper.deepin")
@ -30,6 +34,10 @@ def ReplaceSparkHelper(path):
with open(f"{path}/opt/apps/{name}/files/run.sh", "w") as file:
file.write(data)
if len(sys.argv) <= 1:
print(f"请加参数,命令示例: {sys.argv[0]} xxx.deb")
exit(1)
tempPath = "/tmp/turn-deb"
for i in sys.argv[1:]:
os.system(f"rm -rf '{tempPath}'")