mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
初步支持拷贝快捷方式至桌面
This commit is contained in:
parent
e0b2aca8ef
commit
de06de7637
21
README.md
21
README.md
@ -593,24 +593,15 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
|
||||
### 1.0.0(2021年01月29日)
|
||||
1. 实现内容
|
||||
|
||||
## 源码安装教程
|
||||
1. 安装需要的依赖
|
||||
## 构建安装包
|
||||
### deb
|
||||
```bash
|
||||
sudo apt install git make
|
||||
make package-deb -j4
|
||||
```
|
||||
2. 下载仓库
|
||||
### pkg
|
||||
```bash
|
||||
git clone https://gitee.com/gfdgd-xi/deep-wine-runner.git
|
||||
cd deep-wine-runner
|
||||
```
|
||||
3. 从源码运行程序(如果是从源码安装请跳过这一步)
|
||||
```bash
|
||||
make depend
|
||||
make run
|
||||
```
|
||||
4. 从源码安装程序
|
||||
```bash
|
||||
make install
|
||||
make package-deb -j4
|
||||
make package-pkg -j4
|
||||
```
|
||||
## Openkylin 如何安装这个 Wine 运行器?
|
||||
现在可以直接安装了
|
||||
|
@ -138,7 +138,19 @@ info = f'''{{
|
||||
"installed_apps": false
|
||||
}}
|
||||
}}'''
|
||||
|
||||
postinst = f"""#!/bin/bash
|
||||
PACKAGE_NAME="@@@Package@@@"
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
if [ -d /home/$username/桌面 ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/桌面
|
||||
fi
|
||||
if [ -d /home/$username/Desktop ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/Desktop
|
||||
fi
|
||||
done
|
||||
"""
|
||||
postrm = f"""#!/bin/bash
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||
|
||||
@ -562,16 +574,18 @@ class RunThread(QtCore.QThread):
|
||||
["@@@Wine@@@", chooseWine]
|
||||
]
|
||||
debControl = ReplaceText(control, replaceMap)
|
||||
debPostinst = ReplaceText(postinst, replaceMap)
|
||||
debPostrm = ReplaceText(postrm, replaceMap)
|
||||
debInfo = ReplaceText(info, replaceMap)
|
||||
debRunSh = ReplaceText(runsh, replaceMap)
|
||||
debDesktop = ReplaceText(desktopFile, replaceMap)
|
||||
########### 写入文件
|
||||
WriteTxt(f"{debBuildPath}/opt/apps/{debPackageName}/entries/applications/{debPackageName}.desktop", debDesktop)
|
||||
WriteTxt(f"{debBuildPath}/opt/usr/share/applications/{debPackageName}.desktop", debDesktop)
|
||||
WriteTxt(f"{debBuildPath}/usr/share/applications/{debPackageName}.desktop", debDesktop)
|
||||
WriteTxt(f"{debBuildPath}/opt/apps/{debPackageName}/files/run.sh", debRunSh)
|
||||
WriteTxt(f"{debBuildPath}/opt/apps/{debPackageName}/info", debInfo)
|
||||
WriteTxt(f"{debBuildPath}/DEBIAN/control", debControl)
|
||||
WriteTxt(f"{debBuildPath}/DEBIAN/postinst", debPostinst)
|
||||
WriteTxt(f"{debBuildPath}/DEBIAN/postrm", debPostrm)
|
||||
########### 赋值权限
|
||||
self.RunCommand(f"chmod -Rv 644 '{debBuildPath}/opt/apps/{debPackageName}/info'")
|
||||
@ -647,15 +661,18 @@ if __name__ == "__main__":
|
||||
""")
|
||||
wineChooserList = [
|
||||
"使用 Deepin Wine8 Stable 打包应用",
|
||||
"使用 Spark Wine9 wow 打包应用",
|
||||
"使用 Spark Wine9 打包应用",
|
||||
"使用 Spark Wine8 打包应用",
|
||||
"使用 Spark Wine7 Devel 打包应用",
|
||||
"使用 Deepin Wine6 Stable 打包应用",
|
||||
"使用 Deepin Wine5 Stable 打包应用",
|
||||
"使用 Deepin Wine5 打包应用",
|
||||
"使用 Deepin Wine2 打包应用"
|
||||
"使用 Deepin Wine2 打包应用",
|
||||
"使用 Spark Wine 打包应用"
|
||||
]
|
||||
wineChooserIndex = 2
|
||||
wineList = ["deepin-wine8-stable", "spark-wine9-wow", "spark-wine9", "spark-wine8", "spark-wine7-devel", "deepin-wine6-stable", "deepin-wine6-vannila", "spark-wine8-wow", "deepin-wine5-stable", "deepin-wine5", "deepin-wine"]
|
||||
wineList = ["deepin-wine8-stable", "spark-wine9-wow", "spark-wine9", "spark-wine8", "spark-wine7-devel", "deepin-wine6-stable", "deepin-wine6-vannila", "spark-wine8-wow", "deepin-wine5-stable", "deepin-wine5", "deepin-wine", "spark-wine"]
|
||||
for i in range(len(wineList)):
|
||||
if not os.system(f"which '{wineList[i]}'"):
|
||||
wineChooserIndex = i
|
||||
|
@ -48,6 +48,7 @@ def button4_cl():
|
||||
|
||||
def disabled_or_NORMAL_all(choose):
|
||||
choose = not choose
|
||||
enableCopyIconToDesktop.setDisabled(choose)
|
||||
disabledMono.setDisabled(choose)
|
||||
e1_text.setDisabled(choose)
|
||||
e2_text.setDisabled(choose)
|
||||
@ -410,7 +411,18 @@ class make_deb_threading(QtCore.QThread):
|
||||
f"{wine[wineVersion.currentText()]}, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei",
|
||||
f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper, fonts-wqy-microhei, fonts-wqy-zenhei"
|
||||
][int(chooseWineHelperValue.isChecked())],
|
||||
"postinst": "",
|
||||
"postinst": ['', f'''#!/bin/bash
|
||||
PACKAGE_NAME="{e1_text.text()}"
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
if [ -d /home/$username/桌面 ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/桌面
|
||||
fi
|
||||
if [ -d /home/$username/Desktop ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/Desktop
|
||||
fi
|
||||
done'''][enableCopyIconToDesktop.isChecked()],
|
||||
"postrm": ["", f"""#!/bin/bash
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||
|
||||
@ -623,8 +635,18 @@ fi
|
||||
"Wine": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
|
||||
"Architecture": "arm64",
|
||||
"Depends": "com.deepin-wine6-stable.deepin (>= 6.0deepin31), com.wine-helper.deepin (>= 0.0.8), com.deepin-box86.deepin (>= 0.2.6deepin3), deepin-elf-verify (>= 1.1.1-1)",
|
||||
"postinst": f"""#!/bin/sh
|
||||
|
||||
"postinst": f"""#!/bin/bash
|
||||
{['', f'''PACKAGE_NAME="{e1_text.text()}"
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
if [ -d /home/$username/桌面 ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/桌面
|
||||
fi
|
||||
if [ -d /home/$username/Desktop ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/Desktop
|
||||
fi
|
||||
done'''][enableCopyIconToDesktop.isChecked()]}
|
||||
ACTIVEX_NAME=""
|
||||
|
||||
if [ -f "/opt/apps/{e1_text.text()}/files/install.sh" ];then
|
||||
@ -1092,7 +1114,19 @@ fi
|
||||
"Depends": "cxoffice20 | cxoffice5 | cxoffice5:i386",
|
||||
"run.sh": None,
|
||||
"info": None,
|
||||
"postinst": f'''#!/bin/sh
|
||||
"postinst": f'''#!/bin/bash
|
||||
{["", f"""PACKAGE_NAME="{e1_text.text()}"
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
if [ -d /home/$username/桌面 ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/桌面
|
||||
fi
|
||||
if [ -d /home/$username/Desktop ]; then
|
||||
cp /opt/apps/$PACKAGE_NAME/entries/applications/* /home/$username/Desktop
|
||||
fi
|
||||
done"""][enableCopyIconToDesktop.isChecked()]}
|
||||
|
||||
# (c) Copyright 2008. CodeWeavers, Inc.
|
||||
|
||||
# Setup logging
|
||||
@ -2193,8 +2227,8 @@ bottleNameLock = False
|
||||
###############
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# 如果要添加其他 wine,请在字典添加其名称和执行路径
|
||||
wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine9": "spark-wine9", "spark-wine9-wow": "spark-wine9-wow"}
|
||||
wineValue = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5-stable": "deepin-wine5 stable", "deepin-wine6-stable": "deepin-wine6 stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable"}
|
||||
wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine9": "spark-wine9", "spark-wine9-wow": "spark-wine9-wow", "spark-wine": "spark-wine"}
|
||||
wineValue = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5-stable": "deepin-wine5 stable", "deepin-wine6-stable": "deepin-wine6 stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine": "spark-wine"}
|
||||
# 读取 wine 本地列表
|
||||
for i in os.listdir("/opt"):
|
||||
if os.path.exists(f"/opt/{i}/bin/wine"):
|
||||
@ -2281,6 +2315,7 @@ debControlFrame.addWidget(installDeb)
|
||||
rmBash = QtWidgets.QCheckBox(transla.transe("U", "设置卸载该 deb 后自动删除该容器"))
|
||||
cleanBottonByUOS = QtWidgets.QCheckBox(transla.transe("U", "使用统信 Wine 生态适配活动容器清理脚本"))
|
||||
disabledMono = QtWidgets.QCheckBox(transla.transe("U", "禁用 Mono 和 Gecko 安装器"))
|
||||
enableCopyIconToDesktop = QtWidgets.QCheckBox(transla.transe("U", "安装时自动拷贝快捷方式至桌面"))
|
||||
debArch = QtWidgets.QComboBox()
|
||||
debArch.addItems(["默认选项", "arm64(box86+exagear)"])
|
||||
#debArch.addItems(["i386", "arm64(box86+exagear)", "all(crossover)"])
|
||||
@ -2393,6 +2428,7 @@ moreSettingLayout.addWidget(cleanBottonByUOS)
|
||||
moreSettingLayout.addWidget(chooseWineHelperValue)
|
||||
moreSettingLayout.addLayout(helperConfigPathLayout)
|
||||
moreSettingLayout.addWidget(disabledMono)
|
||||
moreSettingLayout.addWidget(enableCopyIconToDesktop)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 的依赖(强制,如无特殊需求默认即可):")))
|
||||
moreSettingLayout.addWidget(debDepends)
|
||||
moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 的推荐依赖(非强制,一般默认即可):")))
|
||||
@ -2553,6 +2589,7 @@ allInfoList = {
|
||||
"CleanBottleByUOS": ["Ch", cleanBottonByUOS],
|
||||
"ChooseWineHelperValue": ["Ch", chooseWineHelperValue],
|
||||
"DisabledMono": ["Ch", disabledMono],
|
||||
"EnableCopyIconToDesktop": ["Ch", enableCopyIconToDesktop],
|
||||
"DebDepends": ["L", debDepends],
|
||||
"DebRecommend": ["L", debRecommend],
|
||||
"DebFirstArch": ["Co", debFirstArch],
|
||||
|
@ -2636,7 +2636,8 @@ updateThingsString = QtCore.QCoreApplication.translate("U", '''※1、修复简
|
||||
※4、支持 Arch Linux
|
||||
5、新增公告和新版本提示功能
|
||||
6、修复公告的链接在部分机器无法正常打开的问题
|
||||
7、新增赞赏入口''')
|
||||
7、新增赞赏入口
|
||||
8、支持识别 spark-wine9、spark-wine9-wow''')
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
updateTime = "2024年01月21日"
|
||||
|
Loading…
Reference in New Issue
Block a user