Compare commits

...

45 Commits

Author SHA1 Message Date
df5d08cd68 应用运行库新增bwrap识别
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-21 11:46:54 +08:00
2357c646a1 优化在termux的使用体验 2024-07-21 11:34:44 +08:00
0b0a757765 添加NOVNC 2024-07-21 09:36:40 +08:00
104d197e4b 调整依赖关系以在termux可以获得更好的体验
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-20 22:53:49 +08:00
60f838144d 初步termux支持 2024-07-20 22:26:35 +08:00
3146467477 新增proot和android识别
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-20 09:37:26 +08:00
30d4986214 调整系统判断机制
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-19 22:59:46 +08:00
11ad6f3766 新增Wine tag 取反逻辑(!) 2024-07-19 22:54:12 +08:00
046fe2c103 修复AOSC loong64 因为 pyperclip 问题导致无法正常打开运行器的问题 2024-07-19 22:16:55 +08:00
b672fd93e6 修复打包器选择Wine封装入deb模式时helper只能使用spark dwine helper的问题 2024-07-19 21:59:46 +08:00
a7d478ab93 更改 Wine git 仓库地址以修复 Wine 日构建问题
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-19 11:22:03 +08:00
c4987b4ce6 适配AOSC
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-18 21:13:28 +08:00
6ac4fa72ad 修改下更新日志
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-17 21:37:48 +08:00
15946ccb4e 适配debian testing的7z以修复打包时会把/打入.7z包导致死机的问题 2024-07-17 21:16:36 +08:00
e109502c34 新增开关选项
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-17 14:54:37 +08:00
97f944f4b9 安装更多wine工具支持根据当前机器实际情况自动推荐适合的wine 2024-07-17 14:45:30 +08:00
a447fa6343 清空下过时的helper
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-16 22:39:04 +08:00
3018f4276e 调整run.sh 2024-07-16 22:37:36 +08:00
c3bfb33dd9 推荐安装helper 2024-07-16 22:32:48 +08:00
f1decf51d1 支持导入.7z包时自动移除部分特殊符号
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-15 21:46:24 +08:00
e3c54ffc32 支持手动导入7z包 2024-07-15 20:46:21 +08:00
10db5c042d 安装wine出新增网盘入口
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-15 15:14:20 +08:00
18ce8a080f 支持调用GXDE的deepin-terminal-gtk 2024-07-15 12:52:51 +08:00
f9e9a4eb72 调整运行器缩放机制
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-14 18:48:30 +08:00
ebb6c2c5fa 修改打包器包名生成机制以及文本提示 2024-07-14 18:27:01 +08:00
de98af8c99 漏调Makefile
Some checks failed
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Has been cancelled
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Has been cancelled
2024-07-12 19:06:19 +08:00
5f41d73dbd 跟进dxvk 2024-07-12 19:05:25 +08:00
7aff330137 忘记改启动器虚拟机入口的qemu调用了,现在支持调用Qemu Extra了
Some checks failed
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Has been cancelled
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Has been cancelled
2024-06-30 09:22:16 +08:00
6c53446134 修复deepin23无法正常使用Mono/gecko安装器的问题
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-29 18:50:56 +08:00
8683ee1730 3.9.2
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-29 15:44:14 +08:00
f4bce0e99f 调整run.sh问题 2024-06-29 12:51:56 +08:00
380cf74bbf 新增拖动条 2024-06-29 12:04:46 +08:00
535232ac5f 优化小屏幕使用体验 2024-06-29 11:45:02 +08:00
6509a89658 精简组建*2 2024-06-29 11:15:40 +08:00
962fec1ca9 精简组件 2024-06-29 11:03:04 +08:00
89c61eeef2 移除废弃组建、wine虚拟机工具支持读取extra包的virtio-win.iso 2024-06-29 10:51:16 +08:00
ae119a7d1a 调整依赖
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-29 09:01:32 +08:00
f5a65ec92f 修复wine安装器在文件下载失败后无法自动关闭进度条和解除控件禁用的问题 2024-06-29 08:50:36 +08:00
fc9f2f05d2 不允许版本号开头输入首字母以及版本号不允许出现空格 2024-06-29 08:46:13 +08:00
c55ba35827 新增推荐依赖
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-28 21:27:46 +08:00
5aca3fb038 生成的deb同时支持使用spark-dwine-helper和deepin-wine-helper(未测试) 2024-06-28 16:31:13 +08:00
0ca24b773c 支持调用拓展qemu 2024-06-17 22:38:45 +08:00
f43ffa0fac 调整README 2024-06-16 22:09:19 +08:00
5736dd0bfa 更新README 2024-06-15 19:55:29 +08:00
d0071a9e5d 新增readme 2024-06-15 19:36:50 +08:00
158 changed files with 1490 additions and 6059 deletions

2
.gitignore vendored
View File

@@ -4,3 +4,5 @@ __pycache__
VM-source/Makefile
*.rpm
*.pro.user
.vscode
build-*-Debug

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "novnc"]
path = novnc
url = https://github.com/novnc/noVNC

View File

@@ -1,21 +0,0 @@
#!/bin/bash
echo 网址http://deb.wine.wine-runner.gfdgdxi.top/
if [[ ! -f /etc/apt/sources.list.d/gfdgdxi-list-winehq.list ]]; then
echo 未添加源,现在开始添加!
sudo apt update
sudo apt install wget gpg
if [[ -f /tmp/github.sh ]]; then
rm -v /tmp/github.sh
fi
cd /tmp
wget http://deb.wine.wine-runner.gfdgdxi.top/sources/github.sh
bash github.sh
rm github.sh
echo 添加完成,现在安装 Wine
else
echo 已添加源,忽略,现在安装 Wine
sudo apt update
fi
sudo apt install winehq-devel -y
echo 安装完成,按回车键退出!
read

View File

@@ -40,400 +40,11 @@ urlSourcesList = [
urlSources = urlSourcesList[0]
lists = []
class ProgramRunStatusUpload():
msgWindow = None
starLayout = None
fen = None
starList = []
sha1Value = ""
programName = None
def ChangeStar():
if ProgramRunStatusUpload.fen.currentIndex() > 5:
for i in ProgramRunStatusUpload.starList:
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
return
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
head = ProgramRunStatusUpload.fen.currentIndex()
end = len(ProgramRunStatusUpload.starList)
for i in range(head, end):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
def ShowWindow(sha="", title=""):
ProgramRunStatusUpload.starList = []
ProgramRunStatusUpload.sha1Value = sha
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
upload.clicked.connect(ProgramRunStatusUpload.Upload)
if title != "":
ProgramRunStatusUpload.programName.setText(title)
ProgramRunStatusUpload.programName.setDisabled(True)
# 生成星星列表
for i in [1, 1, 1, 1, 0]:
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词改为“NULL”即可"))
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
ProgramRunStatusUpload.fen.setCurrentIndex(4)
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
msgWidgetLayout.addWidget(upload, 3, 1)
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusUpload.msgWindow.show()
def Upload():
try:
#if ProgramRunStatusUpload.sha1Value == "":
#ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2Jhc2g=").decode("utf-8"), {
"BashName": ProgramRunStatusUpload.sha1Value,
"Fen": ProgramRunStatusUpload.fen.currentIndex()
}).json()["Error"])
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
class InformationWindow():
def ShowWindow():
#webeng = False
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
aboutHtml = ""
try:
get = requests.get(f"{urlSources}/information/{fileName}.txt")
if get.status_code / 100 != 2 and get.status_code / 100 != 3:
int("Bad")
about = get.text
aboutHtml = str(about)
if not "<" in about:
# 非 Html 标签
for i in about.splitlines():
about += f"<p>{i}</p>\n"
#about = f"<pre>{about}</pre>"
about = f"<h1>关于“{choose}”的介绍</h1>\n{about}"
except:
traceback.print_exc()
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
try:
import requests as r
fenlists = requests.get("http://data.download.gfdgdxi.top/BashAppFen/" + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
tipsInfo = ""
except:
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
end = 5
starHtml = ""
if maxHead > 5:
for i in range(end):
if webeng:
starHtml += f"<img src='http://wine-runner.gfdgdxi.top/BadStar.svg' width=50>\n"
else:
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
else:
for i in range(maxHead):
if webeng:
starHtml += f"<img src='http://wine-runner.gfdgdxi.top/Star.svg' width=50>\n"
else:
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
head = maxHead
for i in range(head, end):
if webeng:
starHtml += f"<img src='http://wine-runner.gfdgdxi.top/UnStar.svg' width=50>"
else:
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
message = QtWidgets.QDialog()
messageLayout = QtWidgets.QVBoxLayout()
if webeng:
informationText = QtWebEngineWidgets.QWebEngineView()
print(aboutHtml)
if aboutHtml[:7] == "Visit: ":
url = aboutHtml[7:].splitlines()[0]
print(url)
informationText.setUrl(QtCore.QUrl(url.strip()))
else:
#informationText.linkClicked.connect(lambda: print("a"))
try:
with open("/tmp/deepin-wine-runner-information.html", "w") as file:
file.write(about)
informationText.setUrl(QtCore.QUrl("file:///tmp/deepin-wine-runner-information.html"))
except:
traceback.print_exc()
informationText.setHtml(about)
#informationText.urlChanged.connect(lambda: informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io")))
else:
informationText = QtWidgets.QTextBrowser()
informationText.setHtml(about)
uploadFen = QtWidgets.QPushButton("提交评分")
uploadFen.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
#informationText.setUrl(QtCore.QUrl("https://gfdgd-xi.github.io"))
messageLayout.addWidget(informationText)
messageLayout.addWidget(uploadFen)
message.setWindowTitle(f"关于“{choose}”的介绍")
message.resize(int(message.frameSize().width() * 1.5), int(message.frameSize().height()))
message.setLayout(messageLayout)
#message.setWindowModality(ApplicationModal);
message.show()
message.exec_()
def Add(lists: list):
global pinLunLayout
pinLunLayout1 = QtWidgets.QVBoxLayout()
pinLunLayout = QtWidgets.QWidget()
pinLunLayout.setLayout(pinLunLayout1)
for i in range(pinLunLayout1.count()):
pinLunLayout1.removeItem(pinLunLayout1.itemAt(i))
for i in lists:
widget = QtWidgets.QWidget()
inLayout = QtWidgets.QGridLayout()
inLayout.addWidget(QtWidgets.QLabel("<hr>"), 0, 0, 1, 3)
inLayout.addWidget(QtWidgets.QLabel(f"<b>{i[0]}</b>"), 1, 0)
inLayout.addWidget(QtWidgets.QLabel(f"<p align='right'><b>第{i[1]}层</b></p>"), 1, 2)
inLayout.addWidget(QtWidgets.QLabel(i[2]), 2, 0, 1, 3)
widget.setLayout(inLayout)
pinLunLayout1.addWidget(widget)
#pinLunLayout.addWidget(QtWidgets.QLabel("<hr/>"))
# pinLunLayout = widget
all = 0
now = 0
class ProgramRunStatusShow():
msgWindow = None
pingLunLayout = None
def ShowWindow():
global lists
global all
global now
global leftButton
global rightButton
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
try:
fenlists = requests.get("http://data.download.gfdgdxi.top/BashAppFen/" + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
tipsInfo = ""
except:
#traceback.print_exc()
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本评分,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
maxNumber = max(fenlists) / allNumber * 100
if tipsInfo == "":
tipsInfo = f"{maxNumber}%的用户选择了这个评分"
except:
pass
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
starLayout = QtWidgets.QHBoxLayout()
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此提交评分"))
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(fileName, choose))
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0, 2, 1)
msgWidgetLayout.addLayout(starLayout, 0, 1, 2, 1)
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 0, 2)
#msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 0, 1, 2)
msgWidgetLayout.addWidget(uploadButton, 1, 2)
end = 5
if maxHead > 5:
for i in range(end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
else:
for i in range(maxHead):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
head = maxHead
for i in range(head, end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
pingLun = QtWidgets.QWidget()
msgWidgetLayout.addWidget(pingLun, 4, 0, 1, 3)
pingLunLayout = QtWidgets.QGridLayout()
pingLunInfo = QtWidgets.QTextEdit()
#pingLunInfo.document().setMaximumBlockCount(5)
uploadButton = QtWidgets.QPushButton("评论")
pingLunLayout.addWidget(pingLunInfo, 0, 0, 1, 3)
pingLunLayout.addWidget(uploadButton, 1, 2)
pingLunInfo.setPlaceholderText("""在此输入评论,须知:
※1、不得含有色情、暴力、侮辱等违法内容以及不得有广告推广等内容
※2、字数至少 15 字,但不得超过 250 字,评论内容最多 5 行,且评论内容将会进行审核,意味着评论不会实时生效显示
※3、如果审核不通过将会被屏蔽并拉入黑名单以及公开发布 IP 地址,评论前请三思!""")
leftButton = QtWidgets.QPushButton("上一页")
rightButton = QtWidgets.QPushButton("下一页")
if maxHead == 0:
#pingLun.setDisabled(True)
pass
else:
# 显示最新的3条评论
try:
all = int(requests.get(f"http://bashpinlun.gfdgdxi.top/{urllib.request.quote(fileName)}/data.txt").text)
now = all - 3
print(all)
if all < 3:
start = 0
rightButton.setDisabled(True)
else:
start = all - 3
uploadList = []
for i in range(all - 1, start - 1, -1):
print(f"{i + 1} 条评论:")
info = requests.get(f"http://bashpinlun.gfdgdxi.top/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
print(info)
uploadList.append([f"用户{i + 1}", i + 1, info])
Add(uploadList)
except:
traceback.print_exc()
try:
ProgramRunStatusShow.pingLunLayout = pingLunLayout
pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
except:
leftButton.setDisabled(True)
rightButton.setDisabled(True)
leftButton.clicked.connect(Left)
rightButton.clicked.connect(Right)
pingLunLayout.addWidget(leftButton, 3, 0)
pingLunLayout.addWidget(rightButton, 3, 2)
leftButton.setDisabled(True)
pingLun.setLayout(pingLunLayout)
msgWidget.setLayout(msgWidgetLayout)
uploadButton.clicked.connect(lambda: ProgramRunStatusShow.Upload(pingLunInfo.toPlainText(), fileName))
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusShow.msgWindow.setWindowTitle(f"脚本“{choose}”运行情况")
ProgramRunStatusShow.msgWindow.show()
def Upload(info, name):
print(f"脚本:{name}")
print(f"评论:{info}")
try:
res = requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL1BpbmdMdW4=").decode("utf-8"), {"PinLun": info, "Version": name}).json()
print(res)
if res["ExitCode"]:
QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", res["Error"])
return
QtWidgets.QMessageBox.information(ProgramRunStatusShow.msgWindow, "提示", res["Error"])
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(ProgramRunStatusShow.msgWindow, "错误", "提交失败")
def UpdateFen():
global now
fileName = ""
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
uploadList = []
for i in range(now + 2, now - 1, -1):
print(f"{i + 1} 条评论:")
info = requests.get(f"http://bashpinlun.gfdgdxi.top/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
print(info)
uploadList.append([f"用户{i + 1}", i + 1, info])
#ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
ProgramRunStatusShow.pingLunLayout.removeWidget(pinLunLayout)
pinLunLayout.hide()
#pinLunLayout.
Add(uploadList)
#l = QtWidgets.QGridLayout()
#l.removeWidget(pinLunLayout)
ProgramRunStatusShow.pingLunLayout.addWidget(pinLunLayout, 2, 0, 1, 3)
def Left():
global now
global all
if now + 6 >= all:
now = all - 3
leftButton.setDisabled(True)
rightButton.setEnabled(True)
else:
now += 3
leftButton.setEnabled(True)
rightButton.setEnabled(True)
UpdateFen()
print(all)
print(now)
def Right():
global now
if now - 3 < 0:
now = 0
rightButton.setDisabled(True)
leftButton.setEnabled(True)
else:
now -= 3
leftButton.setEnabled(True)
rightButton.setEnabled(True)
UpdateFen()
def UploadFen():
global lists
# 获取选中项
try:
choose = ui.searchList.selectionModel().selectedIndexes()[0].data()
except:
QtWidgets.QMessageBox.critical(window, "错误", "您未选择任何配置文件")
return
fileName = ""
for i in lists:
print(i)
if i[0] == choose:
fileName = i[1]
break
ProgramRunStatusUpload.ShowWindow(fileName, choose)
class Connect:
def SearchBotton_Clicked():
@@ -573,11 +184,9 @@ if __name__ == "__main__":
# 连接信号和槽
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
#ui.uploadFen.clicked.connect(UploadFen)
ui.getInfoButton.clicked.connect(InformationWindow.ShowWindow)
ui.runBotton.clicked.connect(Connect.RunBotton_Clicked)
ui.openFile.triggered.connect(Connect.OpenFile_Triggered)
ui.exitProgram.triggered.connect(window.close)
ui.getFen.clicked.connect(ProgramRunStatusShow.ShowWindow)
# 解析云列表
try:
# 获取列表

View File

@@ -26,6 +26,11 @@ def readtxt(path):
f.close() # 关闭文本对象
return str # 返回结果
fontSize = 1
'''tempSys = QtWidgets.QApplication(sys.argv)
if tempSys.primaryScreen().availableGeometry().size().width() < 1366 or tempSys.primaryScreen().availableGeometry().size().height() < 768:
fontSize = 1.1'''
defultProgramList = {
"Architecture": "Auto",
"Debug": True,
@@ -44,7 +49,7 @@ defultProgramList = {
"AutoPath": False,
"QemuUnMountHome": False,
"Chinese": True,
"FontSize": 1
"FontSize": fontSize
}
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string

74
ExePreview/.gitignore vendored Normal file
View File

@@ -0,0 +1,74 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
CMakeLists.txt.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

View File

@@ -0,0 +1,3 @@
{
"Keys": ["application/x-ms-dos-executable", "application/x-msi", "application/x-ms-shortcut"]
}

31
ExePreview/ExePreview.pro Normal file
View File

@@ -0,0 +1,31 @@
QT += gui
TEMPLATE = lib
CONFIG += plugin core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
INCLUDEPATH += /usr/include/dde-file-manager/
DISTFILES += dfmpreview-wine-runner-plugin.json
CONFIG += c++17
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
dfmexepreview.cpp \
main.cpp
HEADERS += \
dfmexepreview.h \
main.h
DISTFILES += ExePreview.json
# Default rules for deployment.
unix {
target.path = $$[QT_INSTALL_PLUGINS]/generic
}
!isEmpty(target.path): INSTALLS += target

View File

@@ -0,0 +1,59 @@
#include "dfmexepreview.h"
#include <dfileservices.h>
DFMExePreview::DFMExePreview(QObject *parent) : DFMFilePreview(parent)
{
}
DFMExePreview::~DFMExePreview()
{
if (m_view) {
m_view->deleteLater();
m_view = NULL;
}
if (m_statusBar) {
m_statusBar->deleteLater();
m_statusBar = NULL;
}
}
void DFMExePreview::initialize(QWidget *window, QWidget *statusBar)
{
Q_UNUSED(window)
Q_UNUSED(statusBar)
if (!m_view) {
m_view = new QLabel();
}
if (!m_statusBar) {
m_statusBar = new QLabel();
}
}
bool DFMExePreview::setFileUrl(const DUrl &url)
{
m_url = url;
m_view->setText("114514");
return 1;
}
DUrl DFMExePreview::fileUrl() const
{
return m_url;
}
QWidget *DFMExePreview::contentWidget() const
{
return m_view;
}
QWidget *DFMExePreview::statusBarWidget() const
{
return m_statusBar;
}
QString DFMExePreview::title() const
{
return m_title;
}

View File

@@ -0,0 +1,28 @@
#ifndef DFMEXEPREVIEW_H
#define DFMEXEPREVIEW_H
#include <QObject>
#include <dfmfilepreview.h>
#include <QLabel>
class DFMExePreview : public DFM_NAMESPACE::DFMFilePreview
{
Q_OBJECT
public:
explicit DFMExePreview(QObject *parent = NULL);
~DFMExePreview();
virtual void initialize(QWidget *window, QWidget *statusBar) Q_DECL_OVERRIDE;
virtual bool setFileUrl(const DUrl &url) Q_DECL_OVERRIDE;
virtual DUrl fileUrl() const Q_DECL_OVERRIDE;
virtual QWidget *contentWidget() const Q_DECL_OVERRIDE;
virtual QWidget *statusBarWidget() const Q_DECL_OVERRIDE;
virtual QString title() const Q_DECL_OVERRIDE;
protected:
DUrl m_url;
QLabel *m_view = NULL;
QLabel *m_statusBar = NULL;
QString m_title;
};
#endif // DFMEXEPREVIEW_H

17
ExePreview/main.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "main.h"
#include "dfmexepreview.h"
GenericPlugin::GenericPlugin(QObject *parent)
: DFM_NAMESPACE::DFMFilePreviewPlugin(parent)
{
}
/*QObject *GenericPlugin::create(const QString &name, const QString &spec)
{
}*/
DFM_NAMESPACE::DFMFilePreview *GenericPlugin::create(const QString &key)
{
Q_UNUSED(key);
return new DFMExePreview;
}

22
ExePreview/main.h Normal file
View File

@@ -0,0 +1,22 @@
#define DFMFilePreviewFactoryInterface_ood "com.deepin.filemanager.DFMFilePreviewFactoryInterface_WineRunner"
#ifndef MAIN_H
#define MAIN_H
#include <QGenericPlugin>
#include <dfmfilepreviewplugin.h>
class GenericPlugin : public DFM_NAMESPACE::DFMFilePreviewPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "ExePreview.json")
public:
explicit GenericPlugin(QObject *parent = nullptr);
virtual DFM_NAMESPACE::DFMFilePreview *create(const QString &key);
};
#endif // MAIN_H

BIN
Icon/Program/AboutIcon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -17,7 +17,7 @@ import traceback
try:
import pyquery
except:
os.system("python3 -m pip install --upgrade pyquery --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple")
os.system("python3 -m pip install --upgrade pyquery --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages")
if "--help" in sys.argv:
print("作者gfdgd xi")
@@ -127,4 +127,4 @@ except:
file.write(programVersion)
file.close()
if exitInputShow:
input("安装结束,按回车键退出")
input("安装结束,按回车键退出")

View File

@@ -34,7 +34,7 @@ package-pkg:
sudo debtap -Q spark-deepin-wine-runner.deb
sudo debtap -Q spark-deepin-wine-runner-ace.deb
package-deb:
copy-files:
#cd VM-source && qmake
#cd VM-source && make
#cd wine && make
@@ -49,6 +49,7 @@ package-deb:
cp -rv VM-source/*.fd VM
cp -rv wine/ deb/opt/apps/deepin-wine-runner/
cp -rv Test/ deb/opt/apps/deepin-wine-runner/
cp -rv dxvk/ deb/opt/apps/deepin-wine-runner
cp -rv information.json package-script
zip -v -q -r package-script.zip package-script
cp -rv InstallBox86-cn.sh deb/opt/apps/deepin-wine-runner/
@@ -62,7 +63,6 @@ package-deb:
cp -rv QemuRun.py deb/opt/apps/deepin-wine-runner
cp -rv kill.sh deb/opt/apps/deepin-wine-runner
cp -rv updatekiller.py deb/opt/apps/deepin-wine-runner
cp -rv AddWineDebMirrorForDeepin20.sh deb/opt/apps/deepin-wine-runner
cp -rv InstallNewWineHQOrg.sh deb/opt/apps/deepin-wine-runner
cp -rv InstallWineOnDeepin23Alpha.py deb/opt/apps/deepin-wine-runner
cp -rv wrestool deb/opt/apps/deepin-wine-runner
@@ -100,7 +100,6 @@ package-deb:
cp -rv geek.exe deb/opt/apps/deepin-wine-runner
#cp -rv uengineapi deb/opt/apps/deepin-wine-runner
cp -rv getxmlimg.py deb/opt/apps/deepin-wine-runner
cp -rv ProgramFen.py deb/opt/apps/deepin-wine-runner
cp -rv information.json deb/opt/apps/deepin-wine-runner
cp -rv InstallMono.py deb/opt/apps/deepin-wine-runner
cp -rv InstallMsxml.py deb/opt/apps/deepin-wine-runner
@@ -118,7 +117,6 @@ package-deb:
cp -rv UpdateGeek.sh deb/opt/apps/deepin-wine-runner
cp -rv AppStore.py deb/opt/apps/deepin-wine-runner
cp -rv InstallWineOnDeepin23.py deb/opt/apps/deepin-wine-runner
cp -rv dxvk.7z deb/opt/apps/deepin-wine-runner
cp -rv InstallFont.py deb/opt/apps/deepin-wine-runner
cp -rv CheckDLL deb/opt/apps/deepin-wine-runner
cp -rv InstallLat.sh deb/opt/apps/deepin-wine-runner
@@ -128,7 +126,6 @@ package-deb:
cp -rv sparkstore.list deb/opt/apps/deepin-wine-runner
cp -rv arm-package.7z deb/opt/apps/deepin-wine-runner
#cp -rv exa.7z deb/opt/apps/deepin-wine-runner
cp -rv clean-unuse-program.py deb/opt/apps/deepin-wine-runner
cp -rv InstallNewWineHQ.sh deb/opt/apps/deepin-wine-runner
cp -rv cleanbottle.sh deb/opt/apps/deepin-wine-runner
cp -rv StartVM.sh deb/opt/apps/deepin-wine-runner
@@ -149,6 +146,8 @@ package-deb:
cp -rv RemoveQemuUser.sh deb/opt/apps/deepin-wine-runner
cp -rv InstallBox86.sh deb/opt/apps/deepin-wine-runner
cp -rv InstallRuntime deb/opt/apps/deepin-wine-runner
if [[ ! -d novnc/utils/websockify ]]; then git submodule update --init --recursive ; fi
cp -rv novnc deb/opt/apps/deepin-wine-runner
mkdir -pv deb/opt/apps/deepin-wine-runner/entries/
cp -rv deb/usr/share/applications deb/opt/apps/deepin-wine-runner/entries/applications
python3 UpdateTime.py
@@ -180,16 +179,45 @@ package-deb:
bash builddeb/ChangeDebVersion.sh
chmod -Rv 777 /tmp/spark-deepin-wine-runner-builder/opt
chmod -Rv 777 /tmp/spark-deepin-wine-runner-builder/usr
dpkg-deb -Z xz -z 9 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner.deb
remove-copy-files:
sudo rm -rfv /tmp/spark-deepin-wine-runner-builder
package-deb:
make copy-files -j$(nproc)
dpkg-deb -Z xz -z 9 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner.deb
make remove-copy-files -j$(nproc)
# 构建 ace 包
cp -rv deb-ace /tmp/spark-deepin-wine-runner-builder
cp -rv spark-deepin-wine-runner.deb /tmp/spark-deepin-wine-runner-builder/opt/apps/spark-deepin-wine-runner-ace
bash builddeb/ChangeDebVersion.sh
sudo chown -R root:root /tmp/spark-deepin-wine-runner-builder
dpkg-deb -Z xz -z 9 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner-ace.deb
sudo rm -rfv /tmp/spark-deepin-wine-runner-builder
dpkg-deb -Z xz -z 0 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner-ace.deb
make remove-copy-files -j$(nproc)
package-termux-deb:
make copy-files -j$(nproc)
# 替换 DEBIAN
sudo rm -rf /tmp/spark-deepin-wine-runner-builder/DEBIAN
sudo rm -rf /tmp/spark-deepin-wine-runner-builder/usr/bin/*
sudo rm -rf /tmp/spark-deepin-wine-runner-builder/usr/share/applications/*
sudo rm -rf /tmp/spark-deepin-wine-runner-builder/opt/apps/deepin-wine-runner/entries/applications/*
sudo mkdir -pv /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/
sudo mv /tmp/spark-deepin-wine-runner-builder/usr/ /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/ -v
sudo mv /tmp/spark-deepin-wine-runner-builder/opt /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt -v
sudo ln -s /data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/bin/deepin-wine-runner
sudo ln -s /data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-packager.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/bin/deepin-wine-package-builder
sudo ln -s /data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/bin/deepin-wine-packager-with-script
sudo ln -s /data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/bin/deepin-wine-packager-easy-builder
sudo cp deb-termux/DEBIAN /tmp/spark-deepin-wine-runner-builder/DEBIAN -rv
sudo cp -rv deb-termux/usr/share/applications /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/entries/applications
sudo cp -rv deb-termux/usr/share/applications /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/share/applications
# 加入 termux loader
sudo cp -rv mainwindow-termux-loader.sh /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner
sudo cp -rv mainwindow.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/mainwindow.py
sudo bash builddeb/ChangeDebVersion.sh
dpkg-deb -Z xz -z 9 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner-termux.deb
make remove-copy-files -j$(nproc)
install:
make build -j$(nproc)

View File

@@ -14,12 +14,14 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
terminal = ""
terminalList = [
"deepin-terminal",
"deepin-terminal-gtk",
"mate-terminal",
"gnome-terminal",
"xfce4-terminal"
]
terminalEnd = {
f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0],
f"{programPath}/../launch.sh\" \"deepin-terminal-gtk": ["-e", 0],
"mate-terminal": ["-e", 1],
"gnome-terminal": ["--", 0],
"xfce4-terminal": ["-e", 1]
@@ -28,6 +30,8 @@ for i in terminalList:
if not os.system(f"which {i}"):
if i == "deepin-terminal":
i = f"{programPath}/../launch.sh\" \"deepin-terminal"
if i == "deepin-terminal-gtk":
i = f"{programPath}/../launch.sh\" \"deepin-terminal-gtk"
terminal = i
break
if terminal == "":

View File

@@ -1,122 +0,0 @@
#!/usr/bin/env python3
import os
import sys
import base64
import traceback
import updatekiller
import req as requests
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
import PyQt5.QtWidgets as QtWidgets
class ProgramRunStatusShow():
msgWindow = None
def ShowWindow():
try:
fenlists = []
for i in range(6):
fenlists.append(int(requests.get("http://data.download.gfdgdxi.top/Fen/Fen" + f"{i}.txt").text))
tipsInfo = ""
except:
traceback.print_exc()
fenlists = [0, 0, 0, 0, 0]
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
maxHead = fenlists.index(max(fenlists))
allNumber = 0
for i in fenlists:
allNumber += i
try:
tipsInfo = ""
for i in range(len(fenlists)):
tipsInfo += f"{fenlists[i] / allNumber * 100}% 的用户选择了 {i} 分({fenlists[i]}/{allNumber}\n"
maxNumber = max(fenlists) / allNumber * 100
#if tipsInfo == "":
# tipsInfo = f"有{maxNumber}%的用户选择了这个评分"
except:
pass
ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow()
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
starLayout = QtWidgets.QHBoxLayout()
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
uploadButton.clicked.connect(ProgramRunStatusUpload.ShowWindow)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0)
msgWidgetLayout.addLayout(starLayout, 0, 1)
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2)
msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2)
end = 5
if maxHead > 5:
for i in range(end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/BadStar.svg' width=50>"))
else:
for i in range(maxHead):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/Star.svg' width=50>"))
head = maxHead
for i in range(head, end):
starLayout.addWidget(QtWidgets.QLabel(f"<img src='{programPath}/Icon/UnStar.svg' width=50>"))
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusShow.msgWindow.setWindowTitle(f"程序运行情况")
ProgramRunStatusShow.msgWindow.show()
class ProgramRunStatusUpload():
msgWindow = None
starLayout = None
fen = None
starList = []
sha1Value = ""
programName = None
def ChangeStar():
if ProgramRunStatusUpload.fen.currentIndex() > 5:
for i in ProgramRunStatusUpload.starList:
i.setText(f"<img src='{programPath}/Icon/BadStar.svg' width=25>")
return
for i in range(ProgramRunStatusUpload.fen.currentIndex()):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/Star.svg' width=25>")
head = ProgramRunStatusUpload.fen.currentIndex()
end = len(ProgramRunStatusUpload.starList)
for i in range(head, end):
ProgramRunStatusUpload.starList[i].setText(f"<img src='{programPath}/Icon/UnStar.svg' width=25>")
def ShowWindow():
ProgramRunStatusUpload.starList = []
ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow(ProgramRunStatusShow.msgWindow)
msgWidget = QtWidgets.QWidget()
msgWidgetLayout = QtWidgets.QGridLayout()
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
upload.clicked.connect(ProgramRunStatusUpload.Upload)
# 生成星星列表
for i in [1, 1, 1, 1, 1]:
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"])
ProgramRunStatusUpload.fen.setCurrentIndex(5)
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0)
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
msgWidgetLayout.addWidget(upload, 3, 1)
msgWidget.setLayout(msgWidgetLayout)
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
ProgramRunStatusUpload.msgWindow.show()
def Upload():
try:
QtWidgets.QMessageBox.information(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}").json()["Error"])
except:
traceback.print_exc()
QtWidgets.QMessageBox.critical(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
if __name__ == "__main__":
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
app = QtWidgets.QApplication(sys.argv)
ProgramRunStatusShow.ShowWindow()
app.exec_()

View File

@@ -1,5 +1,5 @@
<p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
<h1 align="center">Wine 运行器 3.9.1</h1>
<h1 align="center">Wine 运行器 3.9.2</h1>
<hr>
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/members'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
@@ -11,6 +11,8 @@ Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
当前支持 amd64、arm64、mips64el、loong64新世界、loongarch64旧世界、riscv64
注:
**在使用运行器时不要随便动 .deepinwine 下的容器,否则会导致安装的 wine 应用无法正常打开**
**除非你有把握不会损坏容器**
@@ -27,6 +29,16 @@ Wine Runner is a program that allows Linux users to run Windows applications mor
Wine 运行器 QQ 交流群762985460
Wine 运行器离线包下载地址https://www.123pan.com/s/pDSKVv-pAJWv.html
### 如何手动下载 Wine
下载链接: http://ctfile.gfdgdxi.top/d/31540479-61624693-080e74?p=2061 (访问密码: 2061)
### 如果使用更新版本的 Qemu
后续版本将支持调用以下链接 deb 包安装的 Qemu
Wine运行器Qemu: http://ctfile.gfdgdxi.top/d/31540479-61635610-54327c?p=2061 (访问密码: 2061)
https://sourceforge.net/projects/deep-wine-runner/files/Wine%20Runner%20Qemu%20Extra/
### Debian sid 依赖
https://gfdgdxi.lanzouw.com/b0plly5cj
密码:b346
@@ -147,6 +159,17 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志
### 3.9.22024/06/29
**※1、移除冗余组件**
**※2、修复 Wine 安装器在文件下载失败后无法自动关闭进度条和解除控件禁用的问题**
**※3、Wine 打包器不允许版本号开头输入首字母以及版本号不允许出现空格**
**※4、Wine 打包器生成的 deb 同时支持使用 spark-dwine-helper 和 deepin-wine-helper**
**※5、支持调用拓展 Qemu**
**※6、新增滚动条优化小屏幕使用体验**
![image.png](https://storage.deepin.org/thread/202406290742035395_image.png)
### 3.9.12024/06/07
**※1、修复 Windows 虚拟机安装工具安装程序在 Mips 架构无法正确启动虚拟机的问题**
**※2、优化打包器依赖**
@@ -736,8 +759,8 @@ Sourceforgehttps://sourceforge.com/projects/deep-wine-runner
屏蔽微信在Wine中运行时产生的水印/黑块可以参考https://12101111.github.io/block-wine-wechat-black-window/ 和 https://blog.csdn.net/ericden/article/details/122118443
### 拉取
***(需要先安装 Docker 后再输入以下命令)***
Docker 镜像下载链接:
```bash
wget https://code.gitlink.org.cn/gfdgd_xi/wine-building-docker/raw/branch/master/wine-latest-debian10.tar.gz
sudo docker load -i wine-latest-debian10.tar.gz
```
### 启用

View File

@@ -0,0 +1,30 @@
#!/bin/bash
import os
import sys
import binascii
def Replace(fileName: str):
with open(f"{fileName}", "rb") as file:
data = file.read()
if (sys.argv[2] == "x86_64"):
data = data.replace(bytes("/lib64/ld-linux-x86-64.so.2".encode()),
bytes("/data/data/com.termux/gfdgd".encode())) # 替换与被替换需要保证字符数量相同
if (sys.argv[2] == "aarch64"):
data = data.replace(bytes("/lib/ld-linux-aarch64.so.1".encode()),
bytes("/data/data/com.termux/gfdg".encode())) # 替换与被替换需要保证字符数量相同
with open(f"{fileName}", "wb") as file:
file.write(data)
longest = 0
def Find(path: str):
global longest
for i in os.listdir(path):
newpath = f"{path}/{i}"
if (len(newpath) > longest):
longest = len(newpath)
print(f"\r{newpath}" + " " * (longest - len(newpath)), end="")
if (os.path.isfile(newpath)):
Replace(newpath)
if (os.path.isdir(newpath)):
Find(newpath)
Find(sys.argv[1])

View File

@@ -16,6 +16,7 @@ if [[ 0 == $? ]]; then
exit
fi
# 检查是否有 QEMU
export PATH=/opt/apps/deepin-wine-runner-qemu-system-extra/files/usr/local/bin:$PATH
which qemu-system-x86_64
if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
if [[ -f "$HOME/.config/deepin-wine-runner/QemuSetting.json" ]]; then
@@ -24,6 +25,10 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
python3 ./VM/StartQemu.py
exit
fi
# 判断是否有安装增强 Qemu
if [[ -f /opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh ]]; then
qemuMore=/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh
fi
# 查看CPU个数
CpuSocketNum=`cat /proc/cpuinfo | grep "cpu cores" | uniq | wc -l`
# 查看CPU核心数
@@ -63,7 +68,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "x86_64" ]]; then
echo X86 架构,使用 kvm 加速
qemu-system-x86_64 --enable-kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-x86_64 --enable-kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
@@ -88,6 +93,9 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
qemuPath="bwrap --dev-bind / / --bind ./VM/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so ./VM/MipsQemu/usr/bin/qemu-system-x86_64"
fi
fi
if [[ $qemuMore != "" ]]; then
qemuPath=$qemuMore
fi
echo 不使用 kvm 加速
$qemuPath --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
@@ -111,7 +119,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo $qemuUEFI
./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
qemu-system-arm --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-arm --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \
@@ -123,7 +131,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
qemu-system-arm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-arm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \
@@ -149,7 +157,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo $qemuUEFI
./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
qemu-system-aarch64 --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-aarch64 --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \
@@ -162,7 +170,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
qemu-system-aarch64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-aarch64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \

View File

@@ -35,12 +35,6 @@ class Ui_MainWindow(object):
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
self.getInfoButton = QtWidgets.QPushButton(self.centralwidget)
self.getInfoButton.setObjectName("getInfoButton")
self.horizontalLayout_2.addWidget(self.getInfoButton)
self.getFen = QtWidgets.QPushButton(self.centralwidget)
self.getFen.setObjectName("getFen")
self.horizontalLayout_2.addWidget(self.getFen)
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
self.runBotton.setObjectName("runBotton")
self.horizontalLayout_2.addWidget(self.runBotton)
@@ -109,8 +103,6 @@ class Ui_MainWindow(object):
MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本"))
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
self.getFen.setText(_translate("MainWindow", "获取/提交选中项的评分和评论"))
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
self.menu.setTitle(_translate("MainWindow", "程序"))
self.menu_2.setTitle(_translate("MainWindow", "切换源"))

View File

@@ -154,6 +154,9 @@ buildvbox::buildvbox(QString isoPath, int id, int vm){
//vm.MountDisk(QDir::homePath() + "/Qemu/Windows/Windows.qcow2");
vm.MountMainDisk(QDir::homePath() + "/Qemu/Windows/Windows.qcow2");
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/resources/virtio-win.iso")) {
vm.MountISO("/opt/apps/deepin-wine-runner-qemu-system-extra/files/resources/virtio-win.iso", "storage_controller_2", 1, 3);
}
if(!setISOAlready){
vm.MountISO(isoPath, "storage_controller_1", 0, 1);
switch (id) {

View File

@@ -22,8 +22,12 @@ qemu::qemu(QString name, QString managerPath)
}
this->managerPath = managerPath;
//Command command = Command();
this->vboxVersion = Command().GetCommand("'" + managerPath + "qemu-system-i386' --version");
QString qemuPath = "qemu-system-i386";
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-i386";
}
this->vboxVersion = Command().GetCommand(qemuPath + " --version");
}
int qemu::Create(QString type)
@@ -108,15 +112,21 @@ int qemu::MountMainDisk(QString diskPath)
int qemu::StartArmhf()
{
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "aarch64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system(("qemu-system-arm --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
QString qemuPath = "qemu-system-arm";
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-arm";
}
return system(("qemu-system-arm --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "aarch64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
int qemu::StartAarch64()
{
QString bootScreenLogo = "";
QString qemuPath = "qemu-system-aarch64";
// 判断 boot 文件是否存在
if(QFile::exists(QCoreApplication::applicationDirPath() + "/boot.jpg")) {
bootScreenLogo = QCoreApplication::applicationDirPath() + "/boot.jpg";
@@ -126,11 +136,15 @@ int qemu::StartAarch64()
QFile::copy(":/boot.jpg", "/tmp/deep-wine-runner-boot.jpg");
bootScreenLogo = "/tmp/deep-wine-runner-boot.jpg";
}
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-aarch64";
}
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "aarch64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system(("qemu-system-aarch64 --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
return system(("qemu-system-aarch64 --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
int qemu::StartLoong64()
@@ -158,6 +172,10 @@ int qemu::Start(bool unShown)
qemuPath = "bwrap --dev-bind / / --bind '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so' /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/bin/qemu-system-x86_64' ";
}
}
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-x86_64";
}
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "x86_64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());

0
VM/AAVMF32_CODE.fd Normal file → Executable file
View File

0
VM/OVMF.fd Normal file → Executable file
View File

0
VM/QEMU_AARCH64_EFI.fd Normal file → Executable file
View File

0
VM/QEMU_EFI_LOONG64_7.1.fd Normal file → Executable file
View File

0
VM/StartQemu.py Normal file → Executable file
View File

View File

@@ -1,6 +1,8 @@
#!/usr/bin/env python3
import os
import sys
import subprocess
import PyQt5.QtWidgets as QtWidgets
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
arch = subprocess.getoutput("dpkg --print-architecture").replace(" ", "").replace("\n", "")
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
@@ -13,6 +15,10 @@ if not os.path.exists(f"{programPath}/VirtualMachine-amd64"):
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
os.system(f"{programPath}/VirtualMachine-{arch}")
exit()
app = QtWidgets.QApplication(sys.argv)
QtWidgets.QMessageBox.information(None, "提示", "虚拟机安装器暂不支持此系统")
exit(1)
# 后面已废弃
# 只能使用 Qemu User 运行程序
if os.path.exists("/usr/lib/x86_64-linux-gnu/") and not os.system("which qemu-x86_64"):
os.system(f"qemu-x86_64 '{programPath}/VirtualMachine-x86_64'")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
VM/Windows7X64Auto.iso Normal file → Executable file
View File

0
VM/Windows7X86Auto.iso Normal file → Executable file
View File

0
VM/boot.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

0
VM/test.qcow2 Normal file → Executable file
View File

View File

@@ -1,117 +0,0 @@
#!/usr/bin/env python3
import os
import updatekiller
if __name__ == "__main__":
print('''
mmm ""#
m" " # mmm mmm m mm
# # #" # " # #" #
# # #"""" m"""# # #
"mmm" "mm "#mm" "mm"# # #
''')
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
print("此程序可以帮助您删除程序无需的组件以节约空间")
print("如果全部删除,将只会有核心功能")
print("如果删除后想要恢复这样组件需要重新安装该软件包")
delProgramList = []
delProramCommand = "#!/bin/bash\n"
for i in [
[
"含有商业软件的内容",
[
f"{programPath}/StartVM.sh",
f"{programPath}/RunVM.sh",
f"{programPath}/VM",
"/usr/share/applications/spark-deepin-wine-runner-control-vm.desktop",
"/usr/share/applications/spark-deepin-wine-runner-start-vm.desktop",
f"{programPath}/BeCyIconGrabber.exe",
f"{programPath}/geek.exe",
f"{programPath}/窗体透明度设置工具.exe",
f"{programPath}/UpdateGeek.sh",
f"{programPath}/AppStore.py",
f"{programPath}/InstallFont.py",
f"{programPath}/InstallMsxml.py",
f"{programPath}/InstallNetFramework.py",
f"{programPath}/InstallOther.py",
f"{programPath}/InstallVisualCPlusPlus.py"
]
],
[
"Wine 打包器(不基于生态打包脚本)",
[
f"{programPath}/deepin-wine-packager.py",
f"{programPath}/exagear",
f"{programPath}/exagear.7z",
f"{programPath}/exagear",
f"{programPath}/wined3d.dll.so.7z",
f"{programPath}/wined3d.dll.so",
"/usr/bin/deepin-wine-package-builder",
"/usr/share/applications/spark-deepin-wine-package-builder.desktop"
]
],
[
"Wine 打包器(基于生态打包脚本)",
[
f"{programPath}/deepin-wine-packager-with-script.py",
f"{programPath}/package-script.zip",
f"{programPath}/package-script",
"/usr/bin/deepin-wine-packager-with-script",
"/usr/share/applications/spark-deepin-wine-packager-with-script.desktop"
]
],
[
"Arm 64 box86 wine 运行 DLL",
[
f"{programPath}/dlls-arm.7z",
f"{programPath}/dlls-arm",
f"{programPath}/wined3d.dll.so.7z",
f"{programPath}/wined3d.dll.so"
]
],
[
"Windows 虚拟机简易安装组件",
[
f"{programPath}/StartVM.sh",
f"{programPath}/RunVM.sh",
f"{programPath}/VM",
"/usr/share/applications/spark-deepin-wine-runner-control-vm.desktop",
"/usr/share/applications/spark-deepin-wine-runner-start-vm.desktop"
]
],
[
"Wine 安装组件",
[
f"{programPath}/AllInstall.py",
f"{programPath}/wine install",
f"{programPath}/InstallWineOnDeepin23.py",
f"{programPath}/sparkstore.list",
f"{programPath}/InstallNewWineHQ.sh",
f"{programPath}/wine",
"/usr/bin/deepin-wine-runner-wine-installer",
"/usr/bin/deepin-wine-runner-wine-install-deepin23",
"/usr/bin/deepin-wine-runner-wine-install",
"/usr/bin/deepin-wine-runner-winehq-install"
]
]
]:
if not os.path.exists(i[1][0]):
continue
if input(f"是否删除组件“{i[0]}”?[Y/n]").upper() == "Y":
delProgramList.append(i)
for x in i[1]:
if x == "/*" or x == "/": # 为了防止个人疏忽,出现危险命令,所以如果有最危险的 /* 会直接跳过该命令的写入
continue
delProramCommand += f"rm -rfv \"{x}\"\n"
if len(delProgramList) == 0:
print("您已经删除了所有可删除的组件,如果需要使用被删除的组件,请重新安装该软件安装包")
input("按回车退出")
exit()
print("开始删除")
file = open("/tmp/deepin-wine-clean.sh", "w")
file.write(delProramCommand)
file.close()
os.system("pkexec bash /tmp/deepin-wine-clean.sh")
input("按回车键退出程序")

59
deb-termux/DEBIAN/control Executable file
View File

@@ -0,0 +1,59 @@
Package: spark-deepin-wine-runner-termux
Version: @@VERSION@@
Maintainer: gfdgd xi <3025613752@qq.com>
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner
Architecture: all
Severity: serious
Certainty: possible
Check: binaries
Type: binary, udeb
Priority: optional
Depends: python3,
python3-pil | pillow | python-pillow,
python3-pil.imagetk | pillow | python-tkinter,
aria2,
curl,
unrar | unrar-free ,
unzip,
python3-pyqt5 | pyqt5,
xfce4-terminal | deepin-terminal-gtk | deepin-terminal | mate-terminal | gnome-terminal,
p7zip-full | p7zip-legacy | p7zip,
zenity,
tree,
dpkg,
fakeroot,
which,
git,
xfwm4,
tigervnc,
proot,
bash
Recommends: winbind,
wimtools | wimlib,
python3-pyquery,
python3-pyqt5.qtwebengine | pyqtwebengine,
binfmt-support,
libc6:i386,
libc6:armhf,
libwine,
qemu-system,
qemu-full,
qemu,
qemu-system-x86-64,
qemu-system-i386,
qemu-system-arm,
qemu-system-aarch64,
qemu-utils,
alien,
spark-deepin-wine-runner-qemu-system-extra,
deepin-wine8-stable | spark-wine | spark-wine9 | spark-wine9-wow | spark-wine8 | spark-wine8-wow | spark-wine7-devel | deepin-wine6-stable | deepin-wine5-stable | deepin-wine5 | deepin-wine | wine | wine-stable,
spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin
Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
Installed-Size: @@SIZE@@
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式

111
deb-termux/DEBIAN/postinst Executable file
View File

@@ -0,0 +1,111 @@
#!/bin/bash
# 使用系统默认的 sh 运行
#################################################################################################################
# 作者gfdgd xi
# 版本3.0.0
# 更新时间2022年10月02日
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 sh
#################################################################################################################
# 非强制性的必应组件,所以成功不成功都行
# 程序版本号
version=3.4.1
echo 安装组件
#python3 -m pip install --upgrade pyqt5 --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
#python3 -m pip install --upgrade PyQtWebEngine --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
python3 -m pip install --upgrade requests --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /dev/null 2>&1 | true
python3 -m pip install --upgrade psutil --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /dev/null 2>&1 | true
# termux 在使用 pip 安装 dbus-python 时会卡住
# python3 -m pip install --upgrade dbus-python --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /dev/null 2>&1 | true
python3 -m pip install --upgrade pyperclip --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /dev/null 2>&1 | true
python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple --break-system-packages > /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 --break-system-packages > /dev/null 2>&1 | true
# 用于解决老版本 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
python3 -m pip install --upgrade requests --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
python3 -m pip install --upgrade psutil --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
# termux 在使用 pip 安装 dbus-python 时会卡住
# python3 -m pip install --upgrade dbus-python --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
python3 -m pip install --upgrade pyperclip --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
rm -rf /opt/apps/deepin-wine-runner/arm-package
fi
if [ -d /opt/apps/deepin-wine-runner/dlls-arm ]; then
rm -rf /opt/apps/deepin-wine-runner/dlls-arm
fi
if [ -d /opt/apps/deepin-wine-runner/exa ]; then
rm -rf /opt/apps/deepin-wine-runner/exa
fi
if [ -d /opt/apps/deepin-wine-runner/dxvk ]; then
rm -rf /opt/apps/deepin-wine-runner/dxvk
fi
echo 移除完成
# 如果为非 X86 PC可以删除掉一些无用组件主要是用不了
if [[ `arch` != "x86_64" ]]; then
echo 非X86架构删除对非X86架构无用的组件
# 删除虚拟机功能
#rm -rf /opt/apps/deepin-wine-runner/StartVM.sh
#rm -rf /opt/apps/deepin-wine-runner/RunVM.sh
#rm -rf /opt/apps/deepin-wine-runner/VM
#rm -rf /usr/share/applications/spark-deepin-wine-runner-control-vm.desktop
#rm -rf /usr/share/applications/spark-deepin-wine-runner-start-vm.desktop
# 删除安装 wine 功能
rm -rf "/opt/apps/deepin-wine-runner/wine install"
# 这个注释掉的理论可用,不移除
#rm -rf "/opt/apps/deepin-wine-runner/wine"
rm -rf /usr/bin/deepin-wine-runner-wine-installer
rm -rf /usr/bin/deepin-wine-runner-wine-install-deepin23
rm -rf /usr/bin/deepin-wine-runner-wine-install
rm -rf /usr/bin/deepin-wine-runner-winehq-install
rm -rf /opt/apps/deepin-wine-runner/InstallWineOnDeepin23.py
rm -rf /opt/apps/deepin-wine-runner/sparkstore.list
rm -rf /opt/apps/deepin-wine-runner/AllInstall.py
rm -rf /opt/apps/deepin-wine-runner/InstallNewWineHQ.sh
fi
# 处理 VM 工具
vmPath=/opt/apps/deepin-wine-runner/VM/VirtualMachine-`dpkg --print-architecture`
echo 当前架构为:`dpkg --print-architecture`
if [ -f $vmPath ]; then
echo 虚拟机工具有该架构的预编译文件
# 移除辅助文件
rm -f /opt/apps/deepin-wine-runner/VM/VirtualMachine
# 移动
mv $vmPath /opt/apps/deepin-wine-runner/VM/VirtualMachine
rm -f /opt/apps/deepin-wine-runner/VM/VirtualMachine-*
else
echo 虚拟机工具无该架构的预编译文件
rm -f /opt/apps/deepin-wine-runner/VM/VirtualMachine-*
fi
echo 处理完成!
# 修复 3.3.0.1 Box86 源挂了的问题
if [ -f /etc/apt/sources.list.d/box86.list ]; then
bash -c "echo deb http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box86-debs/debian ./ > /etc/apt/sources.list.d/box86.list"
fi
# Gitlink 源挂了
# 到时候切换 gpg 源会方便很多
#if [ -r /etc/apt/sources.list.d/better-dde.list ]; then
# if [ -d /usr/share/deepin-installer ]; then
# # 用于修复 Deepin Community Live CD Install 版签名过期的问题
# wget -P /tmp/gfdgd-xi-sources https://code.gitlink.org.cn/gfdgd_xi/gfdgd-xi-apt-mirrors/raw/branch/master/gpg.asc
# rm -rfv /etc/apt/trusted.gpg.d/gfdgdxi-list.gpg | true
# cp -v /tmp/gfdgd-xi-sources/gpg.asc.gpg /etc/apt/trusted.gpg.d/gfdgdxi-list.gpg
# # 用于修复 2022.11.25 Better DDE 导致的 Deepin Community Live CD Install 版问题
# # 移除 Better DDE 源
# rm -rfv /etc/apt/sources.list.d/better-dde.list
# apt update > /dev/null 2>&1 | true
# fi
#fi
# 设置目录权限,让用户可读可写,方便后续删除组件
chmod 777 -R /opt/apps/deepin-wine-runner > /dev/null 2>&1 | true
# 向服务器返回安装数加1不显示内容且忽略错误
python3 /opt/apps/deepin-wine-runner/Download.py $version > /dev/null 2>&1 | true

54
deb-termux/DEBIAN/postrm Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
# 使用系统默认的 sh 运行
#################################################################################################################
# 作者gfdgd xi
# 版本2.2.0
# 更新时间2022年09月24日
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 sh
#################################################################################################################
# 删除软件残留,简单粗暴一点直接全部删掉,防止出现警告
# 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装)
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
rm -rf /opt/apps/deepin-wine-runner/
fi
# 删除软件缓存(留着也没什么用了)
# 缓存目录:~/.cache/deepin-wine-runner
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
echo "清理程序缓存"
for username in $(ls /home); do
echo /home/$username
if [ -d "/home/$username/.cache/deepin-wine-runner/" ]; then
rm -rf "/home/$username/.cache/deepin-wine-runner/"
fi
done
# 清理 root 用户的缓存文件
echo /root
if [ -d "/root/.cache/deepin-wine-runner/" ]; then
rm -rf "/root/.cache/deepin-wine-runner/"
fi
else
echo "非卸载,跳过清理"
fi
# 删除软件配置文件只限“purge”
# 配置目录:~/.config/deepin-wine-runner
if [ "$1" = "purge" ]; then
echo "清理程序配置文件"
for username in $(ls /home); do
echo /home/$username
if [ -d "/home/$username/.config/deepin-wine-runner/" ]; then
rm -rf "/home/$username/.config/deepin-wine-runner/"
fi
done
# 清理 root 用户的配置文件
echo /root
if [ -d "/root/.config/deepin-wine-runner/" ]; then
rm -rf "/root/.config/deepin-wine-runner/"
fi
else
echo "非 purge跳过清理"
fi

View File

@@ -0,0 +1 @@
/opt/apps/deepin-wine-runner/API/Python/

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
X-Categories=System;Wine;
Exec=/data/data/com.termux/files/usr/bin/deepin-wine-package-builder "~/.wine" %F
Icon=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
Name=Wine Package Builder
Name[zh]=Wine 打包器
Terminal=false
StartupNotify=true
NoDisplay=true
Keywords=exe;scr;
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
X-Categories=System;Wine;
Exec=/data/data/com.termux/files/usr/bin/deepin-wine-packager-easy-builder %F
Icon=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
Name=Wine Package Builder
Name[zh]=Wine 简易打包器
Terminal=false
StartupNotify=true
NoDisplay=true
Keywords=exe;scr;
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
X-Categories=System;Wine;
Exec=/data/data/com.termux/files/usr/bin/deepin-wine-packager-with-script
Icon=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
Name=Wine Package Builder For UOS
NoDisplay=true
Name[zh]=Wine 打包器(基于活动脚本)
Terminal=false
StartupNotify=true

View File

@@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
X-Categories=System;Wine;
Exec=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/RunVM.sh %F
Icon=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
Name=Setting VirtualMachine
Name[zh]=设置 Windows 虚拟机
NoDisplay=true
Terminal=false
StartupNotify=true

View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
X-Categories=System;
Exec=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/StartVM.sh %F
Icon=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
Name=Start Windows VirtualMachine
Name[zh]=开启 Windows 虚拟机
Terminal=false
StartupNotify=true

View File

@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
X-Categories=System;Wine;
Exec=/data/data/com.termux/files/usr/bin/deepin-wine-runner %F
Icon=/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner.svg
Name=Wine Runner
Name[zh]=Wine 运行器
Terminal=false
StartupNotify=true
Keywords=exe;scr;
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/deep-wine-runner/</vendor_url>
<action id="com.deepin.pkexec.deepin-wine-venturi-setter">
<message>Authentication is required to change run_v3 file manager</message>
<message xml:lang="zh_CN">修改 run_v3 文管需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/opt/apps/deepin-wine-runner/deepin-wine-venturi-setter.py</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/deep-wine-runner/</vendor_url>
<action id="com.deepin.pkexec.mount">
<message>Authentication is required to mount file</message>
<message xml:lang="zh_CN">挂载文件需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mount</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/deep-wine-runner/</vendor_url>
<action id="com.deepin.pkexec.umount">
<message>Authentication is required to unmount file</message>
<message xml:lang="zh_CN">卸载文件需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/umount</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -8,8 +8,42 @@ Certainty: possible
Check: binaries
Type: binary, udeb
Priority: optional
Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, xfce4-terminal | deepin-terminal | mate-terminal | gnome-terminal, python3-dbus, python3-pip, p7zip-full | p7zip-legacy, sudo, python3-pyperclip, bubblewrap, zenity, tree, dpkg, fakeroot
Recommends: winbind, wimtools, python3-pyqt5.qtwebengine, binfmt-support, libc6:i386, libc6:armhf, libwine, qemu-system, qemu-full, alien
Depends: python3,
python3-pil | pillow,
python3-pil.imagetk | pillow,
aria2,
curl,
unrar | unrar-free ,
unzip,
python3-requests,
python3-pyqt5 | pyqt5,
python3-psutil | pypsutil,
xfce4-terminal | deepin-terminal-gtk | deepin-terminal | mate-terminal | gnome-terminal,
python3-dbus,
python3-pip | pip, p7zip-full | p7zip-legacy | p7zip,
sudo,
python3-pyperclip | pyperclip,
bubblewrap,
zenity,
tree,
dpkg,
fakeroot,
bash
Recommends: winbind,
wimtools | wimlib,
python3-pyquery,
python3-pyqt5.qtwebengine | pyqtwebengine,
binfmt-support,
libc6:i386,
libc6:armhf,
libwine,
qemu-system,
qemu-full,
qemu,
alien,
spark-deepin-wine-runner-qemu-system-extra,
deepin-wine8-stable | spark-wine | spark-wine9 | spark-wine9-wow | spark-wine8 | spark-wine8-wow | spark-wine7-devel | deepin-wine6-stable | deepin-wine5-stable | deepin-wine5 | deepin-wine | wine,
spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin
Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52

View File

@@ -210,7 +210,6 @@ Get_Dist_Name()
}}
####获得发行版名称
#########################预设值段
@@ -221,9 +220,23 @@ BOTTLENAME="@@@Package@@@"
APPVER="@@@Version@@@"
EXEC_PATH="@@@EXEC_PATH@@@"
##### 软件在wine中的启动路径
##### 软件在wine中的启动路径
SHELL_DIR=$(dirname $(realpath $0))
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
if [ -e "$SHELL_DIR/deepinwine/tools/spark_run_v4.sh" ] ;then
# 如果 helper 在 run.sh 相同目录的 deepinwine/tools/spark_run_v4.sh 则可以调用
START_SHELL_PATH="$SHELL_DIR/deepinwine/tools/spark_run_v4.sh"
fi
if [ -e "/opt/deepinwine/tools/run_v4.sh" ] ;then
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
fi
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
fi
ENABLE_DOT_NET=""
####若使用spark-wine时需要用到.net则请把ENABLE_DOT_NET设为true同时在依赖中写spark-wine7-mono
#export BOX86_EMU_CMD="/opt/spark-box86/box86"
####仅在Arm且不可使用exagear时可用作用是强制使用box86而不是deepin-box86.如果你想要这样做,请取消注释
export MIME_TYPE=""
export DEB_PACKAGE_NAME="@@@Package@@@"
@@ -264,7 +277,7 @@ fi
##默认屏蔽mono和gecko安装器
if [ "$APPRUN_CMD" = "spark-wine7-devel" ] || [ "$APPRUN_CMD" = "spark-wine" ]|| [ "$APPRUN_CMD" = "spark-wine8" ] && [ -z "$ENABLE_DOT_NET" ];then
export WINEDLLOVERRIDES="mscoree=d,mshtml=d"
#export WINEDLLOVERRIDES="mscoree=d,mshtml=d,control.exe=d"
export WINEDLLOVERRIDES="control.exe=d"
#### "为了降低打包体积默认关闭gecko和momo如有需要注释此行仅对spark-wine7-devel有效"
@@ -293,6 +306,9 @@ if [ -n "$EXEC_PATH" ];then
else
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
fi
'''
desktopFile = f'''#!/usr/bin/env xdg-open
@@ -549,7 +565,7 @@ class RunThread(QtCore.QThread):
self.RunCommand(f"cp -rv '{folderExePath}' '{bottlePath}/drive_c/Program Files'")
debPackageVersion = self.GetEXEVersion(exePath.text(), bottlePath)
debDescription = f"{exeName} By Build By Wine Runner Easy Packager"
debDepends = f"{chooseWine} | {chooseWine}-bcm | {chooseWine}-dcm | com.{chooseWine}.deepin, deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei"
debDepends = f"{chooseWine} | {chooseWine}-bcm | {chooseWine}-dcm | com.{chooseWine}.deepin, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner, fonts-wqy-microhei, fonts-wqy-zenhei"
self.RunCommand(f"mkdir -pv '{debBuildPath}/DEBIAN'")
self.RunCommand(f"mkdir -pv '{debBuildPath}/opt/apps/{debPackageName}/files'")
self.RunCommand(f"mkdir -pv '{debBuildPath}/opt/apps/{debPackageName}/entries/applications'")
@@ -573,7 +589,7 @@ class RunThread(QtCore.QThread):
self.RunCommand(f"rm -fv '{bottlePath}/drive_c/users/@current_user@/Downloads'")
self.RunCommand(f"rm -fv '{bottlePath}/drive_c/users/@current_user@/Templates'")
########### 打包容器
self.RunCommand(f"7z a '{bottlePackagePath}' '{bottlePath}/'*")
self.RunCommand(f"7z a -snh -snl '{bottlePackagePath}' '{bottlePath}/'*")
########### 生成文件内容
buildProgramSize = getFileFolderSize(debBuildPath) / 1000
replaceMap = [

View File

@@ -215,9 +215,9 @@ def Build7z(b, self, debInformation, debPackagePath):
os.system(f"cp -rv '{b}' '{debPackagePath}/opt/cxoffice/support/{e5_text.text()}'")
return
if debPackagePath[-3: ] == ".7z":
self.run_command("7z a '{}' '{}/'*".format(debPackagePath, b))
self.run_command("7z a -snh -snl '{}' '{}/'*".format(debPackagePath, b))
else:
self.run_command("7z a {}/opt/apps/{}/files/files.7z '{}/'*".format(debPackagePath, e1_text.text(), b))
self.run_command("7z a -snh -snl {}/opt/apps/{}/files/files.7z '{}/'*".format(debPackagePath, e1_text.text(), b))
def Build7zButton_Clicked():
@@ -410,7 +410,7 @@ class make_deb_threading(QtCore.QThread):
"Architecture": debFirstArch.currentText(),
"Depends": [
f"{wine[wineVersion.currentText()]}, deepin-wine-helper | com.wine-helper.deepin, 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"
f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner, fonts-wqy-microhei, fonts-wqy-zenhei"
][int(chooseWineHelperValue.isChecked())],
"postinst": ['', f'''#!/bin/bash
PACKAGE_NAME="{e1_text.text()}"
@@ -527,7 +527,6 @@ Get_Dist_Name()
}}
####获得发行版名称
#########################预设值段
@@ -538,12 +537,24 @@ BOTTLENAME="@@@BOTTLENAME@@@"
APPVER="@@@APPVER@@@"
EXEC_PATH="@@@EXEC_PATH@@@"
##### 软件在wine中的启动路径
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
{['''ENABLE_DOT_NET=true''', 'ENABLE_DOT_NET=""'][int(disabledMono.isChecked())]}
SHELL_DIR=$(dirname $(realpath $0))
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
if [ -e "$SHELL_DIR/deepinwine/tools/spark_run_v4.sh" ] ;then
# 如果 helper 在 run.sh 相同目录的 deepinwine/tools/spark_run_v4.sh 则可以调用
START_SHELL_PATH="$SHELL_DIR/deepinwine/tools/spark_run_v4.sh"
fi
if [ -e "/opt/deepinwine/tools/run_v4.sh" ] ;then
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
fi
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
fi
ENABLE_DOT_NET=""
####若使用spark-wine时需要用到.net则请把ENABLE_DOT_NET设为true同时在依赖中写spark-wine7-mono
#export BOX86_EMU_CMD="/opt/spark-box86/box86"
####仅在Arm且不可使用exagear时可用作用是强制使用box86而不是deepin-box86.如果你想要这样做,请取消注释
export MIME_TYPE=""
export DEB_PACKAGE_NAME="@@@DEB_PACKAGE_NAME@@@"
####这里写包名才能在启动的时候正确找到files.7z,似乎也和杀残留进程有关
export APPRUN_CMD="@@@APPRUN_CMD@@@"
@@ -582,7 +593,7 @@ fi
##默认屏蔽mono和gecko安装器
if [ "$APPRUN_CMD" = "spark-wine7-devel" ] || [ "$APPRUN_CMD" = "spark-wine" ]|| [ "$APPRUN_CMD" = "spark-wine8" ] && [ -z "$ENABLE_DOT_NET" ];then
export WINEDLLOVERRIDES="mscoree=d,mshtml=d"
#export WINEDLLOVERRIDES="mscoree=d,mshtml=d,control.exe=d"
export WINEDLLOVERRIDES="control.exe=d"
#### "为了降低打包体积默认关闭gecko和momo如有需要注释此行仅对spark-wine7-devel有效"
@@ -611,6 +622,9 @@ if [ -n "$EXEC_PATH" ];then
else
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
fi
"""
][chooseWineHelperValue.isChecked()],
"info": f'''{{
@@ -1003,52 +1017,118 @@ echo "非卸载,跳过清理"
fi
"""][int(rmBash.isChecked())],
# 又又又改
"run.sh": f"""#!/bin/bash
"run.sh": f"""
#!/bin/sh
# Copyright (C) 2016 Deepin, Inc.
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>
#
#
# Copyright (C) 2022 The Spark Project
#
#
# Modifier shenmo <shenmo@spark-app.store>
#
#
#
#######################函数段。下文调用的额外功能会在此处声明
Get_Dist_Name()
{{
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
DISTRO='Deepin'
elif grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release; then
DISTRO='UniontechOS'
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
DISTRO='UniontechOS'
else
DISTRO='OtherOS'
fi
}}
####获得发行版名称
#########################预设值段
version_gt() {{ test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }}
ACTIVEX_NAME=""
####用于比较版本?未实装
BOTTLENAME="@@@BOTTLENAME@@@"
APPVER="@@@APPVER@@@"
EXEC_PATH="@@@EXEC_PATH@@@"
START_SHELL_PATH="{['/opt/deepinwine/tools/run_v4.sh', '/opt/deepinwine/tools/spark_run_v4.sh'][chooseWineHelperValue.isChecked()]}"
##### 软件在wine中的启动路径
##### 软件在wine中的启动路径
SHELL_DIR=$(dirname $(realpath $0))
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
if [ -e "$SHELL_DIR/deepinwine/tools/spark_run_v4.sh" ] ;then
# 如果 helper 在 run.sh 相同目录的 deepinwine/tools/spark_run_v4.sh 则可以调用
START_SHELL_PATH="$SHELL_DIR/deepinwine/tools/spark_run_v4.sh"
fi
if [ -e "/opt/deepinwine/tools/run_v4.sh" ] ;then
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
fi
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
fi
ENABLE_DOT_NET=""
####若使用spark-wine时需要用到.net则请把ENABLE_DOT_NET设为true同时在依赖中写spark-wine7-mono
#export BOX86_EMU_CMD="/opt/spark-box86/box86"
####仅在Arm且不可使用exagear时可用作用是强制使用box86而不是deepin-box86.如果你想要这样做,请取消注释
export MIME_TYPE=""
export MIME_EXEC=""
export DEB_PACKAGE_NAME="{e1_text.text()}"
export APPRUN_CMD="deepin-wine6-stable"
DISABLE_ATTACH_FILE_DIALOG=""
EXPORT_ENVS=""
EXEC_NAME="@@@EXEC_NAME@@@"
INSTALL_SETUP=""
export BOX86_EMU_CMD="/opt/deepin-box86/stable/box86"
####这里写包名才能在启动的时候正确找到files.7z,似乎也和杀残留进程有关
export APPRUN_CMD="@@@APPRUN_CMD@@@"
#####wine启动指令建议
#EXPORT_ENVS="wine的动态链接库路径"
##例如我的wine应用是使用的dwine6的32位容器那么我要填LD_LIBRARY_PATH=$LD_LIBRARY;/opt/deepin-wine6-stable/lib
## 如果用不到就不填,不要删除前面的注释用的#
export SPECIFY_SHELL_DIR=`dirname $START_SHELL_PATH`
ARCHIVE_FILE_DIR="/opt/apps/$DEB_PACKAGE_NAME/files"
if [ -z "$APPRUN_CMD" ];then
export APPRUN_CMD="/opt/deepin-wine6-stable/bin/wine"
fi
if [ -f "$APPRUN_CMD" ];then
wine_path=$(dirname $APPRUN_CMD)
wine_path=$(realpath "$wine_path/../")
export WINEDLLPATH=$wine_path/lib:$wine_path/lib64
else
export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64
fi
export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64
export WINEPREDLL="$ARCHIVE_FILE_DIR/dlls"
_SetRegistryValue()
{{
env WINEPREFIX="$BOTTLEPATH" $APPRUN_CMD reg ADD "$1" /v "$2" /t "$3" /d "$4" /f
}}
DISABLE_ATTACH_FILE_DIALOG=""
##默认为空。若为1则不使用系统自带的文件选择而是使用wine的
##对于deepin/UOS大部分的应用都不需要使用wine的如果有需求比如wine应用选择的限定种类文件系统的文管不支持
##请填1。
##注意因为非DDE的环境不确定所以默认会在非Deepin/UOS发行版上禁用这个功能。如果你确认在适配的发行版上可以正常启动请注释或者删除下面这段
##############<<<<<<<<<禁用文件选择工具开始
Get_Dist_Name
#此功能实现参见开头函数段
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ];then
DISABLE_ATTACH_FILE_DIALOG="1"
echo "非deepin/UOS默认关闭系统自带的文件选择工具使用Wine的"
echo "如果你想改变这个行为,请到/opt/apps/$DEB_PACKAGE_NAME/files/$0处修改"
echo "To打包者如果你要打开自带请注意在适配的发行版上进行测试"
echo "To用户打包者没有打开这个功能这证明启用这个功能可能造成运行问题。如果你要修改这个行为请确保你有一定的动手能力"
fi
##############>>>>>>>>>禁用文件选择工具结束
##############<<<<<<<<<屏蔽mono和gecko安装器开始
##默认屏蔽mono和gecko安装器
if [ "$APPRUN_CMD" = "spark-wine7-devel" ] || [ "$APPRUN_CMD" = "spark-wine" ]|| [ "$APPRUN_CMD" = "spark-wine8" ] && [ -z "$ENABLE_DOT_NET" ];then
#export WINEDLLOVERRIDES="mscoree=d,mshtml=d,control.exe=d"
export WINEDLLOVERRIDES="control.exe=d"
#### "为了降低打包体积默认关闭gecko和momo如有需要注释此行仅对spark-wine7-devel有效"
fi
##############>>>>>>>>>屏蔽mono和gecko安装器结束
#########################执行段
if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then
export ATTACH_FILE_DIALOG=1
@@ -1058,38 +1138,18 @@ if [ -n "$EXPORT_ENVS" ];then
export $EXPORT_ENVS
fi
# 打包安装程序的情况
if [[ -z "$EXEC_PATH" ]] && [[ -n "$INSTALL_SETUP" ]];then
$START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" -c
BOTTLEPATH="$HOME/.deepinwine/$BOTTLENAME"
EXEC_PATH=$(find "$BOTTLEPATH" -name $EXEC_NAME | head -1)
if [ -z "$EXEC_PATH" ];then
_SetRegistryValue "HKCU\\Software\\Wine\\DllOverrides" winemenubuilder.exe REG_SZ
WINEPREFIX="$BOTTLEPATH" $APPRUN_CMD "$ARCHIVE_FILE_DIR/$INSTALL_SETUP"
EXEC_PATH=$(find "$BOTTLEPATH" -name $EXEC_NAME | head -1)
cp "$ARCHIVE_FILE_DIR/setup.md5sum" "$BOTTLEPATH"
fi
if [ -z "$EXEC_PATH" ];then
echo "安装失败退出"
exit
fi
fi
if [ -n "$EXEC_PATH" ];then
if [ -z "${{EXEC_PATH##*.lnk*}}" ];then
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
elif [ -z "${{EXEC_PATH##*.bat}}" ];then
$START_SHELL_PATH $BOTTLENAME $APPVER "cmd" -f /c "$EXEC_PATH" "${{@:2}}"
else
$START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
fi
elif [ -n "$ACTIVEX_NAME" ] && [ $# -gt 1 ];then
$START_SHELL_PATH $BOTTLENAME $APPVER "$1" -f "${{@:2}}"
else
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
fi
""",
"info": f'''{{
"appid": "{e1_text.text()}",
@@ -1296,7 +1356,7 @@ true
print("c")
if os.path.exists(wine[wineVersion.currentText()]):
debInformation[0]["Depends"] = ["deepin-wine-helper | com.wine-helper.deepin",
"spark-dwine-helper | store.spark-app.spark-dwine-helper"
"spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner"
][int(chooseWineHelperValue.isChecked())] #+ ["", "libasound2 (>= 1.0.16), libc6 (>= 2.28), libglib2.0-0 (>= 2.12.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628), libldap-2.4-2 (>= 2.4.7), libmpg123-0 (>= 1.13.7), libopenal1 (>= 1.14), libpcap0.8 (>= 0.9.8), libpulse0 (>= 0.99.1), libudev1 (>= 183), libvkd3d1 (>= 1.0), libx11-6, libxext6, libxml2 (>= 2.9.0), ocl-icd-libopencl1 | libopencl1, udis86, zlib1g (>= 1:1.1.4), libasound2-plugins, libncurses6 | libncurses5 | libncurses, deepin-wine-plugin-virtual\nRecommends: libcapi20-3, libcups2, libdbus-1-3, libfontconfig1, libfreetype6, libglu1-mesa | libglu1, libgnutls30 | libgnutls28 | libgnutls26, libgsm1, libgssapi-krb5-2, libjpeg62-turbo | libjpeg8, libkrb5-3, libodbc1, libosmesa6, libpng16-16 | libpng12-0, libsane | libsane1, libsdl2-2.0-0, libtiff5, libv4l-0, libxcomposite1, libxcursor1, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1, libxslt1.1, libxxf86vm1"][]
print("d")
debInformation[0]["run.sh"] = f'''#!/bin/sh
@@ -1359,6 +1419,13 @@ export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64
export WINEPREDLL="$ARCHIVE_FILE_DIR/dlls"
##### 软件在wine中的启动路径
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh"] ;then
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
else
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
fi
if [ -n "$PATCH_LOADER_ENV" ] && [ -n "$EXEC_PATH" ];then
export $PATCH_LOADER_ENV
fi
@@ -1454,7 +1521,7 @@ fi
# 都有了为什么要打包呢?
shutil.copy(wine[wineVersion.currentText()], f"{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z")
else:
self.run_command(f"7z a '{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z' '{wine[wineVersion.currentText()]}/*'")
self.run_command(f"7z a -snh -snl '{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z' '{wine[wineVersion.currentText()]}/*'")
###############
# 复制文件
###############
@@ -1847,14 +1914,14 @@ def BrowserHelperConfigPathText():
def ChangeWine():
useInstallWineArch.setEnabled(os.path.exists(wine[wineVersion.currentText()]))
debDepends.setText([f"{wine[wineVersion.currentText()]} | {wine[wineVersion.currentText()]}-bcm | {wine[wineVersion.currentText()]}-dcm | com.{wine[wineVersion.currentText()]}.deepin, deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei",
f"{wine[wineVersion.currentText()]} | {wine[wineVersion.currentText()]}-bcm | {wine[wineVersion.currentText()]}-dcm | com.{wine[wineVersion.currentText()]}.deepin, spark-dwine-helper | store.spark-app.spark-dwine-helper, fonts-wqy-microhei, fonts-wqy-zenhei"
f"{wine[wineVersion.currentText()]} | {wine[wineVersion.currentText()]}-bcm | {wine[wineVersion.currentText()]}-dcm | com.{wine[wineVersion.currentText()]}.deepin, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner, fonts-wqy-microhei, fonts-wqy-zenhei"
][int(chooseWineHelperValue.isChecked())])
debRecommend.setText("")
helperConfigPathText.setEnabled(chooseWineHelperValue.isChecked())
helperConfigPathButton.setEnabled(chooseWineHelperValue.isChecked())
if os.path.exists(wine[wineVersion.currentText()]):
debDepends.setText(["deepin-wine-helper | com.wine-helper.deepin",
"spark-dwine-helper | store.spark-app.spark-dwine-helper"
"spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner"
][int(chooseWineHelperValue.isChecked())])
#if "deepin-wine5-stable" in wine[wineVersion.currentText()]:
# debDepends.setText("libasound2 (>= 1.0.16), libc6 (>= 2.28), libglib2.0-0 (>= 2.12.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628), libldap-2.4-2 (>= 2.4.7), libmpg123-0 (>= 1.13.7), libopenal1 (>= 1.14), libpcap0.8 (>= 0.9.8), libpulse0 (>= 0.99.1), libudev1 (>= 183), libvkd3d1 (>= 1.0), libx11-6, libxext6, libxml2 (>= 2.9.0), ocl-icd-libopencl1 | libopencl1, udis86, zlib1g (>= 1:1.1.4), libasound2-plugins, libncurses6 | libncurses5 | libncurses, deepin-wine-plugin-virtual")
@@ -2202,21 +2269,18 @@ def DelTab():
def ChangeBottleName():
global bottleNameLock
global bottleNameChangeLock
e1_text.setText(e1_text.text().replace(" ", ""))
if bottleNameLock:
return
if os.path.basename(e6_text.text()) == ".wine" or e6_text.text() == "":
bottleNameChangeLock = True
e5_text.setText(e1_text.text())
return
replaceForum = [e1_text, e2_text]
for i in replaceForum:
if " " in i.text():
i.setText(i.text().replace(" ", ""))
# 进行版本号限制
if len(e2_text.text()) > 0:
if ord(e2_text.text()[0]) < 48 or ord(e2_text.text()[0]) > 57:
e2_text.setText(e2_text.text()[1:])
# 调整逻辑,容器名默认与包名相同
bottleNameChangeLock = True
e5_text.setText(os.path.basename(e6_text.text().replace(" ", "")))
e5_text.setText(e1_text.text())
def LockBottleName():
global bottleNameLock
if bottleNameChangeLock:
return
bottleNameLock = True
# 获取当前语言
def get_now_lang()->"获取当前语言":
@@ -2296,6 +2360,7 @@ tips = transla.transe("U", """提示:
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()
widget = QtWidgets.QWidget()
defaultFont = window.font()
#hScroll = QtWidgets.QScrollArea()
#hScroll.setWidget(widget)
@@ -2342,6 +2407,7 @@ option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office"
option1_text.setCurrentText("Network")
wineFrame = QtWidgets.QHBoxLayout()
chooseWineHelperValue = QtWidgets.QCheckBox(transla.transe("U", "使用星火wine helper\n如不勾选默认为deepin-wine-helper"))
chooseWineHelperValue.setVisible(False)
helperConfigPathLayout = QtWidgets.QHBoxLayout()
helperConfigPathButton = QtWidgets.QPushButton("浏览")
helperConfigPathText = QtWidgets.QLabel("点击浏览按钮指定软件包适配脚本")
@@ -2364,14 +2430,14 @@ build7z.clicked.connect(Build7zButton_Clicked)
installDeb.clicked.connect(InstallDeb)
wineFrame.addWidget(wineVersion)
e1_text.textChanged.connect(ChangeBottleName)
e5_text.textChanged.connect(LockBottleName)
e2_text.textChanged.connect(ChangeBottleName)
e6_text.textChanged.connect(ChangeBottleName)
e7_text.textChanged.connect(ChangeTapTitle)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要打包的 deb 包的包名(※必填):")), 0, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包版本号(※必填):")), 1, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包说明(※必填):")), 2, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包维护者(※必填):")), 3, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要解压 wine 容器名称(※必填):")), 4, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "Wine 容器名称(※必填,推荐默认")), 4, 0, 1, 1)
widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要打包 wine 容器的路径(※必填):")), 5, 0, 1, 1)
desktopIconTab = QtWidgets.QTabWidget()
controlWidget = QtWidgets.QWidget()
@@ -2552,7 +2618,6 @@ cleanBottonByUOS.setChecked(True)
chooseWineHelperValue.setChecked(True)
e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_all.deb")
widget.setLayout(widgetLayout)
window.setCentralWidget(widget)
window.setWindowTitle(f"wine 应用打包器 {version}")
window.setWindowIcon(QtGui.QIcon(iconPath))
window.resize(int(window.frameSize().width() * 2.1), int(window.frameSize().height()))
@@ -2625,6 +2690,20 @@ allInfoList = {
# 设置字体
SetFont(app)
#window.setWindowFlag(QtGui.Qt)
window.setCentralWidget(widget)
# 判断是否为小屏幕,是则设置滚动条并全屏
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9):
# 设置滚动条
areaScroll = QtWidgets.QScrollArea(window)
areaScroll.setWidgetResizable(True)
areaScroll.setWidget(widget)
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
window.setCentralWidget(areaScroll)
window.showMaximized() # 设置全屏
window.show()
window.show()
sys.exit(app.exec_())
# Flag解包只读control和解包全部读取

BIN
dxvk.7z

Binary file not shown.

219
dxvk/setup_dxvk.sh Executable file
View File

@@ -0,0 +1,219 @@
#!/usr/bin/env bash
function wait(){
echo Press Enter To Exit
read
}
# default directories
dxvk_lib32=${dxvk_lib32:-"x32"}
dxvk_lib64=${dxvk_lib64:-"x64"}
# figure out where we are
basedir="$(dirname "$(readlink -f "$0")")"
# figure out which action to perform
action="$1"
case "$action" in
install)
;;
uninstall)
;;
*)
echo "Unrecognized action: $action"
echo "Usage: $0 [install|uninstall] [--without-dxgi] [--symlink]"
exit 1
esac
# process arguments
shift
with_dxgi=true
file_cmd="cp -v --reflink=auto"
while (($# > 0)); do
case "$1" in
"--without-dxgi")
with_dxgi=false
;;
"--symlink")
file_cmd="ln -s -v"
;;
esac
shift
done
# check wine prefix before invoking wine, so that we
# don't accidentally create one if the user screws up
if [ -n "$WINEPREFIX" ] && ! [ -f "$WINEPREFIX/system.reg" ]; then
echo "$WINEPREFIX:"' Not a valid wine prefix.' >&2
exit 1
fi
# find wine executable
export WINEDEBUG=-all
# disable mscoree and mshtml to avoid downloading
# wine gecko and mono
export WINEDLLOVERRIDES="mscoree,mshtml="
# 专门添加,为了可以使用自定义的 wine
wine=$WINE
wine64=$WINE64
wineboot="$WINE wineboot"
if [[ $WINE == "" ]];then
wine="wine"
fi
if [[ $WINE64 == "" ]];then
wine64="wine64"
fi
# $PATH is the way for user to control where wine is located (including custom Wine versions).
# Pure 64-bit Wine (non Wow64) requries skipping 32-bit steps.
# In such case, wine64 and winebooot will be present, but wine binary will be missing,
# however it can be present in other PATHs, so it shouldn't be used, to avoid versions mixing.
wine_path=$(dirname "$(which $wineboot)")
wow64=true
if ! [ -f "$wine_path/$wine" ]; then
wine=$wine64
wow64=false
fi
# resolve 32-bit and 64-bit system32 path
winever=$($wine --version | grep wine)
if [ -z "$winever" ]; then
echo "$wine:"' Not a wine executable. Check your $wine.' >&2
exit 1
fi
# ensure wine placeholder dlls are recreated
# if they are missing
$wineboot -u
win64_sys_path=$($wine64 winepath -u 'C:\windows\system32' 2> /dev/null)
win64_sys_path="${win64_sys_path/$'\r'/}"
if $wow64; then
win32_sys_path=$($wine winepath -u 'C:\windows\system32' 2> /dev/null)
win32_sys_path="${win32_sys_path/$'\r'/}"
fi
if [ -z "$win32_sys_path" ] && [ -z "$win64_sys_path" ]; then
echo 'Failed to resolve C:\windows\system32.' >&2
wait
exit 1
fi
# create native dll override
overrideDll() {
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo -e "Failed to add override for $1"
wait
exit 1
fi
}
# remove dll override
restoreDll() {
$wine reg delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /f > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Failed to remove override for $1"
fi
}
# copy or link dxvk dll, back up original file
installFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if [ -n "$1" ]; then
if [ -f "${dstfile}" ] || [ -h "${dstfile}" ]; then
if ! [ -f "${dstfile}.old" ]; then
mv -v "${dstfile}" "${dstfile}.old"
else
rm -v "${dstfile}"
fi
$file_cmd "${srcfile}" "${dstfile}"
else
echo "${dstfile}: File not found in wine prefix" >&2
return 1
fi
fi
return 0
}
# remove dxvk dll, restore original file
uninstallFile() {
dstfile="${1}/${3}.dll"
srcfile="${basedir}/${2}/${3}.dll"
if [ -f "${srcfile}.so" ]; then
srcfile="${srcfile}.so"
fi
if ! [ -f "${srcfile}" ]; then
echo "${srcfile}: File not found. Skipping." >&2
return 1
fi
if ! [ -f "${dstfile}" ] && ! [ -h "${dstfile}" ]; then
echo "${dstfile}: File not found. Skipping." >&2
return 1
fi
if [ -f "${dstfile}.old" ]; then
rm -v "${dstfile}"
mv -v "${dstfile}.old" "${dstfile}"
return 0
else
return 1
fi
}
install() {
installFile "$win64_sys_path" "$dxvk_lib64" "$1"
inst64_ret="$?"
inst32_ret=-1
if $wow64; then
installFile "$win32_sys_path" "$dxvk_lib32" "$1"
inst32_ret="$?"
fi
if (( ($inst32_ret == 0) || ($inst64_ret == 0) )); then
overrideDll "$1"
fi
}
uninstall() {
uninstallFile "$win64_sys_path" "$dxvk_lib64" "$1"
uninst64_ret="$?"
uninst32_ret=-1
if $wow64; then
uninstallFile "$win32_sys_path" "$dxvk_lib32" "$1"
uninst32_ret="$?"
fi
if (( ($uninst32_ret == 0) || ($uninst64_ret == 0) )); then
restoreDll "$1"
fi
}
# skip dxgi during install if not explicitly
# enabled, but always try to uninstall it
if $with_dxgi || [ "$action" == "uninstall" ]; then
$action dxgi
fi
$action d3d9
$action d3d10core
$action d3d11
wait

BIN
dxvk/x32/d3d10core.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d11.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d8.dll Executable file

Binary file not shown.

BIN
dxvk/x32/d3d9.dll Executable file

Binary file not shown.

BIN
dxvk/x32/dxgi.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d10core.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d11.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d8.dll Executable file

Binary file not shown.

BIN
dxvk/x64/d3d9.dll Executable file

Binary file not shown.

BIN
dxvk/x64/dxgi.dll Executable file

Binary file not shown.

View File

@@ -1,92 +0,0 @@
___
( )
| | .-. ___ ___ .--. .--.
| |/ \ ( )( ) / \ / \
| .-. . | | | | ; ,-. ' | .-. ;
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | |/ |
| | | | | | | | | | | | | ' _.'
| | | | | | ; ' | ' | | | .'.-.
| | | | ' `-' / ' `-' | ' `-' /
(___)(___) '.__.' `.__. | `.__.'
( `-' ;
`.__.
___
( )
| |.-. .---. ___ .-. .--. ___ .-.
| / \ / .-, \ ( ) \ / \ ( ) \
| .-. | (__) ; | | ' .-. ; | .-. ; | .-. .
| | | | .'` | | / (___) | | | | | | | |
| | | | / .'| | | | | | | | | | | |
| | | | | / | | | | | | | | | | | |
| ' | | ; | ; | | | | ' | | | | | |
' `-' ; ' `-' | | | ' `-' / | | | |
`.__. `.__.'_. (___) `.__.' (___)(___)
___
( )
| |.-. ___ ___ ___ .-. ___ .-. ___ ___
| / \ ( )( ) ( ) \ ( ) \ ( )( )
| .-. | | | | | | .-. . | .-. . | | | |
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | ' | |
| | | | | | | | | | | | | | | | ' `-' |
| ' | | | | ; ' | | | | | | | | `.__. |
' `-' ; ' `-' / | | | | | | | | ___ | |
`.__. '.__.' (___)(___) (___)(___) ( )' |
; `-' '
.__.'
............ .....]OOOo]`....
... ........ ...=OOOOOOOOO\..
.../OOOOOOO`.... ..=OOO@/[\OOOOO.
..=OOOOOOOOO\... .,@OO^/....O@O@`
..OOOOOO[[OOO@`. .=OO@,...=.OOOO.
..OOOOO./O^,@OO` .=OO^....,.@OO^.
..\OOO@^...=OOOO.... .OOO^*..,`/OOO..
...\OOOOOOOooooO^... .=OO^...`=OO@`..
..=@O@OooOOOOO@`...........=@@O]].,@O@`...
.,@OoOO`...O@^......,]]]]/OOOOOOO@@... .
...\OO@]]]OOOO@@@@@@@@@@@@@@@@@@@OO.....
.....[@@OOO@@@@@@@@@@@@@@@@@@@@@@@@@@`..
..OOO@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`....
.,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\...
....=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^..
...=@@@@@@@@@@@@@@@@@@@@@@`,\@@@@@@@@@@@@@^.
..,@@@@@@@@@@@@@@@@@@@@@@@O,[].\@@@@@@@@@@@.
../@@@@@@@@@@@@O@@@@@@@@@@@......\@@@@@@@@@^
.,@@@@@@@@@@@O`.\@@@@@@@@@/........\@@@@@@@@...
.=@@@@@@@@@/.....\@@@@@@@@/`...[O`..\@@@@@@@`...
.=@@@@@@@^,O[..,`.,@@@@@/../@@O[`...,@@@@@@@....
....@@@@@@@O`,@@O[]..,@/[`..=oo@O`,^...@@@@@@@@`..
....O@@@@@@@@`,OOO@^*\.........\..../.../@`.=^..
.. ...,@^=@@@^.\`...,^...........[[......O]//...
..,\]@@@\...[`....................=@@/....
.=@@\............,]/`........../@@@\.. .
.....@@@@@\.....................,/@@@@@@\...
...=@@@@@@@@\]..............]@@@@@@@@@@@@`.
...,@@@@@@@@@@@@@@/[\O@@O/[*./@@@@@@@@@@@@@\.......
...@@@@@@@@@@@@@@@^.,O@@@@^../@@@@@@@@@@@@@@@\.....
..........@@@@@@@@@@@@@@@@@`..`\/`../@@@@@@@@@@@@@@@@@@@@]]
........,@@@@@@@@@@@@@@@@/*[\].,`]/[[@@@@@@@@@@@@@@,[[[[`..
..,O\/@@@@@@@@@@@@@@@@@@@`...........O@@O@@@@@@@@@@\....
.....\@@@@@@@@@@@@@@@@@@@OO\`,O.. .,@OOO@@@@@@@@@@. ..
..../@@@@@@@@@@@@@@OO@`.^,O. ..=@OOO@@@@@@@@@.. .
...=@@@@@@@@@@@@@@@@@O[[.... ...\@@@@@@@@@@@/.. .
...=@@@@@@@@@@@@@@,^ ....O...\@@@@@@`
....@@@@@@@@@@@@@/.. ...^/\]/[\@@@@`.
.@@@@/@@@@@@@^O..... ...,@@^]..]@/...
...\@`.[@@@@@@...... .=`@@@@@^..^....
....`....[@@@O\.[,..........OO@@@@@^.,[[....
............\@@@\`...,`**,]@@@@@@@^.........
.. .,@@@@@@@@@@@@@@@@@@/...
..O@@@@@@@@@@@@@@@@@^...
..O@@@@@@^...=@@@@@@@...
..@@@@@@@\...=@@@@@@@^..
.=@@@@@@@@...=@@@@@@@O..
.=@@@@@@@@`..=@@@@@@@@..
.=@@@O@@@@^..=@@OO@@@@^.
.O@OOOOO@O^..=@OOOOOOO^.
.Oo/[\O/\O@..=/[\O/\o*O.
.O^......=O...^......*/.
.=\.....]O^...\\...]//.. .. ........

View File

@@ -1,82 +0,0 @@
#/bin/bash
source /opt/durapps/transhell/transhell.sh
load_transhell_debug
#########>>>>>>>函数段
Get_Dist_Name()
{
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
DISTRO='Deepin'
elif grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release; then
DISTRO='UniontechOS'
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
DISTRO='UniontechOS'
else
DISTRO='OtherOS'
fi
}
#########<<<<<<<
if [ $# -lt 1 ]; then
echo "无参数无法启动。这是一个set-wine-scale的组件一般来说你不会需要单独启动这个脚本"
echo "请参考set-wine-scale.sh使用"
echo "参数为CONTAINER_PATH"
echo "只读取第一个,其他参数会被放弃"
fi
CONTAINER_PATH="$1"
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
echo "错误找不到user.reg退出。你应当在文件解压结束后调用此脚本"
echo "E: Can not find user.reg. Exit. You should use this script after the extraction"
exit 1
fi
mkdir -p $HOME/.config/spark-wine/
#####全局参数位置
#####能到这一步的说明已经是没有自定义参数了,直接读全局覆盖没问题
#####
if [ -f "$HOME/.config/spark-wine/scale.txt" ];then
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
echo "检测到已经设置过全局参数,直接复制"
echo "全局参数的位置在$HOME/.config/spark-wine/scale.txt如果需要更换请删除此文件重新生成"
exit
fi
Get_Dist_Name
if [ "$DISTRO" = "Deepin" ] || [ "$DISTRO" = "UniontechOS" ];then
echo 1.0 > $HOME/.config/spark-wine/scale.txt
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
#####就是1倍缩放
exit
fi
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0`
case "$scale_factor" in
"")
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
scale_factor="1.0"
;;
*)
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
;;
esac
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt

View File

@@ -1,186 +0,0 @@
#!/bin/bash
help() {
cat <<EOF
用法:$0 [-h|--help] [-s|--set-scale-factor] path
-h|--help 显示这个帮助
-s|--set-scale-factor 直接指定缩放。支持1.01.251.51.752.0
path 容器目录
本脚本具有超级兔力。
--------------------------------------------------------------------
Usage: $0 [-h|--help] [-s|--set-scale-factor] path
-h|--help Show this text
-s|--set-scale-factor Set scale factor direcly. Support 1.01.251.51.752.0
path Wine Container directory path
This script have super bunny power.
EOF
}
#########################帮助文件结束#############################
parse_args() {
while [ $# -gt 0 ]; do
case "$1" in
-h|--help)
help
exit
;;
-s|--set-scale-factor)
appointed_scale_factor="$2"
;;
"bunny")
cat /opt/durapps/spark-dwine-helper/scale-set-helper/bunny.txt
exit
;;
*)
CONTAINER_PATH="$1"
;;
esac
shift
done
}
################
parse_args "$@"
#####先看看PATH对不对
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
echo "错误找不到user.reg退出。你应当在文件解压结束后调用此脚本。"
echo "如果你不清楚如何使用这个脚本,请使用 $0 -h"
echo "E: Can not find user.reg. Exit. You should use this script after the extraction"
echo "If you don't know how to use this script, try $0 -h"
exit 1
fi
if [ "$appointed_scale_factor" = "" ];then
#########未指定下,读取$CONTAINER_PATH/scale.txt。如果没有优先$DEEPIN_WINE_SCALE设置然后是手动
if [ ! -f "$CONTAINER_PATH/scale.txt" ];then
echo "E: No SCALE profile found. try to use DEEPIN_WINE_SCALE"
echo "错误没有检测到缩放设置读取DEEPIN_WINE_SCALE"
if [ "$DEEPIN_WINE_SCALE" = "" ];then
echo "E: No DEEPIN_WINE_SCALE found. Use get-scale.sh to Set "
echo "错误没有检测到DEEPIN_WINE_SCALE用get-scale.sh设置"
/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh "$CONTAINER_PATH"
wine_scale=`cat $CONTAINER_PATH/scale.txt`
echo "检测到的缩放倍数为:$wine_scale"
echo "Scale is $wine_scale"
else
echo "$DEEPIN_WINE_SCALE" > $CONTAINER_PATH/scale.txt
wine_scale=`cat $CONTAINER_PATH/scale.txt`
echo "检测到的缩放倍数为:$wine_scale"
echo "Scale is $wine_scale"
fi
else
wine_scale=`cat $CONTAINER_PATH/scale.txt`
echo "检测到的缩放倍数为:$wine_scale"
echo "Scale is $wine_scale"
fi
#####非deepin发行版似乎没有这个变量暂时不清楚这个变量是哪个组件做的
else
#######指定了缩放倍数
echo "使用了--set-scale-factor直接指定"
echo "--set-scale-factor detected. Arrange directly"
if [ "$appointed_scale_factor" != "1.0" ] && [ "$appointed_scale_factor" != "1.25" ] && [ "$appointed_scale_factor" != "1.5" ] && [ "$appointed_scale_factor" != "1.75" ] && [ "$appointed_scale_factor" != "2.0" ] ;then
echo "无法识别的倍数:$appointed_scale_factor,请参看$0 -h"
echo "Unrecognizable number. Use $0 -h to get help"
exit 1
fi
#######没问题了再用
echo "$appointed_scale_factor" > $CONTAINER_PATH/scale.txt
wine_scale=`cat $CONTAINER_PATH/scale.txt`
fi
########开始设置
########如果环境变量里没指定了APPRUN_CMD在run.sh中就替换如果有就直接用来设置
if [ "$APPRUN_CMD" = "" ];then
echo "没有检测到APPRUN_CMD环境变量执行sed替换。如果要使用wine原生提供的方法请在环境变量中指定(export)"
case "$wine_scale" in
1.0*)
reg_text="\"LogPixels\"=dword:00000060"
;;
1.25*)
reg_text="\"LogPixels\"=dword:00000078"
;;
1.5*)
reg_text="\"LogPixels\"=dword:00000090"
;;
1.75*)
reg_text="\"LogPixels\"=dword:000000A8"
;;
2.0*)
reg_text="\"LogPixels\"=dword:000000C0"
;;
*)
reg_text="\"LogPixels\"=dword:00000060"
#可能不是Xorg
;;
esac
#####根据scale设置dword值
LogPixels_line=(`sed -n -e "/"LogPixels"/=" $CONTAINER_PATH/user.reg`)
#####关键词行数取得
until [ "${#LogPixels_line[@]}" = "0" ];do
line_num=${LogPixels_line[0]}
sed -i "$line_num"c\ "$reg_text" "$CONTAINER_PATH/user.reg"
LogPixels_line=(${LogPixels_line[@]:1})
done
echo "已经完成替换。位置:$CONTAINER_PATH/user.reg"
echo "在以下行数进行了替换,内容为$reg_text"
echo `sed -n -e "/"LogPixels"/=" $CONTAINER_PATH/user.reg`
echo "---------------------------------------"
else
#####用wine提供的方法
case "$wine_scale" in
1.0*)
dpi="96"
;;
1.25*)
dpi="120"
;;
1.5*)
dpi="144"
;;
1.75*)
dpi="168"
;;
2.0*)
dpi="192"
;;
*)
dpi="96"
#可能不是Xorg或者是其他错误
;;
esac
echo "$APPRUN_CMD执行指令"
echo "指令为"
echo "env WINEPREFIX="$CONTAINER_PATH" $APPRUN_CMD reg ADD 'HKCU\Control Panel\Desktop' /v LogPixels /t REG_DWORD /d $dpi /f"
env WINEPREFIX="$CONTAINER_PATH" $APPRUN_CMD reg ADD 'HKCU\Control Panel\Desktop' /v LogPixels /t REG_DWORD /d $dpi /f
fi

View File

@@ -1,8 +0,0 @@
#!/bin/bash
TRANSHELL_CONTENT_OPTION="Options"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="Your dimension is "
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="Please choose one option below"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="Setting 1.0 scale as default"
TRANSHELL_CONTENT_SCALE_IS="Scale multiple is "
TRANSHELL_CONTENT_SAVED="saved."
TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST="You can use spark wine helper settings to adjust settings"

View File

@@ -1,8 +0,0 @@
#!/bin/bash
TRANSHELL_CONTENT_OPTION="选项"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="您的分辨率是:"
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="请在以下选项中选择一个"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="默认为1倍缩放。"
TRANSHELL_CONTENT_SCALE_IS="缩放倍数为"
TRANSHELL_CONTENT_SAVED="已保存"
TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST="您可以使用星火wine助手设置来重新设置"

View File

@@ -1,109 +0,0 @@
#/bin/bash
source /opt/durapps/transhell/transhell.sh
load_transhell_debug
until [ "$IS_CLOSE" = "1" ];do
CHOSEN_SETTINGS=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
"${TRANSHELL_CONTENT_SET_GLOBAL_SCALE}" \
"${TRANSHELL_CONTENT_SET_APP_SCALE}" \
"${TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL}" \
"${TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}" `
echo "$CHOSEN_SETTINGS"
case "$CHOSEN_SETTINGS" in
"${TRANSHELL_CONTENT_SET_GLOBAL_SCALE}")
########
zenity --info --text="${TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST}" --width=500 --height=150
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0`
case "$scale_factor" in
"")
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}" --width=500 --height=150
scale_factor="1.0"
;;
*)
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}" --width=500 --height=150
;;
esac
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
;;
########
"${TRANSHELL_CONTENT_SET_APP_SCALE}")
zenity --info --text="${TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY}" --width=500 --height=150
CONTAINER_PATH=`zenity --file-selection --filename="$HOME/.deepinwine/" --directory`
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
zenity --info --text="${TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE}" --width=500 --height=150
else
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0 \
${TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL} `
case "$scale_factor" in
"")
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}" --width=500 --height=150
scale_factor="1.0"
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s $scale_factor $CONTAINER_PATH
;;
"${TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL}")
zenity --info --text="${TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL}" --width=500 --height=150
rm $CONTAINER_PATH/scale.txt
;;
*)
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}" --width=500 --height=150
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s $scale_factor $CONTAINER_PATH
;;
esac
fi
;;
"${TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL}")
find ${HOME}/.deepinwine/ -name "scale.txt" -type f -print -exec rm -rf {} \;
zenity --info --text="${TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL}\n`cd ${HOME}/.deepinwine/ && ls`" --width=500 --height=150
;;
"${TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}")
;;
*)
IS_CLOSE="1"
;;
esac
done

View File

@@ -1,18 +0,0 @@
#!/bin/bash
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="Welcome to spark wine helper settingsPlease choose one option below to excute"
TRANSHELL_CONTENT_OPTION="Options"
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="Set global scale"
TRANSHELL_CONTENT_SET_APP_SCALE="Set app scale"
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="Sync all the wine app scale with global scale in one key"
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="Note: The options above only take effect on spark-dwine-helper apps"
TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST="NoteThis option is invalid in deepin/UOS,for the script will read deepin/UOS scale settings first"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="Your dimension is "
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="Please choose one option below"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="Setting 1.0 scale as default"
TRANSHELL_CONTENT_SCALE_IS="Scale multiple is "
TRANSHELL_CONTENT_SAVED="saved."
TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY="Please choose the directory the app you want to adjust inPlease choose DIRECTORY instead of file"
TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE="Euser.reg can not be found.This is not a wine bottle"
TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL="Sync with global scale settings"
TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL="Will sync with global scale settings"
TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL="The scale settings of apps in bottle below is already syncd with global scale settings"

View File

@@ -1,18 +0,0 @@
#!/bin/bash
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="欢迎使用星火wine助手控制中心请在以下选项中选择一个执行"
TRANSHELL_CONTENT_OPTION="选项"
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="设置全局缩放"
TRANSHELL_CONTENT_SET_APP_SCALE="设置单独应用缩放"
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="一键将所有已安装应用的缩放设置改为与全局缩放一致"
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="备注以上操作仅对使用了spark-dwine-helper的应用生效"
TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST="请注意此选项对deepin/UOS无效会优先读取deepin/UOS的缩放设置进行缩放"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="您的分辨率是:"
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="请在以下选项中选择一个"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="默认为1倍缩放。"
TRANSHELL_CONTENT_SCALE_IS="缩放倍数为"
TRANSHELL_CONTENT_SAVED="已保存"
TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY="请在接下来的文件选择框选中所需的应用所在的容器文件夹(注意要选择文件夹)"
TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE="错误找不到user.reg.这不是一个wine容器"
TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL="与全局设置同步"
TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL="将会与全局设置同步"
TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL="以下容器中的应用的缩放设置已与全局设置同步"

View File

@@ -1,15 +0,0 @@
#autostart
#autostart在系统启动时自启动根据配置“autostart”文件策略预启动容器不需要用户手动启动
1.默认不会预启动任何容器
2.如果需要启动所有已运行过的容器,请将文件"autostart" 改名 "autostart.all" 示例如下:
sudo mv /opt/deepinwine/tools/autostart /opt/deepinwine/tools/autostart.all
3.如果需要启动用户自己关注的应用,那么将容器名称按行写入"autostart",格式如下:
com.qq.weixin.work.deepin
com.qq.im.deepin
com.meituxiuxiu.deepin
4.兼容原来的kill.sh逻辑

View File

@@ -1,74 +0,0 @@
#!/bin/bash
BASE_DIR="$HOME/.deepinwine/Deepin-QQ"
WINE_CMD="deepin-wine"
PUBLIC_DIR="/var/public"
SHELL_DIR="/opt/deepinwine/tools"
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
_SetRegistryValue()
{
env WINEPREFIX="$BASE_DIR" $WINE_CMD reg ADD "$1" /v "$2" /t $3 /d "$4" /f
}
_SetOverride()
{
_SetRegistryValue 'HKCU\Software\Wine\DllOverrides' "$2" REG_SZ "$1"
}
UsePublicDir()
{
if [ -z "$USE_PUBLIC_DIR" ]; then
echo "Don't use public dir"
return 1
fi
if [ ! -d "$PUBLIC_DIR" ];then
echo "Not found $PUBLIC_DIR"
return 1
fi
if [ ! -r "$PUBLIC_DIR" ];then
echo "Can't read for $PUBLIC_DIR"
return 1
fi
if [ ! -w "$PUBLIC_DIR" ];then
echo "Can't write for $PUBLIC_DIR"
return 1
fi
if [ ! -x "$PUBLIC_DIR" ];then
echo "Can't excute for $PUBLIC_DIR"
return 1
fi
return 0
}
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Please input two args, first is dpi, second is bottle name"
exit 0
fi
if (("$1" < 96)) || (($1 > 400)) ; then
echo "Invaild dpi vaule, min 96 max 400"
exit 0
fi
BASE_DIR="$HOME/.deepinwine/$2"
if UsePublicDir; then
BASE_DIR="$PUBLIC_DIR/$2"
fi
if [ ! -d "$BASE_DIR" ]; then
echo "Invaild bottle name, $2 is not exist"
exit 0
fi
$SHELL_DIR/kill.sh $2
_SetRegistryValue 'HKCU\Control Panel\Desktop' LogPixels REG_DWORD $1
exit 0

View File

@@ -1,59 +0,0 @@
#!/usr/bin/env python3
# vim: set ts=4 sw=4 fileencoding=utf-8:
# Luomio <nohappiness@gmail.com>
# Filename: dde-first-run.py
# Create Date: 27-03, 13
from os import path, rename, remove
import locale
import subprocess
import os
import shutil
import json
import math
import dbus
_action = "/opt/deepinwine/tools/sendkeys.sh"
def system_screenshot_isA():
bus = dbus.SessionBus()
keybinding = bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding")
keybinding_iface = dbus.Interface(keybinding, dbus_interface='com.deepin.daemon.Keybinding')
obj = json.loads(keybinding_iface.List())
for i in range(len(obj)):
if obj[i]['Id'] == "screenshot":
if '<Control><Alt>A' in obj[i]['Accels']:
return True
return False
def add_qq_shortcut(_name, _key, _short_cut):
if path.exists(_action):
bus = dbus.SessionBus()
keybinding = bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding")
keybinding_iface = dbus.Interface(keybinding, dbus_interface='com.deepin.daemon.Keybinding')
obj = json.loads(keybinding_iface.List())
for i in range(len(obj)):
if obj[i]['Name'] == _name:
keybinding_iface.Delete(obj[i]['Id'], obj[i]['Type'])
_, ok = keybinding_iface.Add(_name, _action+_key, _short_cut)
if ok == False:
return False
if __name__ == "__main__":
import sys
_action = os.path.realpath(os.path.dirname(sys.argv[0]))
_action = os.path.join(_action, "sendkeys.sh")
if len(sys.argv) < 4:
add_qq_shortcut(u"提取QQ消息", " z", "<Control><Alt>Z")
if system_screenshot_isA():
add_qq_shortcut(u"QQ截图", " a", "<Control><Alt>S")
else:
add_qq_shortcut(u"QQ截图", " a", "<Control><Alt>A")
sys.exit(0)
add_qq_shortcut(str(sys.argv[1]), sys.argv[2], sys.argv[3])

View File

View File

@@ -1,57 +0,0 @@
#!/bin/bash
get_value()
{
cat $1 | grep -m 1 ${2}= | awk -F = '{print $NF}' | awk -F \" '{print $2}'
}
init_bottle()
{
RUN_FILE=$1
if [ ! -f "$RUN_FILE" ];then
echo "$RUN_FILE 未安装"
return
fi
DEB_PACKAGE_NAME="$(get_value $RUN_FILE DEB_PACKAGE_NAME)"
BOTTLENAME="$(get_value $RUN_FILE BOTTLENAME)"
APPRUN_CMD="$(get_value $RUN_FILE APPRUN_CMD)"
BOTTLEPATH="$HOME/.deepinwine/$BOTTLENAME"
if [ $2 ]&&[ $2 == "-c" ];then
$RUN_FILE -c
fi
# KILL="/opt/deepinwine/tools/kill.bak"
# if [ -f $KILL ];then
# $KILL "$BOTTLENAME"
# fi
if [ -d "$BOTTLEPATH" ];then
APPRUN_CMD=${APPRUN_CMD/\$HOME/$HOME}
if [ ! -f "$APPRUN_CMD" ];then
export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64
fi
ARCHIVE_FILE_DIR="/opt/apps/$DEB_PACKAGE_NAME/files"
export WINEPREDLL="$ARCHIVE_FILE_DIR/dlls"
WINEPREFIX="$BOTTLEPATH" $APPRUN_CMD /opt/deepinwine/tools/startbottle.exe &
fi
}
AUTOSTART="/opt/deepinwine/tools/autostart"
if [ -f "$AUTOSTART.all" ];then
find /opt/apps -name run.sh | while read package;do
init_bottle $package "$@"
done
elif [ -f $AUTOSTART ];then
debs=`cat $AUTOSTART`
for deb in $debs
do
debname=`echo $deb | sed -e 's/\s//g'`
init_bottle "/opt/apps/$debname/files/run.sh" "$@"
done
fi

View File

@@ -1,58 +0,0 @@
#!/bin/bash
DEB_PACKAGE_NAME="com.qq.im.deepin"
get_value()
{
cat $1 | grep -m 1 ${2}= | awk -F = '{print $NF}' | awk -F \" '{print $2}'
}
if [ -n "$1" ];then
DEB_PACKAGE_NAME="$1"
fi
RUN_FILE="/opt/apps/$DEB_PACKAGE_NAME/files/run.sh"
if [ ! -f "$RUN_FILE" ];then
echo "$DEB_PACKAGE_NAME 未安装"
exit
fi
BOTTLENAME="$(get_value $RUN_FILE BOTTLENAME)"
APPRUN_CMD="$(get_value $RUN_FILE APPRUN_CMD)"
BOTTLEPATH="$HOME/.deepinwine/$BOTTLENAME"
bottle_started()
{
ps -ef | grep startbottle.exe | while read startb;do
starts=(${startb// / })
envfile=/proc/${starts[1]}/environ
if [ -f $envfile ];then
grep -c $BOTTLENAME /proc/${starts[1]}/environ > /dev/null
if [ $? -eq 0 ];then
echo ${starts[1]}
break
fi
fi
done
}
if [ "$(bottle_started)" ];then
exit
fi
$RUN_FILE -c
if [ -d "$BOTTLEPATH" ];then
APPRUN_CMD=${APPRUN_CMD/\$HOME/$HOME}
if [ ! -f "$APPRUN_CMD" ];then
export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64
fi
ARCHIVE_FILE_DIR="/opt/apps/$DEB_PACKAGE_NAME/files"
export WINEPREDLL="$ARCHIVE_FILE_DIR/dlls"
WINEPREFIX="$BOTTLEPATH" $APPRUN_CMD /opt/deepinwine/tools/startbottle.exe &
fi

View File

@@ -1 +0,0 @@
../../deepin-box86/stable/box86

Binary file not shown.

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env python3
# vim: set ts=4 sw=4 fileencoding=utf-8:
# Luomio <nohappiness@gmail.com>
# Filename: dde-first-run.py
# Create Date: 27-03, 13
import dbus
def get_tray_window():
bus = dbus.SessionBus()
traymanager = bus.get_object("com.deepin.dde.TrayManager", "/com/deepin/dde/TrayManager")
traymanager_iface = dbus.Interface(traymanager, dbus_interface='org.freedesktop.DBus.Properties')
windows = traymanager_iface.Get("com.deepin.dde.TrayManager","TrayIcons")
str="window_id:"
for i in range(len(windows)):
str += '{:#x} '.format(windows[i])
print(str)
if __name__ == "__main__":
get_tray_window()

View File

@@ -1,291 +0,0 @@
#!/bin/bash
APP_NAME="QQ"
LOG_FILE=$0
SHELL_DIR=${0%/*}
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
PUBLIC_DIR="/var/public"
UsePublicDir()
{
if [ -z "$USE_PUBLIC_DIR" ]; then
echo "Don't use public dir"
return 1
fi
if [ ! -d "$PUBLIC_DIR" ];then
echo "Not found $PUBLIC_DIR"
return 1
fi
if [ ! -r "$PUBLIC_DIR" ];then
echo "Can't read for $PUBLIC_DIR"
return 1
fi
if [ ! -w "$PUBLIC_DIR" ];then
echo "Can't write for $PUBLIC_DIR"
return 1
fi
if [ ! -x "$PUBLIC_DIR" ];then
echo "Can't excute for $PUBLIC_DIR"
return 1
fi
return 0
}
WINE_BOTTLE="$HOME/.deepinwine"
if UsePublicDir;then
WINE_BOTTLE="$PUBLIC_DIR"
fi
get_wine_by_pid()
{
wine_path=$(cat /proc/$1/maps | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1 | awk '{print $6}')
if [ -z "$wine_path" ];then
cat /proc/$1/cmdline| xargs -0 -L1 -I{} echo {} | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1
else
echo $wine_path
fi
}
is_wine_process()
{
wine_module=$(get_wine_by_pid $1)
if [ -z "$wine_module" ];then
wine_module=$(cat /proc/$1/maps | grep -E "\/wineserver$" | head -1)
fi
echo $wine_module
}
set_emu_by_pid()
{
emu_cmd=$(xargs -0 printf '%s\n' < /proc/$1/environ | grep ^EMU_CMD=)
emu_args=$(xargs -0 printf '%s\n' < /proc/$1/environ | grep ^EMU_ARGS=)
if [ -n "$emu_cmd" ];then
export "$emu_cmd"
fi
if [ -n "$emu_args" ];then
export "$emu_args"
fi
debug_log_to_file "$1 EMU_CMD: $EMU_CMD, EMU_ARGS: $EMU_ARGS"
}
get_prefix_by_pid()
{
WINE_PREFIX=$(xargs -0 printf '%s\n' < /proc/$1/environ | grep WINEPREFIX)
WINE_PREFIX=${WINE_PREFIX##*=}
if [ -z "$WINE_PREFIX" ] && [ -n "$(is_wine_process $1)" ]; then
#不指定容器的情况用默认容器目录
WINE_PREFIX="$HOME/.wine"
fi
if [ -n "$WINE_PREFIX" ];then
WINE_PREFIX=$(realpath $WINE_PREFIX)
echo $WINE_PREFIX
fi
}
get_wineserver_pid()
{
if [ -z "$1" ];then
return
fi
targ_prefix=$(realpath $1)
for server_pid in $(ps -ef | grep wineserver | awk '{print $2}') ;do
server_prefix=$(get_prefix_by_pid $server_pid)
debug_log_to_file "get server pid $server_pid, prefix: $server_prefix"
if [ "$targ_prefix" = "$server_prefix" ];then
echo $server_pid
return
fi
done
}
init_log_file()
{
if [ -d "$DEBUG_LOG" ];then
LOG_DIR=$(realpath $DEBUG_LOG)
if [ -d "$LOG_DIR" ];then
LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log"
echo "" > "$LOG_FILE"
debug_log "LOG_FILE=$LOG_FILE"
fi
fi
}
debug_log_to_file()
{
if [ -d "$DEBUG_LOG" ];then
strDate=$(date)
echo -e "${strDate}:${1}" >> "$LOG_FILE"
fi
}
debug_log()
{
strDate=$(date)
echo "${strDate}:${1}"
}
init_log_file
get_bottle_path_by_process_id()
{
PID_LIST="$1"
PREFIX_LIST=""
for pid_var in $PID_LIST ; do
WINE_PREFIX=$(get_prefix_by_pid $pid_var)
#去掉重复项
for bottle_path in $(echo -e $PREFIX_LIST) ; do
if [[ $bottle_path == "$WINE_PREFIX" ]]; then
WINE_PREFIX=""
fi
done
if [ -d "$WINE_PREFIX" ]; then
debug_log_to_file "found $pid_var : $WINE_PREFIX"
PREFIX_LIST+="\n$WINE_PREFIX"
fi
done
echo -e $PREFIX_LIST
}
get_pid_by_process_name()
{
PID_LIST=""
for pid_var in $(ps -ef | grep -E -i "$1" | grep -v grep | awk '{print $2}');do
#通过判断是否加载wine来判断是不是wine进程
if [ -n "$(is_wine_process $pid_var)" ];then
PID_LIST+=" $pid_var"
fi
done
echo "$PID_LIST"
}
get_bottle_path_by_process_name()
{
PID_LIST=$(get_pid_by_process_name $1)
debug_log_to_file "get pid list: $PID_LIST"
get_bottle_path_by_process_id "$PID_LIST"
}
get_bottle_path()
{
if [ -z "$1" ];then
return 0
fi
if [ -f "$1/user.reg" ]; then
realpath "$1"
return 0
fi
if [ -f "$WINE_BOTTLE/$1/user.reg" ]; then
realpath "$WINE_BOTTLE/$1"
return 0
fi
get_bottle_path_by_process_name "$1"
}
get_wineserver_path_by_pid()
{
server_info=$(ps -ef | grep -E "${1}.*wineserver" | grep -v grep)
debug_log_to_file "get server info $server_info"
WINESERVER=$(echo $server_info | awk '{print $NF}')
if [ ! -f "$WINESERVER" ];then
WINESERVER=$(echo $server_info | awk '{print $(NF-1)}')
WINESERVER=${WINESERVER%*.real}
fi
debug_log_to_file "get server $WINESERVER"
}
kill_app()
{
debug_log "try to kill $1"
for bottle_path in $(get_bottle_path $1); do
if [ -n "$bottle_path" ];then
server_pid=$(get_wineserver_pid "$bottle_path")
if [ -z "$server_pid" ];then
continue
fi
set_emu_by_pid $server_pid
get_wineserver_path_by_pid $server_pid
if [ -f "$WINESERVER" ];then
debug_log "kill $bottle_path by $WINESERVER"
# 兼容arm版本通过模拟器运行
env WINEPREFIX="$bottle_path" $EMU_CMD $EMU_ARGS "$WINESERVER" -k
fi
fi
done
#Kill defunct process
ps -ef | grep -E "$USER.*exe.*<defunct>"
ps -ef | grep -E "$USER.*exe.*<defunct>" | grep -v grep | awk '{print $2}' | xargs -i kill -9 {}
}
get_tray_window()
{
$SHELL_DIR/get_tray_window | awk -F: '{print $2}'
}
get_stacking_window()
{
xprop -root _NET_CLIENT_LIST_STACKING | awk -F# '{print $2}' | sed -e 's/, / /g'
}
get_window_pid()
{
for winid in $(echo "$1" | sed -e 's/ /\n/g') ;
do
xprop -id $winid _NET_WM_PID | awk -F= '{print $2}'
done
}
get_window_bottle()
{
debug_log_to_file "get_window_bottle $1"
PID_LIST=$(get_window_pid "$1")
debug_log_to_file "get_window_bottle pid list: $PID_LIST"
get_bottle_path_by_process_id "$PID_LIST"
}
get_active_bottles()
{
TRAYWINDOWS=$(get_tray_window)
STACKINGWINDOWS=$(get_stacking_window)
debug_log_to_file "tray window id: $TRAYWINDOWS"
debug_log_to_file "stacking window id: $STACKINGWINDOWS"
PID_LIST="$TRAYWINDOWS $STACKINGWINDOWS"
get_window_bottle "$PID_LIST"
}
kill_exit_block_app()
{
TAGBOTTLE=$(get_bottle_path $1)
debug_log "tag bottle: $TAGBOTTLE"
ACTIVEBOTTLES=$(get_active_bottles)
debug_log "active bottles: $ACTIVEBOTTLES"
if [[ "$ACTIVEBOTTLES" != *"$TAGBOTTLE"* ]]; then
kill_app "$TAGBOTTLE"
fi
}
#get_active_bottles
#exit
debug_log "kill $1 $2"
if [ -n "$1" ]; then
APP_NAME="$1"
fi
if [ "$2" = "block" ]; then
kill_exit_block_app $APP_NAME $3
else
kill_app $APP_NAME
fi

View File

@@ -1,44 +0,0 @@
#!/bin/bash
BOTTLE_NAME="Deepin-QQ"
DEBUG_MSG="+pid,+tid,+timestamp"
SHELL_DIR=$(dirname $0)
SHELL_DIR=$(realpath "$SHELL_DIR")
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
if [ -n "$1" ]; then
BOTTLE_NAME="$1"
fi
if [ -n "$2" ]; then
DEBUG_MSG="$2"
fi
RUN_CMD="/opt/deepinwine/apps/${BOTTLE_NAME}/run.sh"
if [ ! -f "$RUN_CMD" ]; then
RUN_CMD="/opt/apps/$BOTTLE_NAME/files/run.sh"
if [ ! -f "$RUN_CMD" ]; then
echo "Invaild bottle name, $BOTTLE_NAME is not exist"
exit 0
fi
fi
mkdir $HOME/log &> /dev/null
export DEBUG_LOG="$HOME/log"
dpkg -l | grep "Deepin Wine" > $HOME/log/${BOTTLE_NAME}.log
dpkg -l | grep deepin-wine >> $HOME/log/${BOTTLE_NAME}.log
ps -ef | grep -i c: >> $HOME/log/${BOTTLE_NAME}.log
$SHELL_DIR/kill.sh ${BOTTLE_NAME}
if [ -z "$3" ]; then
WINEDEBUG=${DEBUG_MSG} $RUN_CMD &>> $HOME/log/${BOTTLE_NAME}.log &
else
WINEDEBUG=${DEBUG_MSG} $RUN_CMD -u "$3" &>> $HOME/log/${BOTTLE_NAME}.log &
fi
dde-file-manager $HOME/log &> /dev/null &

View File

@@ -1,51 +0,0 @@
#!/bin/bash
#$1 link path
#$2 real path
Update_link()
{
if [ -f "$1" ];then
echo "$1 is a file"
rm "$1"
fi
if [ -L "$1" ];then
real_path=$(realpath $1)
echo "${1} is a symlink, $real_path"
if [ "$2" = "$real_path" ];then
echo "not need create"
return
fi
rm "$1"
fi
link_dir=$(dirname "$1")
mkdir -p "$link_dir"
echo "link $1 to $2"
ln -s "$2" "$1"
}
map_lp()
{
ls /dev/lp* |\
while read line; do
Update_link "${HOME}/.deepinwine/lp0" "$line"
return
done
}
map_serial()
{
i=0
COMS=("COM1" "COM2" "COM3" "COM4")
dmesg | grep -E "0000:01.*tty" | awk '{print $4}'|\
while read line;do
ttypath=$(echo "/dev/$line")
compath=$(echo "${HOME}/.deepinwine/${COMS[i]}")
let "i++"
Update_link "$compath" "$ttypath"
done
}
map_lp
map_serial

View File

@@ -1,40 +0,0 @@
#!/bin/bash
APPS="Deepin-QQ Deepin-QQLigth"
WINE_CMD="deepin-wine5-stable"
RE_TAG="Source Han Sans SC Regular"
WINE_PREFIX=""
_SetRegistryValue()
{
env WINEPREFIX="$WINE_PREFIX" $WINE_CMD reg ADD "$1" /v "$2" /t $3 /d "$4"
}
_DeleteRegistryValue()
{
env WINEPREFIX="$WINE_PREFIX" $WINE_CMD reg DELETE "$1" /v "$2"
}
_SetFontReplacements()
{
echo "$1 -> $2"
# _DeleteRegistryValue 'HKCU\Software\Wine\\Fonts\Replacements' "$1"
_SetRegistryValue 'HKCU\Software\Wine\\Fonts\Replacements' "$1" REG_SZ "$2"
}
if [ -z "$1" ]; then
echo "No font name"
exit 0
fi
if [ -n "$2" ]; then
RE_TAG="$2"
fi
for name in ${APPS}; do
WINE_PREFIX="$HOME/.deepinwine/$name"
echo $WINE_PREFIX
if [ -d "$WINE_PREFIX" ]; then
_SetFontReplacements "$1" "$RE_TAG"
fi
done

View File

@@ -1,787 +0,0 @@
#!/bin/bash
# Copyright (C) 2016 Deepin, Inc.
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
APPVER="@deb_version_string@"
APPTAR="files.7z"
BOTTLENAME=""
WINE_CMD="deepin-wine"
CREATE_BOTTLE=""
LOG_FILE=$0
init_log_file()
{
if [ ! -d "$DEBUG_LOG" ];then
return
fi
LOG_DIR=$(realpath $DEBUG_LOG)
if [ -d "$LOG_DIR" ];then
LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log"
echo "" > "$LOG_FILE"
debug_log "LOG_FILE=$LOG_FILE"
fi
}
debug_log_to_file()
{
if [ -d "$DEBUG_LOG" ];then
strDate=$(date)
echo -e "${strDate}:${1}" >> "$LOG_FILE"
fi
}
debug_log()
{
strDate=$(date)
echo "${strDate}:${1}"
}
init_log_file
_SetRegistryValue()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg ADD "$1" /v "$2" /t $3 /d "$4" /f
}
_DeleteRegistry()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg DELETE "$1" /f &> /dev/null
}
_SetOverride()
{
_SetRegistryValue 'HKCU\Software\Wine\DllOverrides' "$2" REG_SZ "$1"
}
_DisableAliUpdate()
{
if [ -f "${WINEPREFIX}/.disable" ];then
return
fi
debug_log "Disable AliUpdate"
touch ${WINEPREFIX}/.disable
/opt/deepinwine/tools/kill.sh AliWorkbench block
VERSIONS=$(ls ${WINEPREFIX}'/drive_c/Program Files/AliWorkbench' | grep -E '*.*.*N')
VERSIONS=$(echo $VERSIONS | awk '{print $2}')
debug_log $VERSIONS
if [ -n "$VERSIONS" ];then
debug_log "Remove bottle"
rm -rf "$WINEPREFIX"
/opt/deepinwine/apps/Deepin-QianNiu/run.sh -c
fi
_SetOverride "" "AliUpdate"
}
HelpApp()
{
echo " Extra Commands:"
echo " -r/--reset Reset app to fix errors"
echo " -e/--remove Remove deployed app files"
echo " -h/--help Show program help info"
}
FixLink()
{
if [ -d ${WINEPREFIX} ]; then
CUR_DIR=$PWD
cd "${WINEPREFIX}/dosdevices"
rm c: z:
ln -s -f ../drive_c c:
ln -s -f / z:
cd $CUR_DIR
ls -l "${WINEPREFIX}/dosdevices"
fi
}
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
uridecode()
{
local path=$(urldecode "$1")
path=${path/file:\/\//}
echo $path
}
get_bottle_path_by_process_id()
{
PID_LIST="$1"
PREFIX_LIST=""
for pid_var in $PID_LIST ; do
WINE_PREFIX=$(xargs -0 printf '%s\n' < /proc/$pid_var/environ | grep WINEPREFIX)
WINE_PREFIX=${WINE_PREFIX##*=}
for path in $(echo -e $PREFIX_LIST) ; do
if [[ $path == "$WINE_PREFIX" ]]; then
WINE_PREFIX=""
fi
done
if [ -d "$WINE_PREFIX" ]; then
debug_log_to_file "found $pid_var : $WINE_PREFIX"
PREFIX_LIST+="\n$WINE_PREFIX"
fi
done
echo -e $PREFIX_LIST | grep $HOME
}
get_bottle_path_by_process_name()
{
PID_LIST=$(ps -ef | grep -E -i "c:.*${1}" | grep -v grep | awk '{print $2}')
debug_log_to_file "get pid list: $PID_LIST"
get_bottle_path_by_process_id "$PID_LIST"
}
CallYMDY()
{
SERVER_BOTTLE=$(get_bottle_path_by_process_name sqlservr.exe | grep $WINEPREFIX)
if [ -z "$SERVER_BOTTLE" ]; then
debug_log "Starting SQL Server ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Microsoft SQL Server\\MSSQL\\Binn\\sqlservr.exe" -s MSSQLSERVER &
else
debug_log "SQL Server is running in $SERVER_BOTTLE"
fi
if [ "autostart" == "$1" ]; then
debug_log "Auto start SQL Server"
elif [ "tongji" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\旗帜软件\\党内信息管理系统(统计版)\\CReport.exe" &
elif [ "createdb" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\旗帜软件\\党内信息管理系统(统计版)\\数据库安装\\SetupDb.exe" &
elif [ "servermanger" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Microsoft SQL Server\\80\\Tools\\Binn\\sqlmangr.exe" /n &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\旗帜软件\\党内信息管理系统(统计版)\\QZCPMIS.exe" &
fi
}
CallYMGWY()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
elif [ "tongji" == "$1" ]; then
firefox "http://127.0.0.1:64022/hzbtj" &
else
firefox "http://127.0.0.1:64022/hzb" &
fi
}
CallATM()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
if [ ! -f "$WINEPREFIX/drive_c/Program Files/TradeManager/AliIM.exe" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\deepin\\AliIM2015_ATM.exe"
fi
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\TradeManager\\AliIM.exe" &
fi
}
CallMaxthon2()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Maxthon2\\Maxthon.exe" &
fi
}
CallQIANNIU()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
_DisableAliUpdate
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\AliWorkbench\\AliWorkbench.exe" &
fi
}
CallYMPOPS()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\全国持久性有机污染物统计年报信息管理系统(2017)\\POPs.exe" &
fi
}
CallYMRLZY()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\人力资源社会保障统计报表系统SMIS2012\\bin\\Omni.exe" &
fi
}
CallYMDATJ()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
if [ ! -f "$WINEPREFIX/drive_c/Program Files/JoinCheer/全国档案事业统计年报信息管理系统/ReportE.exe" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\deepin\\install\\setup.exe"
fi
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\JoinCheer\\全国档案事业统计年报信息管理系统\\ReportE.exe" &
fi
}
CallYMWZXX()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\全国政府网站信息报送客户端\\UFReader.exe" &
fi
}
CallRTX2015()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
cd "$WINEPREFIX/drive_c/Program Files/Tencent/RTXC"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\RTXC\\RTX.exe" &
fi
}
CallYMRDWS()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\饮用水水源环境基础信息采集系统\\RDWS.exe" &
fi
}
CallQQGame()
{
debug_log "run $1"
/opt/deepinwine/tools/kill.sh QQMicroGameBox block
env WINEPREFIX="$WINEPREFIX" /opt/deepinwine/tools/QQGameRunner $1 &
}
CallWXWork()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
/opt/deepinwine/tools/kill.sh WXWork.exe block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\WXWork\\WXWork.exe" &
fi
}
CallRTX2009()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
cd "$WINEPREFIX/drive_c/Program Files/Tencent/RTXC"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\RTXC\\RTX.exe" &
fi
}
CallIrfanView()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
OPEN_FILE=$(uridecode $1)
if [ -f "$OPEN_FILE" ]; then
OPEN_FILE=$(realpath "$OPEN_FILE")
OPEN_FILE="z:$OPEN_FILE"
debug_log "fond file $OPEN_FILE"
OPEN_FILE=$(echo $OPEN_FILE | sed -e 's/\//\\\\/g')
fi
echo "file path: $OPEN_FILE"
if [ -n "$OPEN_FILE" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\IrfanView\\i_view32.exe" "$OPEN_FILE" &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\IrfanView\\i_view32.exe" &
fi
fi
}
CallQQ()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
/opt/deepinwine/tools/add_hotkeys
/opt/deepinwine/tools/fontconfig
touch "$WINEPREFIX/../.QQ_run"
fi
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
#Auto kill block process
/opt/deepinwine/tools/kill.sh QQ.exe block
debug_log "start running..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\QQ\\Bin\\QQ.exe" &
fi
}
CallTIM()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
/opt/deepinwine/tools/add_hotkeys
/opt/deepinwine/tools/fontconfig
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
touch $WINEPREFIX/../.QQ_run
fi
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
#Auto kill block process
/opt/deepinwine/tools/kill.sh TIM.exe block
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
debug_log "start running..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\TIM\\Bin\\TIM.exe" &
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"
fi
}
fun1(){
xwininfo -root -children | grep -E -i "WeChat.exe.*Wine.*60x60"
}
CallWeChat()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
debug_log "Disable auto update"
_DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "UpdateFailCnt"
_DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "NeedUpdateType"
rm "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WeChat/All Users/config/configEx.ini"
export DISABLE_RENDER_CLIPBOARD=1
export ATTACH_FILE_DIALOG=1
debug_log "start running..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\WeChat\\WeChat.exe" &
fi
}
CallFoobar2000()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\foobar2000\\foobar2000.exe" &
fi
}
Call7zip()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\7-Zip\\7zFM.exe" &
fi
}
Callgtjafuyi()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\GTJA\\RichEZ\\TdxW.exe" &
fi
}
CallAAAlog()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\AAALOGO\\alogo.exe" &
fi
}
CallWinRAR()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\WinRAR\\WinRAR.exe" &
fi
}
Call360Zip()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\360\\360zip\\360zip.exe" &
fi
}
CallJCJCJSC()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\金长江网上交易\\金长江网上交易财智版\\tdxw.exe" &
fi
}
CallQQEIM()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\QQEIM\\Bin\\QQEIM.exe" &
fi
}
CallMTXX()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Meitu\\XiuXiu\\XiuXiu.exe " &
fi
}
CallDecryptDoc()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\DecryptDoc.exe " &
fi
}
CallYNote()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Youdao\\YoudaoNote\\YoudaoNote.exe " &
fi
}
CallQQCRM()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Tencent\\BizQQ\\Bin\\QQCRM.exe" &
fi
}
CallPRCReader()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Founder\\Apabi Reader 4.0\\ApaReader.exe" &
fi
}
CallMiniCADSee()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\CAD迷你看图\\DWGView.exe" &
fi
}
CallCMBChina()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
/opt/deepinwine/tools/kill.sh PersonalBankPortal.exe block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\windows\\system32\\PersonalBankPortal.exe" &
fi
}
CallWangWang()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
xdg-mime default deepin.com.taobao.wangwang.desktop x-scheme-handler/aliim
chmod 700 "$WINEPREFIX/drive_c/Program Files/AliWangWang/9.12.10C/wwbizsrv.exe"
chmod 700 "$WINEPREFIX/drive_c/Program Files/Alibaba/wwbizsrv/wwbizsrv.exe"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\AliWangWang\\9.12.10C\\WWCmd.exe" "$1" &
fi
}
CallEM263()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\263\\263 Enterprise Messenger\\263em.exe " &
fi
}
CallThunderSpeed()
{
if [ "autostart" == "$1" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
else
/opt/deepinwine/tools/kill.sh Thunder.exe block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\Program Files\\Thunder Network\\Thunder\\Program\\Thunder.exe" &
fi
}
CallApp()
{
FixLink
debug_log "CallApp $BOTTLENAME $1 $2"
case $BOTTLENAME in
"Deepin-WangWang")
CallWangWang "$1" "$2"
;;
"Deepin-ThunderSpeed")
CallThunderSpeed "$1" "$2"
;;
"Deepin-EM263")
CallEM263 "$1" "$2"
;;
"Deepin-MTXX")
CallMTXX "$1" "$2"
;;
"Deepin-PRCReader")
CallPRCReader "$1" "$2"
;;
"Deepin-MiniCADSee")
CallMiniCADSee "$1" "$2"
;;
"Deepin-CMBChina")
CallCMBChina "$1" "$2"
;;
"Deepin-DecryptDoc")
CallDecryptDoc "$1" "$2"
;;
"Deepin-YNote")
CallYNote "$1" "$2"
;;
"Deepin-Maxthon")
CallMaxthon2 "$1" "$2"
;;
"Deepin-Foobar2000")
CallFoobar2000 "$1" "$2"
;;
"Deepin-QQCRM")
CallQQCRM "$1" "$2"
;;
"Deepin-QQEIM")
CallQQEIM "$1" "$2"
;;
"com.95579.cjsc")
CallJCJCJSC "$1" "$2"
;;
"Deepin-360YaSuo")
Call360Zip "$1" "$2"
;;
"Deepin-WinRAR")
CallWinRAR "$1" "$2"
;;
"Deepin-AAAlog")
CallAAAlog "$1" "$2"
;;
"com.gtja.fuyi")
Callgtjafuyi "$1" "$2"
;;
"Deepin-7zip")
Call7zip "$1" "$2"
;;
"Deepin-QQ")
CallQQ "$1" "$2"
;;
"Deepin-TIM")
CallTIM "$1" "$2"
;;
"Deepin-RTX2015")
CallRTX2015 "$1" "$2"
;;
"Deepin-RTX2009")
CallRTX2009 "$1" "$2"
;;
"Deepin-IrfanView")
CallIrfanView "$1" "$2"
;;
"Deepin-YMRDWS")
CallYMRDWS "$1" "$2"
;;
"Deepin-WeChat")
CallWeChat "$1" "$2"
;;
"Deepin-wangzhanxinxi")
CallYMWZXX "$1" "$2"
;;
"Deepin-dangantongji")
CallYMDATJ "$1" "$2"
;;
"Deepin-renliziyuan")
CallYMRLZY "$1" "$2"
;;
"Deepin-YMPOPS")
CallYMPOPS "$1" "$2"
;;
"Deepin-YMDY")
CallYMDY "$1" "$2"
;;
"Deepin-YMGWY")
CallYMGWY "$1" "$2"
;;
"Deepin-QQHlddz")
CallQQGame 363 "$1" "$2"
;;
"Deepin-QQHlmj")
CallQQGame 1101070761 "$1" "$2"
;;
"Deepin-QQWzry")
CallQQGame 1106084547 "$1" "$2"
;;
"Deepin-QQMnsj")
CallQQGame 1105856612 "$1" "$2"
;;
"Deepin-QQBydr")
CallQQGame 1104632801 "$1" "$2"
;;
"Deepin-QQJlhmjq")
CallQQGame 1105370739 "$1" "$2"
;;
"Deepin-QQXwsd")
CallQQGame 1101328322 "$1" "$2"
;;
"Deepin-QQDldl")
CallQQGame 1105208044 "$1" "$2"
;;
"Deepin-QQSszb")
CallQQGame 1105640244 "$1" "$2"
;;
"Deepin-QQCszj")
CallQQGame 1105974527 "$1" "$2"
;;
"Deepin-WXWork")
CallWXWork "$1" "$2"
;;
"Deepin-QianNiu")
CallQIANNIU "$1" "$2"
;;
"Deepin-ATM")
CallATM "$1" "$2"
;;
*)
debug_log "unkown bottle $BOTTLENAME"
;;
esac
}
ExtractApp()
{
$SHELL_DIR/deepin-wine-banner unpack &
mkdir -p "$1"
7z x "$APPDIR/$APPTAR" -o"$1"
mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER"
sed -i "s#@current_user@#$USER#" $1/*.reg
$SHELL_DIR/deepin-wine-banner unpacked
}
DeployApp()
{
ExtractApp "$WINEPREFIX"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RemoveApp()
{
rm -rf "$WINEPREFIX"
}
ResetApp()
{
debug_log "Reset $PACKAGENAME....."
read -p "* Are you sure?(Y/N)" ANSWER
if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" -o -z "$ANSWER" ]; then
EvacuateApp
DeployApp
CallApp
fi
}
UpdateApp()
{
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
return
fi
if [ -d "${WINEPREFIX}.tmpdir" ]; then
rm -rf "${WINEPREFIX}.tmpdir"
fi
ExtractApp "${WINEPREFIX}.tmpdir"
/opt/deepinwine/tools/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
rm -rf "${WINEPREFIX}.tmpdir"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RunApp()
{
$SHELL_DIR/deepin-wine-banner
if [[ $? != 0 ]]; then
debug_log "检测到 deepin-wine-banner 运行, exit 1"
exit 1
fi
$SHELL_DIR/deepin-wine-banner start &
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
CallApp "$1" "$2"
}
CreateBottle()
{
CREATE_BOTTLE="1"
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
}
# Check if some visual feedback is possible
if command -v zenity >/dev/null 2>&1; then
progressbar()
{
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close --no-cancel ||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
}
else
progressbar()
{
cat -
}
fi
if [ -z $1 ] || [ -z $2 ]; then
debug_log "Invalid params"
exit 0
fi
BOTTLENAME="$1"
WINEPREFIX="$HOME/.deepinwine/$1"
APPDIR="/opt/deepinwine/apps/$1"
APPVER="$2"
debug_log "Run $1 $2"
if [ -z "$WINE_WMCLASS" ]; then
export WINE_WMCLASS="$DEB_PACKAGE_NAME"
fi
if [ -z "$3" ]; then
RunApp
exit 0
fi
case $3 in
"-r" | "--reset")
ResetApp
;;
"-cb" | "--create")
CreateBottle
;;
"-e" | "--remove")
RemoveApp
;;
"-u" | "--uri")
RunApp "$4" "$5"
;;
"-h" | "--help")
HelpApp
;;
*)
echo "Invalid option: $3"
echo "Use -h|--help to get help"
exit 1
;;
esac
exit 0

View File

@@ -1 +0,0 @@
run_v4.sh

View File

@@ -1,536 +0,0 @@
#!/bin/bash
# Copyright (C) 2016 Deepin, Inc.
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
APPVER="@deb_version_string@"
APPTAR="files.7z"
BOTTLENAME=""
WINE_CMD="deepin-wine"
CREATE_BOTTLE=""
LOG_FILE=$0
init_log_file()
{
if [ ! -d "$DEBUG_LOG" ];then
return
fi
LOG_DIR=$(realpath $DEBUG_LOG)
if [ -d "$LOG_DIR" ];then
LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log"
echo "" > "$LOG_FILE"
debug_log "LOG_FILE=$LOG_FILE"
fi
}
debug_log_to_file()
{
if [ -d "$DEBUG_LOG" ];then
echo -e "${1}" >> "$LOG_FILE"
fi
}
debug_log()
{
echo "${1}"
}
init_log_file
_SetRegistryValue()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg ADD "$1" /v "$2" /t $3 /d "$4" /f
}
_DeleteRegistry()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg DELETE "$1" /f &> /dev/null
}
_SetOverride()
{
_SetRegistryValue 'HKCU\Software\Wine\DllOverrides' "$2" REG_SZ "$1"
}
_DisableAliUpdate()
{
if [ -f "${WINEPREFIX}/.disable" ];then
return
fi
debug_log "Disable AliUpdate"
touch ${WINEPREFIX}/.disable
/opt/deepinwine/tools/kill.sh AliWorkbench block
VERSIONS=$(ls ${WINEPREFIX}'/drive_c/Program Files/AliWorkbench' | grep -E '*.*.*N')
VERSIONS=$(echo $VERSIONS | awk '{print $2}')
debug_log $VERSIONS
if [ -n "$VERSIONS" ];then
debug_log "Remove bottle"
rm -rf "$WINEPREFIX"
/opt/deepinwine/apps/Deepin-QianNiu/run.sh -c
fi
_SetOverride "" "AliUpdate"
}
HelpApp()
{
echo " Extra Commands:"
echo " -r/--reset Reset app to fix errors"
echo " -e/--remove Remove deployed app files"
echo " -h/--help Show program help info"
}
FixLink()
{
if [ -d ${WINEPREFIX} ]; then
CUR_DIR=$PWD
cd "${WINEPREFIX}/dosdevices"
rm c: z: y:
ln -s -f ../drive_c c:
ln -s -f / z:
ln -s -f $HOME y:
cd $CUR_DIR
ls -l "${WINEPREFIX}/dosdevices"
fi
}
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
uridecode()
{
local path=$(urldecode "$1")
path=${path/file:\/\//}
echo $path
}
UnixUriToDosPath()
{
OPEN_FILE=$(uridecode "$1")
if [ -f "$OPEN_FILE" ]; then
OPEN_FILE=$(realpath "$OPEN_FILE")
OPEN_FILE="z:$OPEN_FILE"
debug_log "fond file $OPEN_FILE"
OPEN_FILE=$(echo $OPEN_FILE | sed -e 's/\//\\\\/g')
fi
echo "OPEN_FILE"
}
get_bottle_path_by_process_id()
{
PID_LIST="$1"
PREFIX_LIST=""
for pid_var in $PID_LIST ; do
WINE_PREFIX=$(xargs -0 printf '%s\n' < /proc/$pid_var/environ | grep WINEPREFIX)
WINE_PREFIX=${WINE_PREFIX##*=}
for path in $(echo -e $PREFIX_LIST) ; do
if [[ $path == "$WINE_PREFIX" ]]; then
WINE_PREFIX=""
fi
done
if [ -d "$WINE_PREFIX" ]; then
debug_log_to_file "found $pid_var : $WINE_PREFIX"
PREFIX_LIST+="\n$WINE_PREFIX"
fi
done
echo -e $PREFIX_LIST | grep $HOME
}
get_bottle_path_by_process_name()
{
PID_LIST=$(ps -ef | grep -E -i "c:.*${1}" | grep -v grep | awk '{print $2}')
debug_log_to_file "get pid list: $PID_LIST"
get_bottle_path_by_process_id "$PID_LIST"
}
#arg 1: windows process file path
#arg 2-*: windows process args
CallProcess()
{
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
/opt/deepinwine/tools/kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
}
AutoStartBottle()
{
debug_log "Auto start $WINEPREFIX"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD /opt/deepinwine/tools/startbottle.exe &
}
CallZhuMu()
{
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
if [ -n "$2" ];then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" "--url=$2" &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &
fi
}
#arg 1: startserver just start server, or process file path
#arg 2-*: windows process args
CallYMDY()
{
SERVER_BOTTLE=$(get_bottle_path_by_process_name sqlservr.exe | grep $WINEPREFIX)
if [ -z "$SERVER_BOTTLE" ]; then
debug_log "Starting SQL Server ..."
CallProcess "c:\\Program Files\\Microsoft SQL Server\\MSSQL\\Binn\\sqlservr.exe" -s MSSQLSERVER
else
debug_log "SQL Server is running in $SERVER_BOTTLE"
fi
if [ "startserver" == "$1" ]; then
debug_log "Auto start SQL Server"
else
CallProcess "$@"
fi
}
CallYMGWY()
{
if [ "tongji" == "$1" ]; then
firefox "http://127.0.0.1:64022/hzbtj" &
else
firefox "http://127.0.0.1:64022/hzb" &
fi
}
CallATM()
{
if [ ! -f "$WINEPREFIX/drive_c/Program Files/TradeManager/AliIM.exe" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\deepin\\AliIM2015_ATM.exe"
fi
CallProcess "$@"
}
CallQIANNIU()
{
_DisableAliUpdate
CallProcess "$@"
}
CallYMDATJ()
{
if [ ! -f "$WINEPREFIX/drive_c/Program Files/JoinCheer/全国档案事业统计年报信息管理系统/ReportE.exe" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "c:\\deepin\\install\\setup.exe"
fi
CallProcess "$@"
}
CallQQGame()
{
debug_log "run $1"
/opt/deepinwine/tools/kill.sh QQMicroGameBox block
env WINEPREFIX="$WINEPREFIX" /opt/deepinwine/tools/QQGameRunner $1 &
}
CallIrfanView()
{
OPEN_FILE="$(UnixUriToDosPath "$2")"
debug_log "file path: $OPEN_FILE"
if [ -n "$OPEN_FILE" ]; then
CallProcess "$1" "$OPEN_FILE"
else
CallProcess "$1"
fi
}
CallQQ()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
/opt/deepinwine/tools/add_hotkeys
/opt/deepinwine/tools/fontconfig
touch "$WINEPREFIX/../.QQ_run"
fi
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
CallTIM()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
/opt/deepinwine/tools/add_hotkeys
/opt/deepinwine/tools/fontconfig
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
touch $WINEPREFIX/../.QQ_run
fi
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"
}
CallWeChat()
{
debug_log "Disable auto update"
_DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "UpdateFailCnt"
_DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "NeedUpdateType"
rm "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WeChat/All Users/config/configEx.ini"
export DISABLE_RENDER_CLIPBOARD=1
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
CallWXWork()
{
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update"
fi
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade"
fi
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
CallWangWang()
{
chmod 700 "$WINEPREFIX/drive_c/Program Files/AliWangWang/9.12.10C/wwbizsrv.exe"
chmod 700 "$WINEPREFIX/drive_c/Program Files/Alibaba/wwbizsrv/wwbizsrv.exe"
CallProcess "$@"
}
#arg 1: exec file path
#arg 2: autostart ,or exec arg 1
#arg 3: exec arg 2
CallApp()
{
FixLink
debug_log "CallApp $BOTTLENAME $*"
if [ "autostart" == "$2" ];then
AutoStartBottle
return
fi
case $BOTTLENAME in
"Deepin-WangWang")
CallWangWang "$@"
;;
"Deepin-ZhuMu")
CallZhuMu "$@"
;;
"Deepin-QQ")
CallQQ "$@"
;;
"Deepin-TIM")
CallTIM "$@"
;;
"Deepin-IrfanView")
CallIrfanView "$@"
;;
"Deepin-dangantongji")
CallYMDATJ "$@"
;;
"Deepin-YMDY")
CallYMDY "$@"
;;
"Deepin-YMGWY")
CallYMGWY "$@"
;;
"Deepin-QQGame"*)
CallQQGame "$@"
;;
"Deepin-QianNiu")
CallQIANNIU "$@"
;;
"Deepin-ATM")
CallATM "$@"
;;
"Deepin-WeChat")
CallWeChat "$@"
;;
"Deepin-WXWork")
CallWXWork "$@"
;;
*)
CallProcess "$@"
;;
esac
}
ExtractApp()
{
$SHELL_DIR/deepin-wine-banner unpack &
mkdir -p "$1"
7z x "$APPDIR/$APPTAR" -o"$1"
mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER"
sed -i "s#@current_user@#$USER#" $1/*.reg
FixLink
$SHELL_DIR/deepin-wine-banner unpacked
}
DeployApp()
{
ExtractApp "$WINEPREFIX"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RemoveApp()
{
rm -rf "$WINEPREFIX"
}
ResetApp()
{
debug_log "Reset $PACKAGENAME....."
read -p "* Are you sure?(Y/N)" ANSWER
if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" -o -z "$ANSWER" ]; then
EvacuateApp
DeployApp
CallApp
fi
}
UpdateApp()
{
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
return
fi
if [ -d "${WINEPREFIX}.tmpdir" ]; then
rm -rf "${WINEPREFIX}.tmpdir"
fi
case $BOTTLENAME in
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork")
rm -rf "$WINEPREFIX"
DeployApp
return
;;
esac
ExtractApp "${WINEPREFIX}.tmpdir"
/opt/deepinwine/tools/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
rm -rf "${WINEPREFIX}.tmpdir"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RunApp()
{
$SHELL_DIR/deepin-wine-banner
if [[ $? != 0 ]]; then
debug_log "检测到 deepin-wine-banner 运行, exit 1"
exit 1
fi
$SHELL_DIR/deepin-wine-banner start &
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
CallApp "$@"
}
CreateBottle()
{
CREATE_BOTTLE="1"
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
}
# Check if some visual feedback is possible
if command -v zenity >/dev/null 2>&1; then
progressbar()
{
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close --no-cancel ||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
}
else
progressbar()
{
cat -
}
fi
if [ -z $1 ] || [ -z $2 ] || [ -z "$3" ]; then
debug_log "Invalid params"
exit 0
fi
BOTTLENAME="$1"
WINEPREFIX="$HOME/.deepinwine/$1"
APPDIR="/opt/deepinwine/apps/$1"
APPVER="$2"
debug_log "Run $*"
if [ -z "$WINE_WMCLASS" ]; then
export WINE_WMCLASS="$DEB_PACKAGE_NAME"
fi
if [ -z "$4" ]; then
RunApp "$3"
exit 0
fi
case $4 in
"-r" | "--reset")
ResetApp
;;
"-cb" | "--create")
CreateBottle
;;
"-e" | "--remove")
RemoveApp
;;
"-u" | "--uri")
RunApp "$3" "$5" "$6"
;;
"-h" | "--help")
HelpApp
;;
*)
echo "Invalid option: $4"
echo "Use -h|--help to get help"
exit 1
;;
esac
exit 0

View File

@@ -1,600 +0,0 @@
#!/bin/bash
# Copyright (C) 2016 Deepin, Inc.
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
APPVER="@deb_version_string@"
APPTAR="files.7z"
BOTTLENAME=""
WINE_CMD="deepin-wine"
LOG_FILE=$0
CREATE_BOTTLE=""
SHELL_DIR=$(dirname $0)
SHELL_DIR=$(realpath "$SHELL_DIR")
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
if [ $APPRUN_CMD ]; then
WINE_CMD=$APPRUN_CMD
fi
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
_DeleteRegistry()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg DELETE "$1" /f &> /dev/null
}
init_log_file()
{
if [ ! -d "$DEBUG_LOG" ];then
return
fi
LOG_DIR=$(realpath $DEBUG_LOG)
if [ -d "$LOG_DIR" ];then
LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log"
echo "" > "$LOG_FILE"
debug_log "LOG_FILE=$LOG_FILE"
fi
}
debug_log_to_file()
{
if [ -d "$DEBUG_LOG" ];then
echo -e "${1}" >> "$LOG_FILE"
fi
}
debug_log()
{
echo "${1}"
}
HelpApp()
{
echo " Extra Commands:"
echo " -r/--reset Reset app to fix errors"
echo " -e/--remove Remove deployed app files"
echo " -h/--help Show program help info"
}
FixLink()
{
if [ -d ${WINEPREFIX} ]; then
CUR_DIR=$PWD
cd "${WINEPREFIX}/dosdevices"
rm c: z: y:
ln -s -f ../drive_c c:
ln -s -f / z:
ln -s -f $HOME y:
cd $CUR_DIR
ls -l "${WINEPREFIX}/dosdevices"
fi
}
DisableWrite()
{
if [ -d "${1}" ]; then
chmod +w "${1}"
rm -rf "${1}"
fi
mkdir "${1}"
chmod -w "${1}"
}
is_autostart()
{
AUTOSTART="/opt/deepinwine/tools/autostart"
if [ -f "$AUTOSTART.all" ]&&[ -f "/opt/apps/$1/files/run.sh" ];then
return 0
fi
if [ -f $AUTOSTART ];then
grep -c "$1" $AUTOSTART > /dev/null
return $?
fi
return 1
}
#arg 1: windows process file path
#arg 2-*: windows process args
CallProcess()
{
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
is_autostart $DEB_PACKAGE_NAME
autostart=$?
if [ $autostart -ne 0 ];then
$SHELL_DIR/kill.sh "$BOTTLENAME" block
fi
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
export ATTACH_FILE_DIALOG=1
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
#start autobottle
if [ $autostart -eq 0 ];then
$SHELL_DIR/autostart_wine.sh $DEB_PACKAGE_NAME
fi
}
CallZhuMu()
{
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
if [ -n "$2" ];then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" "--url=$2" &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &
fi
}
CallQQGame()
{
debug_log "run $1"
$SHELL_DIR/kill.sh qqgame block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &
}
CallQQ()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
$SHELL_DIR/fontconfig
touch "$WINEPREFIX/../.QQ_run"
fi
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQ/Bin/QQLiveMPlayer"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQ/Bin/QQLiveMPlayer1"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QzoneMusic"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQBrowser"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/QQBrowser"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQBrowserBin"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQBrowserDefault"
DisableWrite "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/QQBrowserDefault"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQPCMgr"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/QQPCMgr"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/HuaYang"
DisableWrite "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/HuaYang"
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
CallTIM()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
$SHELL_DIR/fontconfig
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
touch $WINEPREFIX/../.QQ_run
fi
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"
}
CallWeChat()
{
debug_log "Disable auto update"
_DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "UpdateFailCnt"
_DeleteRegistry "HKCU\\Software\\Tencent\\WeChat" "NeedUpdateType"
rm "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WeChat/All Users/config/configEx.ini"
export DISABLE_RENDER_CLIPBOARD=1
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
CallWangWang()
{
chmod 700 "$WINEPREFIX/drive_c/Program Files/AliWangWang/9.12.10C/wwbizsrv.exe"
chmod 700 "$WINEPREFIX/drive_c/Program Files/Alibaba/wwbizsrv/wwbizsrv.exe"
if [ $# = 3 ] && [ -z "$3" ];then
EXEC_PATH="c:/Program Files/AliWangWang/9.12.10C/WWCmd.exe"
export ATTACH_FILE_DIALOG=1
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$EXEC_PATH" "$2" &
else
CallProcess "$@"
fi
}
CallWXWork()
{
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update"
fi
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade"
fi
#Support use native file dialog
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
CallDingTalk()
{
debug_log "run $1"
$SHELL_DIR/kill.sh DingTalk block
export ATTACH_FILE_DIALOG=1
CallProcess "$@"
}
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
CallMeiTuXiuXiu()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" $path
CallProcess "$@"
}
CallFastReadPDF()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" $path
CallProcess "$@"
}
CallEvernote()
{
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" $path
CallProcess "$@"
}
CallTencentVideo()
{
if [ -f "${WINEPREFIX}/drive_c/Program Files/Tencent/QQLive/Upgrade.dll" ]; then
rm -rf "${WINEPREFIX}/drive_c/Program Files/Tencent/QQLive/Upgrade.dll"
fi
CallProcess "$@"
}
CallFoxmail()
{
sed -i '/LogPixels/d' ${WINEPREFIX}/user.reg
CallProcess "$@"
}
CallTHS()
{
$SHELL_DIR/kill.sh ths block
debug_log "Start run $1"
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
$SHELL_DIR/kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
}
CallQQGameV2()
{
debug_log "run $1"
$SHELL_DIR/kill.sh QQMicroGameBox block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" -action:force_download -appid:${2} -pid:8 -bin_version:1.1.2.4 -loginuin: &
}
CallEBS250()
{
CallProcess "$@"
}
CallPsCs6()
{
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
$SHELL_DIR/kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
}
#arg 1: exec file path
#arg 2: autostart ,or exec arg 1
#arg 3: exec arg 2
CallApp()
{
FixLink
debug_log "CallApp $BOTTLENAME $*"
case $BOTTLENAME in
"Deepin-WangWang")
CallWangWang "$@"
;;
"Deepin-ZhuMu")
CallZhuMu "$@"
;;
"Deepin-QQ")
CallQQ "$@"
;;
"Deepin-TIM")
CallTIM "$@"
;;
"Deepin-QQGame"*)
CallQQGame "$@"
;;
"Deepin-ATM")
CallATM "$@"
;;
"Deepin-WeChat")
CallWeChat "$@"
;;
"Deepin-WXWork")
CallWXWork "$@"
;;
"Deepin-Dding")
CallDingTalk "$@"
;;
"Deepin-MTXX")
CallMeiTuXiuXiu "$@"
;;
"Deepin-FastReadPDF")
CallFastReadPDF "$@"
;;
"Deepin-Evernote")
CallEvernote "$@"
;;
"Deepin-TencentVideo")
CallTencentVideo "$@"
;;
"Deepin-Foxmail")
CallFoxmail "$@"
;;
"Deepin-THS")
CallTHS "$@"
;;
"Deepin-QQHlddz")
CallQQGameV2 "$1" 363
;;
"Deepin-QQBydr")
CallQQGameV2 "$1" 1104632801
;;
"Deepin-QQMnsj")
CallQQGameV2 "$1" 1105856612
;;
"Deepin-QQSszb")
CallQQGameV2 "$1" 1105640244
;;
"Deepin-CS6")
CallPsCs6 "$@"
;;
"Deepin-EBS250")
CallEBS250 "$1"
;;
*)
CallProcess "$@"
;;
esac
}
ExtractApp()
{
$SHELL_DIR/deepin-wine-banner unpack &
mkdir -p "$1"
7z x "$APPDIR/$APPTAR" -o"$1"
mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER"
sed -i "s#@current_user@#$USER#" $1/*.reg
FixLink
$SHELL_DIR/deepin-wine-banner unpacked
}
DeployApp()
{
ExtractApp "$WINEPREFIX"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RemoveApp()
{
rm -rf "$WINEPREFIX"
}
ResetApp()
{
debug_log "Reset $PACKAGENAME....."
read -p "* Are you sure?(Y/N)" ANSWER
if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" -o -z "$ANSWER" ]; then
EvacuateApp
DeployApp
CallApp
fi
}
UpdateApp()
{
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
return
fi
if [ -d "${WINEPREFIX}.tmpdir" ]; then
rm -rf "${WINEPREFIX}.tmpdir"
fi
case $BOTTLENAME in
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding")
rm -rf "$WINEPREFIX"
DeployApp
return
;;
esac
ExtractApp "${WINEPREFIX}.tmpdir"
$SHELL_DIR/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
rm -rf "${WINEPREFIX}.tmpdir"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RunApp()
{
$SHELL_DIR/deepin-wine-banner
if [[ $? != 0 ]]; then
debug_log "检测到 deepin-wine-banner 运行, exit 1"
exit 1
fi
$SHELL_DIR/deepin-wine-banner start &
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
CallApp "$@"
}
CreateBottle()
{
CREATE_BOTTLE="1"
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
}
init_log_file
# Check if some visual feedback is possible
if command -v zenity >/dev/null 2>&1; then
progressbar()
{
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close --no-cancel ||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
}
else
progressbar()
{
cat -
}
fi
if [ -z $1 ] || [ -z $2 ] || [ -z "$3" ]; then
debug_log "Invalid params"
exit 0
fi
BOTTLENAME="$1"
WINEPREFIX="$HOME/.deepinwine/$1"
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
if [ -f "$APPDIR/files.md5sum" ];then
APPVER="$(cat $APPDIR/files.md5sum)"
else
APPVER="$2"
fi
debug_log "Run $*"
if [ -z "$WINE_WMCLASS" ]; then
export WINE_WMCLASS="$DEB_PACKAGE_NAME"
fi
if [ -z "$4" ]; then
RunApp "$3"
exit 0
fi
case $4 in
"-r" | "--reset")
ResetApp
;;
"-cb" | "--create")
CreateBottle
;;
"-e" | "--remove")
RemoveApp
;;
"-u" | "--uri")
RunApp "$3" "$5" "$6"
;;
"-h" | "--help")
HelpApp
;;
*)
echo "Invalid option: $4"
echo "Use -h|--help to get help"
exit 1
;;
esac
exit 0

Some files were not shown because too many files have changed in this diff Show More