Compare commits
86 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 608467ba6e | |||
| 3a6cb7ebd2 | |||
| 43f0cd2ad7 | |||
| 7081bc6c0c | |||
| 20b19a885f | |||
| 6b127dd3f8 | |||
| cd46dbd4b2 | |||
| 8d48744bb0 | |||
| 9cf0c16697 | |||
| d46c83f51b | |||
| 2b2b9c9208 | |||
| fb0f9e1064 | |||
| 895e55d964 | |||
| a25eb4a7db | |||
| 06ba2d3535 | |||
| 23ca7570ec | |||
| fef4f73037 | |||
| 05c9332934 | |||
| 5db45ff3e5 | |||
| e7b8127cd3 | |||
| e08b570db4 | |||
| cf06a9681f | |||
| 30fbbcbdb1 | |||
| c1923b4549 | |||
| 6d8dc95a4d | |||
| a82af3263b | |||
| b7c71130f5 | |||
| 1e1d3fb352 | |||
| e13076d841 | |||
|
|
da6c531c31 | ||
| 29e670a1b1 | |||
| f520dc81a2 | |||
| 3d0cd07016 | |||
| c73b06cc32 | |||
| 0f10e5aace | |||
| 683a1a876e | |||
| 9fb280271b | |||
| 12d8fb69e8 | |||
| 1cbb6d59be | |||
| 2170aa7959 | |||
| a7cf18bd28 | |||
| 38544a72f0 | |||
| efa2c65886 | |||
| 1e1f451d6c | |||
| ddbf0089b4 | |||
| 368bea581e | |||
|
|
cf60f70ba5 | ||
|
|
a1fe72e4b9 | ||
|
|
da347935b7 | ||
| 163923de8d | |||
| e90708e03d | |||
| ca939881e3 | |||
| fc8989db9f | |||
| b60f2cd0eb | |||
| 27eb980190 | |||
| 8a7010529d | |||
| 640c9f77a0 | |||
| ed39b338c9 | |||
| 51635cf2c0 | |||
| b2e15d12ac | |||
| dc998a4fa0 | |||
| 66963e6f26 | |||
| c8ccc1dff5 | |||
| 08dbe1cb80 | |||
| 01a3307626 | |||
| f6698e2f39 | |||
| 9c0e2d11b3 | |||
| bcebe543cc | |||
| 9fdc3a998c | |||
| fb0ff07ad6 | |||
| a5352c6942 | |||
| e724d19663 | |||
| e78fb2b4a4 | |||
| d330c83691 | |||
| de0a9b13f1 | |||
| 9cc549527d | |||
| 43e473ad39 | |||
| d78916f4b0 | |||
| bf370e9a91 | |||
| 84f71c2043 | |||
| e5231d7846 | |||
| b653bcbb80 | |||
| ad9deaed81 | |||
| 1b9e106d2a | |||
| c51cf18f4c | |||
| 4217f58c2c |
52
.workflow/branch-pipeline.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
version: '1.0'
|
||||
name: branch-pipeline
|
||||
displayName: BranchPipeline
|
||||
stages:
|
||||
- stage:
|
||||
name: compile
|
||||
displayName: 编译
|
||||
steps:
|
||||
- step: build@python
|
||||
name: build_python
|
||||
displayName: Python 构建
|
||||
pythonVersion: '3.9'
|
||||
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||
artifacts:
|
||||
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||
- name: BUILD_ARTIFACT
|
||||
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径
|
||||
path:
|
||||
- ./
|
||||
commands:
|
||||
- python3 -m pip install --upgrade pip
|
||||
- pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
- pip3 install -r requirements.txt
|
||||
- python3 ./main.py
|
||||
- step: publish@general_artifacts
|
||||
name: publish_general_artifacts
|
||||
displayName: 上传制品
|
||||
# 上游构建任务定义的产物名,默认BUILD_ARTIFACT
|
||||
dependArtifact: BUILD_ARTIFACT
|
||||
# 上传到制品库时的制品命名,默认output
|
||||
artifactName: output
|
||||
dependsOn: build_python
|
||||
- stage:
|
||||
name: release
|
||||
displayName: 发布
|
||||
steps:
|
||||
- step: publish@release_artifacts
|
||||
name: publish_release_artifacts
|
||||
displayName: '发布'
|
||||
# 上游上传制品任务的产出
|
||||
dependArtifact: output
|
||||
# 发布制品版本号
|
||||
version: '1.0.0.0'
|
||||
# 是否开启版本号自增,默认开启
|
||||
autoIncrement: true
|
||||
triggers:
|
||||
push:
|
||||
branches:
|
||||
exclude:
|
||||
- master
|
||||
include:
|
||||
- .*
|
||||
50
.workflow/master-pipeline.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
version: '1.0'
|
||||
name: master-pipeline
|
||||
displayName: MasterPipeline
|
||||
stages:
|
||||
- stage:
|
||||
name: compile
|
||||
displayName: 编译
|
||||
steps:
|
||||
- step: build@python
|
||||
name: build_python
|
||||
displayName: Python 构建
|
||||
pythonVersion: '3.9'
|
||||
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||
artifacts:
|
||||
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||
- name: BUILD_ARTIFACT
|
||||
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径
|
||||
path:
|
||||
- ./
|
||||
commands:
|
||||
- python3 -m pip install --upgrade pip
|
||||
- pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
- pip3 install -r requirements.txt
|
||||
- python3 ./main.py
|
||||
- step: publish@general_artifacts
|
||||
name: publish_general_artifacts
|
||||
displayName: 上传制品
|
||||
# 上游构建任务定义的产物名,默认BUILD_ARTIFACT
|
||||
dependArtifact: BUILD_ARTIFACT
|
||||
# 上传到制品库时的制品命名,默认output
|
||||
artifactName: output
|
||||
dependsOn: build_python
|
||||
- stage:
|
||||
name: release
|
||||
displayName: 发布
|
||||
steps:
|
||||
- step: publish@release_artifacts
|
||||
name: publish_release_artifacts
|
||||
displayName: '发布'
|
||||
# 上游上传制品任务的产出
|
||||
dependArtifact: output
|
||||
# 发布制品版本号
|
||||
version: '1.0.0.0'
|
||||
# 是否开启版本号自增,默认开启
|
||||
autoIncrement: true
|
||||
triggers:
|
||||
push:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
37
.workflow/pr-pipeline.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
version: '1.0'
|
||||
name: pr-pipeline
|
||||
displayName: PRPipeline
|
||||
stages:
|
||||
- stage:
|
||||
name: compile
|
||||
displayName: 编译
|
||||
steps:
|
||||
- step: build@python
|
||||
name: build_python
|
||||
displayName: Python 构建
|
||||
pythonVersion: '3.9'
|
||||
# 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除
|
||||
artifacts:
|
||||
# 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址
|
||||
- name: BUILD_ARTIFACT
|
||||
# 构建产物获取路径,是指代码编译完毕之后构建物的所在路径
|
||||
path:
|
||||
- ./
|
||||
commands:
|
||||
- python3 -m pip install --upgrade pip
|
||||
- pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
- pip3 install -r requirements.txt
|
||||
- python3 ./main.py
|
||||
- step: publish@general_artifacts
|
||||
name: publish_general_artifacts
|
||||
displayName: 上传制品
|
||||
# 上游构建任务定义的产物名,默认BUILD_ARTIFACT
|
||||
dependArtifact: BUILD_ARTIFACT
|
||||
# 上传到制品库时的制品命名,默认output
|
||||
artifactName: output
|
||||
dependsOn: build_python
|
||||
triggers:
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
@@ -1,3 +0,0 @@
|
||||
import WineRunner
|
||||
WineRunner.Bash("a").runList([["thank"], ["version"]])
|
||||
#WineRunner.Bash("a").runCommand("thank")
|
||||
175
AutoConfig.py
@@ -15,6 +15,7 @@ import sys
|
||||
import base64
|
||||
import json
|
||||
import traceback
|
||||
import urllib.request
|
||||
import req as requests
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
from UI.AutoConfig import *
|
||||
@@ -31,12 +32,13 @@ urlSourcesList = [
|
||||
"https://gitee.com/gfdgd-xi/deep-wine-runner-auto-configuration-script/raw/master/", # Gitee 源
|
||||
"https://gfdgd-xi.github.io/deep-wine-runner-auto-configuration-script/", # Github 源
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/auto/", # 备用源1,纯 IPv6 源
|
||||
"http://120.25.153.144/deep-wine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/deep-wine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/wine-runner-list/auto/", # 备用源 3
|
||||
"http://127.0.0.1/wine-runner-list/auto/" # 本地测试源
|
||||
]
|
||||
urlSources = urlSourcesList[0]
|
||||
lists = []
|
||||
|
||||
class ProgramRunStatusUpload():
|
||||
msgWindow = None
|
||||
starLayout = None
|
||||
@@ -136,7 +138,7 @@ class InformationWindow():
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
||||
try:
|
||||
import requests as r
|
||||
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
@@ -207,10 +209,36 @@ class InformationWindow():
|
||||
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()
|
||||
@@ -224,15 +252,12 @@ class ProgramRunStatusShow():
|
||||
fileName = i[1]
|
||||
break
|
||||
try:
|
||||
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
#r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
|
||||
#r.encoding = "utf-8"
|
||||
#title = r.text
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
#traceback.print_exc()
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
|
||||
tipsInfo = "暂时无人提交此脚本评分,是否立即提交?"
|
||||
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
@@ -248,13 +273,13 @@ class ProgramRunStatusShow():
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
starLayout = QtWidgets.QHBoxLayout()
|
||||
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
|
||||
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)
|
||||
msgWidgetLayout.addLayout(starLayout, 0, 1)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2)
|
||||
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, 3, 0, 1, 2)
|
||||
msgWidgetLayout.addWidget(uploadButton, 1, 2)
|
||||
end = 5
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
@@ -265,12 +290,135 @@ class ProgramRunStatusShow():
|
||||
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"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{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"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{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"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{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
|
||||
# 获取选中项
|
||||
@@ -401,6 +549,7 @@ if __name__ == "__main__":
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
pinLunLayout = QtWidgets.QHBoxLayout()
|
||||
ui.setupUi(window)
|
||||
window.setWindowTitle(f"Wine 运行器 {version}——容器自动配置部署脚本")
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
@@ -422,7 +571,7 @@ if __name__ == "__main__":
|
||||
#pass
|
||||
# 连接信号和槽
|
||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||
ui.uploadFen.clicked.connect(UploadFen)
|
||||
#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)
|
||||
|
||||
14
AutoShell/command/decompressionbottle
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/installmsi
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
AutoShell/command/programforum
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
3
ChangePassword.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
echo -e "123456\n123456\n\n\n\n\n\n\n\n\n" | adduser "$1"
|
||||
echo -e "123456\n123456\n" | passwd root
|
||||
6
ConfigLanguareRunner-help.json
Executable file → Normal file
@@ -38,5 +38,9 @@
|
||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6"
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6",
|
||||
"installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库",
|
||||
"decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径",
|
||||
"programforum": "打开程序论坛\n参数数量:0\n参数介绍:无",
|
||||
"installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径"
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 版本:3.0.1
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
@@ -11,8 +11,10 @@ import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import random
|
||||
import platform
|
||||
import traceback
|
||||
import webbrowser
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
@@ -38,8 +40,8 @@ programEnv = [
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
@@ -57,6 +59,19 @@ readOnlyEnv = [
|
||||
"($SYSTEM)",
|
||||
"($DEBUG)"
|
||||
]
|
||||
|
||||
def FindFile(file, name):
|
||||
for i in os.listdir(file):
|
||||
path = f"{file}/{i}"
|
||||
if os.path.isdir(path):
|
||||
returnPath = FindFile(path, name)
|
||||
if returnPath != None:
|
||||
return returnPath.replace("//", "/")
|
||||
if os.path.isfile(path):
|
||||
if i == name:
|
||||
return path
|
||||
return None
|
||||
|
||||
def Debug():
|
||||
if "--debug" in sys.argv:
|
||||
traceback.print_exc()
|
||||
@@ -111,7 +126,10 @@ class Command():
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink",
|
||||
"installvb",
|
||||
"installother"
|
||||
"installother",
|
||||
"decompressionbottle",
|
||||
"programforum",
|
||||
"installmsi"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
@@ -279,7 +297,7 @@ class Command():
|
||||
|
||||
def Version(self):
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
return 0
|
||||
|
||||
def Pause(self) -> int:
|
||||
@@ -389,6 +407,20 @@ class Command():
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
|
||||
self.Bat()
|
||||
|
||||
def DecompressionBottle(self):
|
||||
tempDebDir = f"/tmp/wine-runner-unpack-deb-{random.randint(0, 1000)}"
|
||||
if os.system(f"dpkg -x '{self.command[1]}' '{tempDebDir}'"):
|
||||
return 1
|
||||
zippath = FindFile(tempDebDir, "files.7z")
|
||||
if zippath == None:
|
||||
return 2
|
||||
# 解压文件
|
||||
os.system(f"mkdir -p '{self.command[2]}'")
|
||||
fi = os.system(f"7z x -y '{zippath}' -o'{self.command[2]}'")
|
||||
os.system(f"rm -rfv '{tempDebDir}'")
|
||||
return fi
|
||||
|
||||
|
||||
def DisbledHttpProxy(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
self.Bat()
|
||||
@@ -401,6 +433,13 @@ class Command():
|
||||
import InstallOther
|
||||
return InstallOther.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def ProgramForum(self):
|
||||
webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
|
||||
|
||||
def InstallMSI(self):
|
||||
self.command = ["bat", "msiexec", "/i", self.command[1]]
|
||||
return self.Bat()
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
@@ -443,7 +482,10 @@ class Command():
|
||||
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
|
||||
"installvb": InstallVB,
|
||||
"installother": InstallOther
|
||||
"installother": InstallOther,
|
||||
"decompressionbottle": DecompressionBottle,
|
||||
"programforum": ProgramForum,
|
||||
"installmsi": InstallMSI
|
||||
}
|
||||
|
||||
# 参数数列表
|
||||
@@ -488,7 +530,10 @@ class Command():
|
||||
"disbledWinebottlecreatelink": [0],
|
||||
"enabledWinebottlecreatelink": [0],
|
||||
"installvb": [1],
|
||||
"installother": [1]
|
||||
"installother": [1],
|
||||
"decompressionbottle": [2],
|
||||
"programforum": [0],
|
||||
"installmsi": [1]
|
||||
}
|
||||
windowsUnrun = [
|
||||
"createbotton",
|
||||
@@ -502,7 +547,8 @@ class Command():
|
||||
"disbledopengl",
|
||||
"installdxvk",
|
||||
"installfont",
|
||||
"installsparkcorefont"
|
||||
"installsparkcorefont",
|
||||
"decompressionbottle"
|
||||
]
|
||||
# 解析
|
||||
def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
|
||||
@@ -554,7 +600,7 @@ class Command():
|
||||
i[a] = i[a].replace(b[0], b[1])
|
||||
commandReturn = self.commandList[i[0]](self)
|
||||
if commandReturn:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误")
|
||||
print(f"运行命令{' '.join(self.command)}出现错误,返回值:", commandReturn)
|
||||
programEnv[9][1] = str(commandReturn)
|
||||
if self.close:
|
||||
break
|
||||
@@ -574,7 +620,7 @@ if __name__ == "__main__":
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
while True:
|
||||
commandLine = input(">")
|
||||
|
||||
0
DisabledOpengl.reg
Executable file → Normal file
5
Download.py
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import base64
|
||||
import requests
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9JbnN0YWxsLnBocD9WZXJzaW9uPQ==").decode("utf-8") + sys.argv[1]).text)
|
||||
0
EnabledOpengl.reg
Executable file → Normal file
BIN
GetEXEVersion.exe
Executable file
BIN
Icon/Function/CHROOT.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
BIN
Icon/Function/more-wine.png
Executable file
|
After Width: | Height: | Size: 62 KiB |
BIN
Icon/Function/wine.png
Executable file
|
After Width: | Height: | Size: 67 KiB |
BIN
Icon/Function/wine23A.png
Executable file
|
After Width: | Height: | Size: 75 KiB |
BIN
Icon/Function/wine23P.png
Executable file
|
After Width: | Height: | Size: 75 KiB |
BIN
Icon/Program/Windows虚拟机.png
Executable file
|
After Width: | Height: | Size: 63 KiB |
BIN
Icon/Program/webp2.png
Executable file
|
After Width: | Height: | Size: 84 KiB |
BIN
Icon/Program/webp3.png
Executable file
|
After Width: | Height: | Size: 85 KiB |
BIN
Icon/Program/wine打包器.png
Executable file
|
After Width: | Height: | Size: 67 KiB |
BIN
Icon/Program/wine运行器.png
Executable file
|
After Width: | Height: | Size: 68 KiB |
BIN
Icon/Screen/202211121646232464_image.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
29
IconList.json
Normal file
@@ -0,0 +1,29 @@
|
||||
[
|
||||
[
|
||||
["QQ", "wineBottonPath/drive_c/Program Files/Tencent/QQ/Bin/QQ.exe"],
|
||||
["QQ", "wineBottonPath/drive_c/Program Files (x86)/Tencent/QQ/Bin/QQ.exe"],
|
||||
["TIM", "wineBottonPath/drive_c/Program Files/Tencent/TIM/Bin/TIM.exe"],
|
||||
["TIM", "wineBottonPath/drive_c/Program Files (x86)/Tencent/TIM/Bin/TIM.exe"]
|
||||
],
|
||||
[
|
||||
["cmd", "cmd"],
|
||||
["cmd", "cmd.exe"],
|
||||
["cmd", "wineBottonPath/drive_c/windows/system32/cmd.exe"],
|
||||
["Internet Explorer", "iexplore"],
|
||||
["Internet Explorer", "iexplore.exe"],
|
||||
["Internet Explorer", "wineBottonPath/drive_c/Program Files/Internet Explorer/iexplore.exe"],
|
||||
["Internet Explorer", "wineBottonPath/drive_c/Program Files (x86)/Internet Explorer/iexplore.exe"],
|
||||
["微信", "wineBottonPath/drive_c/Program Files/Tencent/WeChat/WeChat.exe"],
|
||||
["微信", "wineBottonPath/drive_c/Program Files (x86)/Tencent/WeChat/WeChat.exe"],
|
||||
["UltraISO", "wineBottonPath/drive_c/Program Files/UltraISO/UltraISO.exe"],
|
||||
["UltraISO", "wineBottonPath/drive_c/Program Files (x86)/UltraISO/UltraISO.exe"],
|
||||
["迅雷", "wineBottonPath/drive_c/Program Files/Thunder Network/MiniThunder/Bin/ThunderMini.exe"],
|
||||
["迅雷", "wineBottonPath/drive_c/Program Files (x86)/Thunder Network/MiniThunder/Bin/ThunderMini.exe"],
|
||||
["Microsoft Office Word", "wineBottonPath/drive_c/Program Files/Microsoft Office/Office12/WINWORD.EXE"],
|
||||
["Microsoft Office Word", "wineBottonPath/drive_c/Program Files (x86)/Microsoft Office/Office12/WINWORD.EXE"],
|
||||
["腾讯会议", "wineBottonPath/drive_c/Program Files/Tencent/WeMeet/wemeetapp.exe"],
|
||||
["腾讯会议", "wineBottonPath/drive_c/Program Files (x86)/Tencent/WeMeet/wemeetapp.exe"],
|
||||
["腾讯课堂", "wineBottonPath/drive_c/Program Files/Tencent/EDU/bin/TXEDU.exe"],
|
||||
["腾讯课堂", "wineBottonPath/drive_c/Program Files (x86)/Tencent/EDU/bin/TXEDU.exe"]
|
||||
]
|
||||
]
|
||||
@@ -32,7 +32,7 @@ except:
|
||||
["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"]
|
||||
]
|
||||
def Download(wineBotton: str, id: int) -> int:
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/{fontList[id][2]}' -o '{fontList[id][0]}' \"{fontList[id][1]}\"")
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/' -o '{fontList[id][0]}' \"{fontList[id][1]}\"")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
|
||||
166
Makefile
@@ -3,79 +3,99 @@ build:
|
||||
#cd VM-source && make
|
||||
#cd wine && make
|
||||
cp -rv helperset deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv VM-source/VirtualMachine VM
|
||||
cp -rv VM-source/deepin-wine-runner.svg VM
|
||||
cp -rv VM-source/api VM
|
||||
cp -rv VM-source/Windows7X64Auto.iso VM
|
||||
cp -rv VM-source/Windows7X86Auto.iso VM
|
||||
cp -rv VM-source/run.py VM
|
||||
cp -rv wine/ deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv Test/ deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv VM-source/VirtualMachine VM
|
||||
cp -rv VM-source/deepin-wine-runner.svg VM
|
||||
cp -rv VM-source/api VM
|
||||
cp -rv VM-source/Windows7X64Auto.iso VM
|
||||
cp -rv VM-source/Windows7X86Auto.iso VM
|
||||
cp -rv VM-source/run.py VM
|
||||
cp -rv wine/ deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv Test/ deb/opt/apps/deepin-wine-runner/
|
||||
zip -v -q -r package-script.zip package-script
|
||||
cp -rv VM deb/opt/apps/deepin-wine-runner
|
||||
cp -rv AllInstall.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv kill.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallWineOnDeepin23Alpha.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv VM deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Download.py deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv AllInstall.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv ShellList deb/opt/apps/deepin-wine-runner
|
||||
cp -rv QemuDownload.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv QemuRun.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv kill.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
|
||||
cp -rv Mount.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv UnMount.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv vkd3d-proton.7z deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-easy-packager.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv IconList.json deb/opt/apps/deepin-wine-runner
|
||||
cp -rv GetEXEVersion.exe deb/opt/apps/deepin-wine-runner
|
||||
cp -rv MountWithoutHome.sh deb/opt/apps/deepin-wine-runner
|
||||
echo "[]" > deb/opt/apps/deepin-wine-runner/wine/winelist.json
|
||||
rm -rfv deb/opt/apps/deepin-wine-runner/wine/winelist.json
|
||||
cp -rv req deb/opt/apps/deepin-wine-runner
|
||||
cp -rv BuildDesktop.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv RegShot deb/opt/apps/deepin-wine-runner
|
||||
cp -rv BeCyIconGrabber.exe deb/opt/apps/deepin-wine-runner
|
||||
cp -rv AutoShell deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-packager-with-script.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-packager.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-runner-update-bug deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-runner.svg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-venturi-setter.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallVisualBasicRuntime.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv DisabledOpengl.reg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv EnabledOpengl.reg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv geek.exe 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
|
||||
cp -rv InstallNetFramework.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallOther.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallVisualCPlusPlus.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv launch.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv LICENSE deb/opt/apps/deepin-wine-runner
|
||||
cp -rv mainwindow.py deb/opt/apps/deepin-wine-runner/deepin-wine-runner
|
||||
cp -rv package-script.zip deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Run.bat deb/opt/apps/deepin-wine-runner
|
||||
cp -rv RunVM.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv "wine install" deb/opt/apps/deepin-wine-runner
|
||||
cp -rv 窗体透明度设置工具.exe deb/opt/apps/deepin-wine-runner
|
||||
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 exagear.7z deb/opt/apps/deepin-wine-runner
|
||||
cp -rv dlls-arm.7z deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin.list deb/opt/apps/deepin-wine-runner
|
||||
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
|
||||
#cp -rv deepin-wine-runner-create-botton.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Icon deb/opt/apps/deepin-wine-runner
|
||||
cp -rv ConfigLanguareRunner-help.json deb/opt/apps/deepin-wine-runner
|
||||
cp -rv gtkGetFileNameDlg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv LANG/*.qm deb/opt/apps/deepin-wine-runner/LANG
|
||||
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner/LANG
|
||||
cp -rv ConfigLanguareRunner.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv AutoConfig.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv UI deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Model deb/opt/apps/deepin-wine-runner
|
||||
cp -rv API deb/opt/apps/deepin-wine-runner
|
||||
cp -rv key deb/opt/apps/deepin-wine-runner
|
||||
dpkg -b deb spark-deepin-wine-runner.deb
|
||||
cp -rv req deb/opt/apps/deepin-wine-runner
|
||||
cp -rv BuildDesktop.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv ChangePassword.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv trans deb/opt/apps/deepin-wine-runner
|
||||
cp -rv RegShot deb/opt/apps/deepin-wine-runner
|
||||
cp -rv BeCyIconGrabber.exe deb/opt/apps/deepin-wine-runner
|
||||
cp -rv AutoShell deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-packager-with-script.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-packager.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-runner-update-bug deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-runner.svg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin-wine-venturi-setter.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallVisualBasicRuntime.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv DisabledOpengl.reg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv EnabledOpengl.reg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv geek.exe 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
|
||||
cp -rv InstallNetFramework.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallOther.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallVisualCPlusPlus.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv launch.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv LICENSE deb/opt/apps/deepin-wine-runner
|
||||
cp -rv mainwindow.py deb/opt/apps/deepin-wine-runner/deepin-wine-runner
|
||||
cp -rv package-script.zip deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Run.bat deb/opt/apps/deepin-wine-runner
|
||||
cp -rv RunVM.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv "wine install" deb/opt/apps/deepin-wine-runner
|
||||
cp -rv 窗体透明度设置工具.exe deb/opt/apps/deepin-wine-runner
|
||||
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 exagear.7z deb/opt/apps/deepin-wine-runner
|
||||
cp -rv dlls-arm.7z deb/opt/apps/deepin-wine-runner
|
||||
cp -rv deepin.list deb/opt/apps/deepin-wine-runner
|
||||
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
|
||||
#cp -rv deepin-wine-runner-create-botton.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Icon deb/opt/apps/deepin-wine-runner
|
||||
cp -rv ConfigLanguareRunner-help.json deb/opt/apps/deepin-wine-runner
|
||||
cp -rv gtkGetFileNameDlg deb/opt/apps/deepin-wine-runner
|
||||
cp -rv LANG/*.qm deb/opt/apps/deepin-wine-runner/LANG
|
||||
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner/LANG
|
||||
cp -rv ConfigLanguareRunner.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv AutoConfig.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv UI deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Model deb/opt/apps/deepin-wine-runner
|
||||
cp -rv API deb/opt/apps/deepin-wine-runner
|
||||
cp -rv key deb/opt/apps/deepin-wine-runner
|
||||
python3 RemovePycacheFile.py
|
||||
cp -rv deb /tmp/spark-deepin-wine-runner-builder
|
||||
sudo chown -R root:root /tmp/spark-deepin-wine-runner-builder
|
||||
|
||||
dpkg -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner.deb
|
||||
sudo rm -rfv /tmp/spark-deepin-wine-runner-builder
|
||||
|
||||
|
||||
install:
|
||||
@@ -87,11 +107,5 @@ install:
|
||||
remove:
|
||||
sudo apt purge spark-deepin-wine-runner
|
||||
|
||||
depend:
|
||||
sudo apt update
|
||||
sudo apt install python3 python3-pil python3-pil.imagetk\
|
||||
python3-pyquery deepin-terminal aria2 curl unrar unzip\
|
||||
python3-requests fakeroot bash python3-pyqt5
|
||||
|
||||
run:
|
||||
python3 mainwindow.py
|
||||
|
||||
BIN
Model/__pycache__/__init__.cpython-310.pyc
Executable file → Normal file
BIN
Model/__pycache__/__init__.cpython-36.pyc
Normal file
46
Mount.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
if [ ` whoami ` != "root" ]; then
|
||||
echo "Only root can run me"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "路径不存在!"
|
||||
exit 1
|
||||
fi
|
||||
programPath=`dirname $0`
|
||||
echo $0
|
||||
echo $1
|
||||
echo $2
|
||||
echo $3
|
||||
# 挂载必备目录
|
||||
cd "$1"
|
||||
# 拷贝 Qemu Static
|
||||
cp -r /usr/bin/qemu-*-static ./usr/bin
|
||||
# 挂载目录
|
||||
# 此部分将会由 pardus-chroot 来处理
|
||||
#mount --bind /dev ./dev
|
||||
#mount --bind /dev/pts ./dev/pts
|
||||
#mount -t proc /proc ./proc
|
||||
#mount --bind /etc/resolv.conf ./etc/resolv.conf
|
||||
#mount -t sysfs /sys ./sys
|
||||
#mount --bind /dev/shm ./dev/shm
|
||||
chmod 777 -R root tmp
|
||||
xhost +
|
||||
# 挂载 Wine 运行器目录
|
||||
mount -o bind `dirname $0` ./opt/apps/deepin-wine-runner/
|
||||
# 挂载字体
|
||||
mount -o bind /usr/share/fonts ./usr/share/fonts
|
||||
# 配置用户
|
||||
if [ ! -d "home/$2" ]; then
|
||||
# 新建用户,且密码为 123456,以便读写
|
||||
"$programPath/pardus-chroot" . bash /opt/apps/deepin-wine-runner/ChangePassword.sh "$2"
|
||||
fi
|
||||
# 挂载用户目录到 /root(默认 $HOME 路径)
|
||||
if [[ $2 == "root" ]]; then
|
||||
mount --bind root "$1/root/"
|
||||
else
|
||||
mount --bind "/home/$2" "$1/home/$2"
|
||||
fi
|
||||
|
||||
# 如果参数 3 存在
|
||||
"$programPath/pardus-chroot" "--userspec=$2:$2" . env "HOME=/home/$2" ${@:3}
|
||||
31
MountWithoutHome.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
if [ ` whoami ` != "root" ]; then
|
||||
echo "Only root can run me"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "路径不存在!"
|
||||
exit 1
|
||||
fi
|
||||
programPath=`dirname $0`
|
||||
echo $0
|
||||
echo $1
|
||||
echo $2
|
||||
echo $3
|
||||
# 挂载必备目录
|
||||
cd "$1"
|
||||
# 拷贝 Qemu Static
|
||||
cp -r /usr/bin/qemu-*-static ./usr/bin
|
||||
# 挂载目录
|
||||
# 这里将由 pardus-chroot 处理
|
||||
#mount --bind /dev ./dev
|
||||
#mount --bind /dev/pts ./dev/pts
|
||||
#mount -t proc /proc ./proc
|
||||
#mount --bind /etc/resolv.conf ./etc/resolv.conf
|
||||
#mount -t sysfs /sys ./sys
|
||||
#mount --bind /dev/shm ./dev/shm
|
||||
chmod 777 -R root tmp
|
||||
xhost +
|
||||
|
||||
# 如果参数 3 存在
|
||||
"$programPath/pardus-chroot" . ${@:3}
|
||||
121
ProgramFen.py
Executable file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
import traceback
|
||||
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(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Zlbi9GZW4=").decode("utf-8") + 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_()
|
||||
438
QemuDownload.py
Executable file
@@ -0,0 +1,438 @@
|
||||
#!/usr/bin/env python3
|
||||
# 本来是用C++写的,但在非deepin/UOS编译/运行就是下载不了https文件,只能用python重写
|
||||
#########################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布
|
||||
# 版本:2.4.0
|
||||
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#########################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import os
|
||||
import shutil
|
||||
import random
|
||||
import sys
|
||||
import json
|
||||
import traceback
|
||||
import requests
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../")
|
||||
from Model import *
|
||||
from trans import *
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# UI 布局(自动生成)
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(693, 404)
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
transla = Trans("en_US", f"{programPath}/trans/deepin-wine-runner-qemu-download.json")
|
||||
else:
|
||||
transla = Trans("zh_CN")
|
||||
_translate = transla.transe
|
||||
self.centralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralWidget.setObjectName("centralWidget")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralWidget)
|
||||
self.verticalLayout_2.setContentsMargins(11, 11, 11, 11)
|
||||
self.verticalLayout_2.setSpacing(6)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setSpacing(6)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.localWineList = QtWidgets.QListView(self.centralWidget)
|
||||
self.localWineList.setObjectName("localWineList")
|
||||
self.horizontalLayout_2.addWidget(self.localWineList)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setSpacing(6)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.verticalLayout_2.addWidget(QtWidgets.QLabel(_translate("U", """使用前须知:
|
||||
1、Qemu 跨架构效率较低,如果有条件建议优先使用 box86、exagear 等效率较高的转换层;
|
||||
2、使用此方案需要使用到 Root 权限(需开启管理员模式)并安装 qemu-user-static;
|
||||
3、chroot 时候可能会出现问题导致程序闪退或异常,出现该问题重启电脑即可;
|
||||
4、在此环境使用 Wine 时,只能读取到您用户目录或本程序文件夹下的文件,其它路径无法读取;
|
||||
5、移除容器时请保证在这次打开电脑时没有调用过需要删除容器,如果有调用过建议重启电脑后再移除;
|
||||
6、暂时属于测试功能;""")))
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.addButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.addButton.setObjectName("addButton")
|
||||
self.verticalLayout.addWidget(self.addButton)
|
||||
self.delButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.delButton.setObjectName("delButton")
|
||||
self.verticalLayout.addWidget(self.delButton)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem1)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout)
|
||||
self.internetWineList = QtWidgets.QListView(self.centralWidget)
|
||||
self.internetWineList.setObjectName("internetWineList")
|
||||
self.horizontalLayout_2.addWidget(self.internetWineList)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setSpacing(6)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
#self.unzip = QtWidgets.QCheckBox(self.centralWidget)
|
||||
#self.unzip.setObjectName("unzip")
|
||||
#self.horizontalLayout.addWidget(self.unzip)
|
||||
#self.deleteZip = QtWidgets.QCheckBox(self.centralWidget)
|
||||
#self.deleteZip.setChecked(True)
|
||||
#self.deleteZip.setTristate(False)
|
||||
#self.deleteZip.setObjectName("deleteZip")
|
||||
#self.horizontalLayout.addWidget(self.deleteZip)
|
||||
#self.addOtherWine = QtWidgets.QPushButton(self.centralWidget)
|
||||
#self.horizontalLayout.addWidget(self.addOtherWine)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem2)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
MainWindow.setCentralWidget(self.centralWidget)
|
||||
# 菜单栏
|
||||
#_translate = QtCore.QCoreApplication.translate
|
||||
|
||||
self.menu = MainWindow.menuBar()
|
||||
self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源"))
|
||||
self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)"))
|
||||
self.ipv6Action = QtWidgets.QAction(_translate("MainWindow", "备用源(只支持 IPv6 用户)"))
|
||||
self.localAction = QtWidgets.QAction(_translate("MainWindow", "本地测试源(127.0.0.1)"))
|
||||
self.changeSources.addAction(self.gitlinkAction)
|
||||
self.changeSources.addAction(self.ipv6Action)
|
||||
self.changeSources.addAction(self.localAction)
|
||||
for i in [self.gitlinkAction, self.ipv6Action, self.localAction]:
|
||||
i.setCheckable(True)
|
||||
self.gitlinkAction.setChecked(True)
|
||||
self.changeSourcesGroup = QtWidgets.QActionGroup(MainWindow)
|
||||
self.changeSourcesGroup.addAction(self.gitlinkAction)
|
||||
self.changeSourcesGroup.addAction(self.ipv6Action)
|
||||
self.changeSourcesGroup.addAction(self.localAction)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "下载 Qemu 镜像"))
|
||||
self.addButton.setText(_translate("MainWindow", "<<"))
|
||||
self.delButton.setText(_translate("MainWindow", ">>"))
|
||||
#self.unzip.setText(_translate("MainWindow", "不解压Wine资源文件"))
|
||||
#self.deleteZip.setText(_translate("MainWindow", "删除下载的资源包,只解压保留(两个选项都选相互抵消)"))
|
||||
#self.addOtherWine.setText(_translate("MainWindow", "导入自己的Wine"))
|
||||
|
||||
def ReadLocalInformation():
|
||||
try:
|
||||
global localJsonList
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
|
||||
localJsonList = json.loads(file.read())
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in localJsonList:
|
||||
item = QtGui.QStandardItem(i)
|
||||
nmodel.appendRow(item)
|
||||
ui.localWineList.setModel(nmodel)
|
||||
file.close()
|
||||
except:
|
||||
print("新建空列表")
|
||||
try:
|
||||
with open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w") as file:
|
||||
file.write("[]")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
def InstallOtherWine():
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(window, "选择 Wine", os.getenv("~"), "wine(wine);;wine64(wine64);;全部文件(*.*)")
|
||||
if path[0] == "" or not path[1]:
|
||||
return
|
||||
try:
|
||||
# 写入配置文件
|
||||
rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/winelist.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# 创建映射
|
||||
name = os.path.basename(os.path.dirname(os.path.dirname(path[0])))
|
||||
if name == "" or name == None:
|
||||
name = f"useradd-wine-{random.randint(0, 99999)}"
|
||||
#binPath = os.path.dirname(os.path.dirname(path[0]))
|
||||
os.makedirs(f"{programPath}/{name}/bin")
|
||||
if os.system(f"ln -s '{path[0]}' '{programPath}/{name}/bin/wine'") != 0:
|
||||
QtWidgets.QMessageBox.critical(window, "新建wine映射失败")
|
||||
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w")
|
||||
list.append(name)
|
||||
file.write(json.dumps(list))
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
ReadLocalInformation()
|
||||
|
||||
def ChangeSources():
|
||||
global urlSources
|
||||
global internetWineSource
|
||||
sources = [ui.gitlinkAction, ui.ipv6Action, ui.localAction]
|
||||
for i in range(0, len(sources)):
|
||||
if sources[i].isChecked():
|
||||
urlSources = internetWineSourceList[i]
|
||||
internetWineSource = internetWineSourceList[i]
|
||||
# 读取信息
|
||||
ReadLocalInformation()
|
||||
ReadInternetInformation()
|
||||
break
|
||||
print(urlSources)
|
||||
|
||||
# 下面内容均翻译自 C++ 版本
|
||||
def ReadInternetInformation():
|
||||
global internetJsonList
|
||||
# C++ 版本是用 curl 的,考虑到 Python 用 requests 反而方便,于是不用 curl
|
||||
try:
|
||||
internetJsonList = json.loads(requests.get(f"{internetWineSource}/lists.json").text)
|
||||
internetJsonListNew = []
|
||||
for k in internetJsonList:
|
||||
archList = json.loads(requests.get(f"{internetWineSource}/{k}/lists.json").text)
|
||||
for e in archList:
|
||||
internetJsonListNew.append([e[0], e[1], k])
|
||||
internetJsonList = internetJsonListNew
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!")
|
||||
return
|
||||
print(internetJsonList)
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in internetJsonList:
|
||||
item = QtGui.QStandardItem(i[0])
|
||||
nmodel.appendRow(item)
|
||||
ui.internetWineList.setModel(nmodel)
|
||||
|
||||
class DownloadThread(QtCore.QThread):
|
||||
MessageBoxInfo = QtCore.pyqtSignal(str)
|
||||
MessageBoxError = QtCore.pyqtSignal(str)
|
||||
ChangeDialog = QtCore.pyqtSignal(QtWidgets.QProgressDialog, int, int, int)
|
||||
Finish = QtCore.pyqtSignal()
|
||||
def __init__(self, progressDialog: QtWidgets.QProgressDialog,
|
||||
url: str, savePath: str, fileName: str, view: QtWidgets.QListView, deleteZip: bool,
|
||||
unzip: bool, localList) -> None:
|
||||
self.dialog = progressDialog
|
||||
self.fileUrl = url
|
||||
self.fileSavePath = savePath
|
||||
self.fileSaveName = fileName
|
||||
self.localView = view
|
||||
self.downloadDeleteZip = deleteZip
|
||||
self.downloadUnzip = unzip
|
||||
self.localJsonList = localList
|
||||
super().__init__()
|
||||
|
||||
def ReadLocalInformation(self):
|
||||
global localJsonList
|
||||
try:
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
|
||||
nmodel = QtGui.QStandardItemModel()
|
||||
localJsonList = json.loads(file.read())
|
||||
for i in localJsonList:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i))
|
||||
self.localView.setModel(nmodel)
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
# 创建文件夹
|
||||
dir = QtCore.QDir()
|
||||
#savePath = f"{programPath}/{self.fileSaveName}"
|
||||
choose = ui.internetWineList.currentIndex().row()
|
||||
arch = internetJsonList[choose][2]
|
||||
savePath = f"{homePath}/.deepin-wine-runner-ubuntu-images/{arch}/{self.fileSaveName}"
|
||||
if not os.path.exists(os.path.dirname(savePath)):
|
||||
os.makedirs(os.path.dirname(savePath))
|
||||
# 文件下载
|
||||
timeout = 0
|
||||
f = requests.get(self.fileUrl, stream=True)
|
||||
allSize = int(f.headers["content-length"]) # 文件总大小
|
||||
bytesRead = 0
|
||||
with open(savePath, "wb") as filePart:
|
||||
for chunk in f.iter_content(chunk_size=1024):
|
||||
if chunk:
|
||||
#progressbar.update(int(part / show))
|
||||
filePart.write(chunk)
|
||||
bytesRead += 1024
|
||||
self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024)
|
||||
self.ChangeDialog.emit(self.dialog, 100, 100, 100)
|
||||
# 写入配置文件
|
||||
rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w")
|
||||
list.append(self.fileSaveName.replace(".tar.gz", ""))
|
||||
file.write(json.dumps(list))
|
||||
file.close()
|
||||
# 读取配置文件
|
||||
self.ReadLocalInformation()
|
||||
self.localJsonList = list
|
||||
# 解压文件
|
||||
shellCommand = ""
|
||||
path = f"{homePath}/.deepin-wine-runner-ubuntu-images/{arch}/{self.fileSaveName.replace('.tar.gz', '')}/"
|
||||
#path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
|
||||
shellCommand += f"""#!/bin/bash
|
||||
mkdir -p \"{path}\"
|
||||
tar -xvf \"{savePath}\" -C \"{path}\"
|
||||
rm \"{savePath}\"
|
||||
"""
|
||||
#if self.downloadDeleteZip:
|
||||
# shellCommand += f"rm -rf \"{savePath}\"\n"
|
||||
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
|
||||
shellFile.write(shellCommand)
|
||||
shellFile.close()
|
||||
process = QtCore.QProcess()
|
||||
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
process.start(f"{programPath}/../launch.sh", command)
|
||||
process.waitForFinished()
|
||||
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
|
||||
self.Finish.emit()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
self.MessageBoxError.emit(traceback.format_exc())
|
||||
|
||||
def MessageBoxInfo(info):
|
||||
QtWidgets.QMessageBox.information(window, "提示", info)
|
||||
|
||||
def MessageBoxError(info):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", info)
|
||||
|
||||
def ChangeDialog(dialog: QtWidgets.QProgressDialog, value, downloadBytes, totalBytes):
|
||||
dialog.setValue(value)
|
||||
dialog.setLabelText(f"{downloadBytes}MB/{totalBytes}MB")
|
||||
|
||||
def DownloadFinish():
|
||||
ui.centralWidget.setEnabled(True)
|
||||
|
||||
class QT:
|
||||
thread = None
|
||||
|
||||
def on_addButton_clicked():
|
||||
choose = ui.internetWineList.currentIndex().row()
|
||||
if choose < 0:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您未选中任何项,无法继续")
|
||||
return
|
||||
downloadName = internetJsonList[choose][1]
|
||||
ReadLocalInformation()
|
||||
for i in localJsonList:
|
||||
if i.replace(".tar.gz", "") == internetJsonList[choose][0]:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您已经安装了这个镜像了!无需重复安装!")
|
||||
return
|
||||
#if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2):
|
||||
# ui.deleteZip.setChecked(False)
|
||||
# ui.unzip.setChecked(False)
|
||||
arch = internetJsonList[choose][2]
|
||||
downloadUrl = f"{internetWineSource}/{arch}/{downloadName}"
|
||||
dialog = QtWidgets.QProgressDialog()
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.setDisabled(True)
|
||||
dialog.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
dialog.setCancelButton(cancel)
|
||||
dialog.setWindowTitle(f"正在下载“{internetJsonList[choose][0]}”")
|
||||
QT.thread = DownloadThread(
|
||||
dialog,
|
||||
downloadUrl,
|
||||
"",
|
||||
internetJsonList[choose][1],
|
||||
ui.localWineList,
|
||||
False,
|
||||
not True,
|
||||
localJsonList
|
||||
)
|
||||
QT.thread.MessageBoxInfo.connect(MessageBoxInfo)
|
||||
QT.thread.MessageBoxError.connect(MessageBoxError)
|
||||
QT.thread.ChangeDialog.connect(ChangeDialog)
|
||||
QT.thread.Finish.connect(DownloadFinish)
|
||||
ui.centralWidget.setDisabled(True)
|
||||
QT.thread.start()
|
||||
|
||||
def on_delButton_clicked():
|
||||
if os.path.exists("/tmp/deepin-wine-runner-qemu-lock"):
|
||||
if QtWidgets.QMessageBox.question(window, "提示", "检测到您的电脑已经运行了 Qemu/Chroot 容器,建议您重启电脑后再删除该容器,否则容易造成数据损失!\n是否取消操作?") == QtWidgets.QMessageBox.Yes:
|
||||
return
|
||||
if QtWidgets.QMessageBox.question(window, "提示", "你确定要删除吗?") == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
if ui.localWineList.currentIndex().row() < 0:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您未选择任何项")
|
||||
return
|
||||
try:
|
||||
# {localJsonList[ui.localWineList.currentIndex().row()]}
|
||||
path = f"{homePath}/.deepin-wine-runner-ubuntu-images/"
|
||||
changed = False
|
||||
for i in os.listdir(path):
|
||||
if os.path.exists(f"{path}/{i}/{localJsonList[ui.localWineList.currentIndex().row()]}"):
|
||||
changed = True
|
||||
name = f"{path}/{i}/{localJsonList[ui.localWineList.currentIndex().row()]}".replace(".tar.gz", "")
|
||||
if not changed:
|
||||
name = f"{path}/i386/{localJsonList[ui.localWineList.currentIndex().row()]}".replace(".tar.gz", "")
|
||||
print(name)
|
||||
# 必须取消挂载目录才行
|
||||
os.system(f"bash '{programPath}/UnMount.sh' '{name}'")
|
||||
#name = f"{homePath}/.deepin-wine-runner-ubuntu-images/{localJsonList[ui.localWineList.currentIndex().row()]}"
|
||||
dir = QtCore.QDir(name)
|
||||
dir.removeRecursively()
|
||||
QtCore.QFile.remove(name + ".tar.gz")
|
||||
del localJsonList[ui.localWineList.currentIndex().row()]
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w")
|
||||
file.write(json.dumps(localJsonList))
|
||||
file.close()
|
||||
ReadLocalInformation()
|
||||
QtWidgets.QMessageBox.information(window, "提示", "删除成功!")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
# 获取当前语言
|
||||
def get_now_lang()->"获取当前语言":
|
||||
return os.getenv('LANG')
|
||||
|
||||
if __name__ == "__main__":
|
||||
homePath = os.getenv("HOME")
|
||||
localJsonList = []
|
||||
internetJsonList = []
|
||||
internetWineSourceList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/deepin-wine-runner-ubuntu-image/raw/branch/master/Sandbox",
|
||||
"http://gfdgdxi.msns.cn/deepin-wine-runner-ubuntu-image/Sandbox", # 备用源,纯 IPv6 源
|
||||
"http://127.0.0.1/deepin-wine-runner-ubuntu-image/Sandbox/" # 本地测试源
|
||||
]
|
||||
internetWineSource = internetWineSourceList[0]
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
if os.system("which qemu-i386-static"):
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "检测到您未安装 qemu-user-static,是否安装?") == QtWidgets.QMessageBox.Yes:
|
||||
OpenTerminal(f"pkexec bash '{programPath}/ShellList/InstallQemuUserStatic.sh'")
|
||||
exit()
|
||||
try:
|
||||
if not os.path.exists(f"{homePath}/.deepin-wine-runner-ubuntu-images/"):
|
||||
os.makedirs(f"{homePath}/.deepin-wine-runner-ubuntu-images/")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(None, "错误", traceback.format_exc())
|
||||
exit()
|
||||
# 读取翻译
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
trans = QtCore.QTranslator()
|
||||
trans.load(f"{programPath}/../LANG/installwine-en_US.qm")
|
||||
app.installTranslator(trans)
|
||||
# 窗口构建
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
ui.setupUi(window)
|
||||
window.show()
|
||||
# 连接信号
|
||||
ui.addButton.clicked.connect(on_addButton_clicked)
|
||||
ui.delButton.clicked.connect(on_delButton_clicked)
|
||||
#ui.addOtherWine.clicked.connect(InstallOtherWine)
|
||||
ui.changeSourcesGroup.triggered.connect(ChangeSources)
|
||||
## 加载内容
|
||||
# 设置列表双击不会编辑
|
||||
ui.localWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
ui.internetWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
# 读取信息
|
||||
ReadLocalInformation()
|
||||
ReadInternetInformation()
|
||||
# 图标
|
||||
ui.centralWidget.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||
|
||||
app.exec_()
|
||||
44
QemuRun.py
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import getpass
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
|
||||
if __name__ == "__main__":
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
homePath = os.getenv("HOME")
|
||||
if len(sys.argv) <= 1:
|
||||
print("参数不足")
|
||||
sys.exit(1)
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
# 判断是否已下载镜像
|
||||
if not os.path.exists(f"{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}"):
|
||||
QtWidgets.QMessageBox.information(None, "提示", "此镜像未下载解压,无法继续")
|
||||
exit()
|
||||
commandList = ""
|
||||
userName = getpass.getuser()
|
||||
for i in sys.argv[3:]:
|
||||
commandList += f"'{i}' "
|
||||
if commandList.replace(" ", "") == "":
|
||||
commandList = "bash"
|
||||
# 需要先取消挂载其它目录以防止冲突
|
||||
path = f"{homePath}/.deepin-wine-runner-ubuntu-images"
|
||||
for i in os.listdir(path):
|
||||
archPath = f"{path}/{i}"
|
||||
if os.path.isdir(archPath):
|
||||
for k in os.listdir(archPath):
|
||||
bottlePath = f"{archPath}/{k}"
|
||||
if os.path.isdir(bottlePath):
|
||||
if f"{i}/{k}" == sys.argv[1]:
|
||||
continue
|
||||
if os.path.ismount(f"{bottlePath}/dev"):
|
||||
os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/UnMount.sh' '{bottlePath}' ")
|
||||
os.system("touch /tmp/deepin-wine-runner-qemu-lock")
|
||||
# 判断是否挂载
|
||||
if not os.path.ismount(f"{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/dev"):
|
||||
print("文件暂未挂载,开始挂载")
|
||||
if int(sys.argv[2]):
|
||||
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/MountWithoutHome.sh' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}' '{userName}' {commandList}"))
|
||||
else:
|
||||
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/Mount.sh' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}' '{userName}' {commandList}"))
|
||||
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY chroot '--userspec={userName}:{userName}' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/' env 'HOME=/home/{userName}' {commandList}"))
|
||||
54
README.md
@@ -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 运行器 2.5.0</h1>
|
||||
<h1 align="center">Wine 运行器 3.1.0</h1>
|
||||
<hr>
|
||||
|
||||
## 介绍
|
||||
@@ -11,8 +11,7 @@ env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
|
||||
```
|
||||
让你可以简易方便的使用 wine
|
||||
是使用 Python3 的 PyQt5 构建的
|
||||
(自己美术功底太差,图标只能在网络上找了)
|
||||
(测试平台:deepin 20.7.1;UOS 家庭版 21.3.1;Ubuntu 22.04;Ubuntu 20.04;UOS 专业版 1050;openkylin)
|
||||
(测试平台:deepin 20.8;UOS 家庭版 21.3.1;Ubuntu 22.04;Ubuntu 20.04;UOS 专业版 1050;openkylin)
|
||||

|
||||
而打包器可以方便的把您的 wine 容器打包成 deb 包供他人使用,程序创建的 deb 构建临时文件夹目录树如下:
|
||||
```bash
|
||||
@@ -38,17 +37,16 @@ env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
|
||||
|
||||
11 directories, 6 files
|
||||
```
|
||||
[](https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers)
|
||||
最后感谢 [@鹤舞白沙](https://bbs.deepin.org/user/227203) 编写的《Wine运行器和Wine打包器傻瓜式使用教程(小白专用)》,链接:https://bbs.deepin.org/post/246837
|
||||
|
||||
## 软件架构
|
||||
i386、amd64 和 arm64,deepin-wine、deepin-wine5、wine、wine64、deepin-wine5-stable、deepin-wine6-stable、spark-wine7-devel、ukylin-wine 运行在哪就运行在哪
|
||||
理论上支持全架构,如果 Python 能运行的话
|
||||
非 X86 架构会利用到 `box86`、`exagear`等技术
|
||||
非 X86 架构会利用到 `box86`、`exagear`、`qemu` 等技术
|
||||
|
||||
## 分支介绍
|
||||
### main 分支
|
||||
主分支,稳定分支
|
||||
### Alpha 分支
|
||||
开发版分支,一般不稳定,有许多 bug
|
||||
|
||||
## 版本区分
|
||||
### 无特殊标识
|
||||
@@ -104,6 +102,46 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
|
||||

|
||||
|
||||
## 更新日志
|
||||
### 3.1.0(2023年01月06日)
|
||||
**※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;**
|
||||
**※2、自动容器配置脚本新增命令 decompressionbottle、programforum、installmsi 以及上述命令的帮助;**
|
||||
**※3、自动容器配置脚本新增评论功能;**
|
||||
**※4、自动容器配置脚本新增许多应用安装脚本;**
|
||||
**※5、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;**
|
||||
**※6、安装 Windows 虚拟机功能提供镜像下载的网盘链接;**
|
||||
**※7、简易打包器支持自动添加宋体;**
|
||||
**8、修复 installfont 命令下载的字体目录错误问题;**
|
||||
**9、修复提交日志功能在提交成功时依旧提示提交失败问题;**
|
||||
**10、支持强制启用所有被禁用的组件(不推荐)。**
|
||||
|
||||

|
||||
|
||||
### 3.0.0(2022年12月10日)
|
||||
**※1、支持使用 Qemu + Chroot 跨运行 Wine 以及指定程序的功能;**
|
||||
**※2、提供了简易打包器以用于打包简易 deb;**
|
||||
**※3、支持下载配置过的 Qemu + Chroot 容器;**
|
||||
**※4、支持在隔离的 Chroot 容器内运行 Wine;**
|
||||
**※5、支持解压指定 deb 的内打包好的容器;**
|
||||
**※6、优化 Wine 列表显示;**
|
||||
**※7、新增程序论坛和教程入口;**
|
||||
**※8、程序公告功能;**
|
||||
**※9、新增程序评分功能;**
|
||||
**※10、新增解包 deb 内 Wine 容器功能;**
|
||||
**※11、新增 Vkd3d Proton 安装功能,更新 dxvk 版本至 2.0.0;**
|
||||
**※12、新增程序菜单栏部分栏目图标;**
|
||||
**※13、打包器支持按下 Shift + F1 查看指定选项提示;**
|
||||
14、优化非基于生态适配脚本的打包器内容自动填充功能;
|
||||
15、优化程序文案;
|
||||
16、新增日志翻译功能;
|
||||
17、程序进一步完善英语翻译(机翻);
|
||||
18、优化程序更新策略;
|
||||
19、优化日志分析功能;
|
||||
20、优化程序 UI。
|
||||

|
||||
|
||||
### 2.5.0.1(2022年11月25日)
|
||||
**※1、修复已知问题**
|
||||
|
||||
### 2.5.0(2022年11月25日)
|
||||
**※1、容器自动配置脚本 GUI 查看介绍使用 QWebEngineWidget,支持图片(非强制依赖,只做推荐);**
|
||||
**※2、不基于生态适配活动脚本打包器跟进 arm 架构 2022年11月11日的 Wine 微信打包方式;**
|
||||
@@ -469,6 +507,6 @@ Gitlink:https://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner
|
||||
|
||||
## Star 一下吧
|
||||
开发不易,原创艰难,给一个 Star 吧,你的 Star 是我继续开发的动力
|
||||
[](https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers)
|
||||

|
||||
|
||||
# ©2020-Now
|
||||
13
RemovePycacheFile.py
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
def Remove(path):
|
||||
for i in os.listdir(path):
|
||||
nowPath = f"{path}/{i}"
|
||||
if os.path.isdir(nowPath):
|
||||
if i == "__pycache__":
|
||||
os.system(f"rm -rfv '{nowPath}'")
|
||||
else:
|
||||
Remove(nowPath)
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
debPath = f"{programPath}/deb"
|
||||
Remove(debPath)
|
||||
4
RunVM.sh
@@ -8,10 +8,10 @@
|
||||
# 基于 Python3 的 tkinter 构建
|
||||
###########################################################################################
|
||||
cd `dirname $0`
|
||||
which VBoxManage1
|
||||
which VBoxManage
|
||||
if test $? == 0 ; then
|
||||
VM/VirtualMachine
|
||||
exit
|
||||
fi
|
||||
zenity --info --no-wrap --text="未安装 VirtualBox,请自行安装 VirtualBox 并重新运行"
|
||||
#./launch.sh deepin-terminal -C "pkexec apt install virtualbox-6.1 -y && zenity --info --text=\"安装完毕,关闭此对话框和安装终端重新运行程序即可\" --no-wrap" --keep-open
|
||||
#./launch.sh deepin-terminal -C "pkexec apt install virtualbox-6.1 -y && zenity --info --text=\"安装完毕,关闭此对话框和安装终端重新运行程序即可\" --no-wrap" --keep-open
|
||||
|
||||
3
ShellList/InstallQemuUserStatic.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
echo 开始安装 qemu-user-static
|
||||
pkexec apt update
|
||||
pkexec apt install qemu-user-static -y
|
||||
@@ -41,9 +41,6 @@ class Ui_MainWindow(object):
|
||||
self.getFen = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.getFen.setObjectName("getFen")
|
||||
self.horizontalLayout_2.addWidget(self.getFen)
|
||||
self.uploadFen = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.uploadFen.setObjectName("uploadFen")
|
||||
self.horizontalLayout_2.addWidget(self.uploadFen)
|
||||
self.runBotton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.runBotton.setObjectName("runBotton")
|
||||
self.horizontalLayout_2.addWidget(self.runBotton)
|
||||
@@ -110,8 +107,7 @@ class Ui_MainWindow(object):
|
||||
self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
|
||||
self.saerchBotton.setText(_translate("MainWindow", "搜索"))
|
||||
self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍"))
|
||||
self.getFen.setText(_translate("MainWindow", "获取选中项的评分"))
|
||||
self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分"))
|
||||
self.getFen.setText(_translate("MainWindow", "获取/提交选中项的评分和评论"))
|
||||
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
|
||||
self.menu.setTitle(_translate("MainWindow", "程序"))
|
||||
self.menu_2.setTitle(_translate("MainWindow", "切换源"))
|
||||
|
||||
@@ -64,14 +64,7 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="getFen">
|
||||
<property name="text">
|
||||
<string>获取选中项的评分</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uploadFen">
|
||||
<property name="text">
|
||||
<string>提交选中项的评分</string>
|
||||
<string>获取/提交选中项的评分和评论</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
BIN
UI/__pycache__/KeyAddGui.cpython-37.pyc
Executable file → Normal file
37
UnMount.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
if [ ` whoami ` != "root" ]; then
|
||||
echo "Only root can run me"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "路径不存在!"
|
||||
exit 1
|
||||
fi
|
||||
echo $0
|
||||
echo $1
|
||||
echo $2
|
||||
#echo $3
|
||||
# 挂载必备目录
|
||||
cd "$1"
|
||||
umount ./dev
|
||||
umount ./dev/pts
|
||||
umount ./proc
|
||||
umount ./etc/resolv.conf
|
||||
umount ./sys
|
||||
umount ./dev/shm
|
||||
# 挂载 Wine 运行器目录
|
||||
umount ./opt
|
||||
umount ./opt/apps/deepin-wine-runner
|
||||
# 挂载字体
|
||||
umount ./usr/share/fonts
|
||||
# 挂载用户目录到 /root(默认 $HOME 路径)
|
||||
umount ./root
|
||||
for username in $(ls ./home)
|
||||
do
|
||||
echo ./home/$username
|
||||
umount ./home/$username
|
||||
# if [ -d ./home/$username/.deepinwine/$CONTAINER_NAME ]
|
||||
# then
|
||||
# rm -rf ./home/$username/.deepinwine/$CONTAINER_NAME
|
||||
# fi
|
||||
done
|
||||
@@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: VirtualMachine
|
||||
# Generated by qmake (3.1) (Qt 5.15.3)
|
||||
# Generated by qmake (3.1) (Qt 5.15.6)
|
||||
# Project: VirtualMachine.pro
|
||||
# Template: app
|
||||
# Command: /usr/lib/qt5/bin/qmake -o Makefile VirtualMachine.pro
|
||||
@@ -68,8 +68,6 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
|
||||
@@ -78,12 +76,7 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
|
||||
@@ -94,12 +87,9 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
|
||||
@@ -109,34 +99,19 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkit.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
|
||||
@@ -183,8 +158,6 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \
|
||||
@@ -193,12 +166,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \
|
||||
@@ -209,12 +177,9 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \
|
||||
@@ -224,34 +189,19 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkit.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \
|
||||
@@ -288,8 +238,6 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri:
|
||||
@@ -298,12 +246,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri:
|
||||
@@ -314,12 +257,9 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri:
|
||||
@@ -329,34 +269,19 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkit.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.8.2, 2022-08-22T21:48:17. -->
|
||||
<!-- Written by QtCreator 4.8.2, 2022-12-28T17:03:37. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{e6fddbe7-fcb3-41be-bb11-3a30892600b9}</value>
|
||||
<value type="QByteArray">{4ffd6df9-1365-4837-81b1-582e0e2d1f21}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@@ -62,9 +62,9 @@
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{b6becee2-04dc-4df3-9a41-75e9b60eccc8}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 5.15.6 in PATH (qt5)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 5.15.6 in PATH (qt5)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{ab20853c-9d79-473a-820e-8e95c145170e}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
@@ -181,20 +181,19 @@
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">VirtualMachine</value>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/VirtualMachine.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">VirtualMachine.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
||||
214
VM-source/VirtualMachine.pro.user.e6fddbe
Executable file
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.8.2, 2022-12-28T17:03:29. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{e6fddbe7-fcb3-41be-bb11-3a30892600b9}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey"/>
|
||||
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{b6becee2-04dc-4df3-9a41-75e9b60eccc8}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy Configuration</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">VirtualMachine</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/VirtualMachine.pro</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">VirtualMachine.pro</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">20</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">20</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
BIN
VM-source/Windows7X64Auto.iso
Executable file → Normal file
BIN
VM-source/Windows7X86Auto.iso
Executable file → Normal file
41
VM-source/mainwindow.cpp.autosave
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 归属 RacoonGX 团队,开发者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
*/
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QNetworkInterface>
|
||||
#include <QProcess>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->tabWidget->setTabPosition(QTabWidget::West); // 标签靠左
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::on_browser_clicked()
|
||||
{
|
||||
// 浏览镜像文件
|
||||
QString filePath = QFileDialog::getOpenFileName(this, "选择 ISO 文件", QDir::homePath(), "ISO 镜像文件(*.iso);;所有文件(*.*)");
|
||||
if(filePath != ""){
|
||||
ui->isoPath->setText(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_install_clicked()
|
||||
{
|
||||
QProcess progress;
|
||||
QStringList list;
|
||||
list << ui->isoPath->text() << QString::number(ui->systemVersion->currentIndex());
|
||||
qDebug() << QCoreApplication::applicationDirPath() + QString("/run.py");
|
||||
progress.startDetached(QCoreApplication::applicationDirPath() + QString("/run.py"), list);
|
||||
ui->tabWidget->setCurrentIndex(1);
|
||||
}
|
||||
BIN
VM-source/mainwindow.o
Executable file → Normal file
@@ -128,6 +128,9 @@
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Noto Sans CJK SC'; font-size:10.5pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">使用迅雷或者网盘下载以下任意一个链接然后在上面选择即可:</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">123 网盘链接:https://www.123pan.com/s/pDSKVv-oypWv</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">迅雷网盘:https://pan.xunlei.com/s/VNKMz3wgbYHg6JIh50ZKIc7pA1?pwd=35e5 提取码:35e5</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">百度网盘:https://pan.baidu.com/s/19WbvinITCQJFZpAdZutrjg?pwd=me4y 提取码: me4y</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">(如果下载这个,系统版本选第一项,一般推荐这个)ed2k://|file|cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso|2653276160|7503E4B9B8738DFCB95872445C72AEFB|/</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">(如果下载这个,系统版本选第二项)ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|3420557312|B58548681854236C7939003B583A8078|/</span></p>
|
||||
<hr /></body></html></string>
|
||||
@@ -290,7 +293,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Github:<a href="https://github.com/gfdgd-xi/deep-wine-runner"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">https://github.com/gfdgd-xi/deep-wine-runner</span></a></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Gitlink:<a href="https://gitlink.org.cn/gfdgd_xi/deep-wine-runner"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">https://gitlink.org.cn/gfdgd_xi/deep-wine-runner</span></a></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">此组件也有非常大的缺点,就是相比于 Wine,会需要占用大量的空间、安装需要大量的时间、某些情况下需要相比于 Wine 需要消耗更多的系统资源,但可以更加完美、流畅的运行 Windows 应用,会尽量减少因为缺少或未实现导致的 Windows exe 程序运行异常</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">该组件制作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">该组件制作者:RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢</p>
|
||||
<hr />
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">参考文献:</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Droid Sans Mono','monospace','monospace'; font-size:11pt; color:#6a9955;">https://juejin.cn/post/7080484519328874510</span></p></body></html></string>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'mainwindow.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.3)
|
||||
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.15.6)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
@@ -13,7 +13,7 @@
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'mainwindow.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 67
|
||||
#error "This file was generated using the moc from 5.15.3. It"
|
||||
#error "This file was generated using the moc from 5.15.6. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
BIN
VM-source/moc_mainwindow.o
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Resource object code
|
||||
**
|
||||
** Created by: The Resource Compiler for Qt version 5.15.3
|
||||
** Created by: The Resource Compiler for Qt version 5.15.6
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
@@ -215683,10 +215683,10 @@ static const unsigned char qt_resource_struct[] = {
|
||||
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
||||
// :/deepin-wine-runner.png
|
||||
0x0,0x0,0x0,0xe,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
|
||||
0x0,0x0,0x1,0x82,0x16,0x7c,0xaa,0x8,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0x59,
|
||||
// :/deepin-wine-runner.svg
|
||||
0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x42,0x15,
|
||||
0x0,0x0,0x1,0x82,0x16,0x74,0x25,0x6b,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0x59,
|
||||
// :/picture
|
||||
0x0,0x0,0x0,0x72,0x0,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x5,
|
||||
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
||||
@@ -215695,49 +215695,49 @@ static const unsigned char qt_resource_struct[] = {
|
||||
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
|
||||
// :/picture/截图_VirtualBox Machine_20220712142929.png
|
||||
0x0,0x0,0x0,0x90,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x6e,0x8c,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0x6f,0x60,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf5,0x5,
|
||||
// :/picture/截图/截图_选择区域_20220712224639.png
|
||||
0x0,0x0,0x2,0xea,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x17,0xa1,0x2b,
|
||||
0x0,0x0,0x1,0x81,0xf2,0xe0,0xae,0xa0,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf5,0x5,
|
||||
// :/picture/截图/截图_VirtualBox Manager_20220712223602.png
|
||||
0x0,0x0,0x1,0xe8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0xe,0x70,0x91,
|
||||
0x0,0x0,0x1,0x81,0xf2,0xd8,0x55,0xe8,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf5,0x1,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712143103.png
|
||||
0x0,0x0,0x2,0x3e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x10,0x1c,0xd0,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0x9e,0x40,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xfd,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712143006.png
|
||||
0x0,0x0,0x4,0x16,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2e,0x76,0xc1,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0xe8,0x78,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xf5,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712143018.png
|
||||
0x0,0x0,0x0,0xe6,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x7,0x1f,0x9,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0xd4,0xf0,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xf5,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712143029.png
|
||||
0x0,0x0,0x2,0x94,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x13,0xc8,0x43,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0xc9,0x38,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xf9,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712143037.png
|
||||
0x0,0x0,0x3,0x7a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2a,0xc4,0x82,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0xb9,0x98,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xf9,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712143044.png
|
||||
0x0,0x0,0x1,0x92,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0xb,0x77,0xc3,
|
||||
0x0,0x0,0x1,0x81,0xf1,0x1b,0xad,0xe0,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xf9,
|
||||
// :/picture/截图/截图_VirtualBox_20220712223705.png
|
||||
0x0,0x0,0x3,0xd0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2d,0xb9,0x6d,
|
||||
0x0,0x0,0x1,0x81,0xf2,0xd8,0x65,0x88,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf5,0x1,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712192850.png
|
||||
0x0,0x0,0x1,0x3c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x9,0x91,0x7a,
|
||||
0x0,0x0,0x1,0x81,0xf2,0x2c,0x4,0xa0,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xfd,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712191756.png
|
||||
0x0,0x0,0x4,0x6c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x31,0x8f,0xdb,
|
||||
0x0,0x0,0x1,0x81,0xf2,0x21,0xd7,0x28,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0xfd,
|
||||
// :/picture/截图/截图_VirtualBox Machine_20220712193527.png
|
||||
0x0,0x0,0x3,0x24,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x27,0x59,0x2,
|
||||
0x0,0x0,0x1,0x81,0xf2,0x32,0x2e,0xc0,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf5,0x1,
|
||||
// :/LANG/virtualmachine-en_US.qm
|
||||
0x0,0x0,0x4,0xf6,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x34,0x96,0x28,
|
||||
0x0,0x0,0x1,0x82,0xc5,0xe0,0x5a,0x58,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0x31,
|
||||
// :/LANG/virtualmachine-en_US.ts
|
||||
0x0,0x0,0x4,0xc2,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x34,0x88,0x1b,
|
||||
0x0,0x0,0x1,0x82,0xc5,0xea,0xbd,0x5e,
|
||||
0x0,0x0,0x1,0x84,0x61,0x97,0xf4,0x31,
|
||||
|
||||
};
|
||||
|
||||
|
||||
BIN
VM-source/qrc_图标.o
Executable file → Normal file
@@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'mainwindow.ui'
|
||||
**
|
||||
** Created by: Qt User Interface Compiler version 5.15.3
|
||||
** Created by: Qt User Interface Compiler version 5.15.6
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
********************************************************************************/
|
||||
@@ -232,15 +232,19 @@ public:
|
||||
systemVersion->setItemText(2, QCoreApplication::translate("MainWindow", "\345\205\266\345\256\203 Windows \347\263\273\347\273\237\357\274\210\344\270\215\346\224\257\346\214\201\350\207\252\345\212\250\345\256\211\350\243\205\357\274\211", nullptr));
|
||||
|
||||
systemVersion->setCurrentText(QString());
|
||||
systemVersion->setPlaceholderText(QCoreApplication::translate("MainWindow", "\350\257\267\351\200\211\346\213\251\347\263\273\347\273\237\347\261\273\345\236\213\357\274\210\345\246\202\346\236\234\350\257\206\345\210\253\344\270\215\344\272\206\350\257\267\350\207\252\350\241\214\351\200\211\346\213\251\357\274\214\345\246\202\346\236\234\351\200\211\346\213\251\351\224\231\350\257\257\346\210\226\344\270\215\346\224\257\346\214\201\345\260\206\346\227\240\346\263\225\350\277\233\350\241\214\350\207\252\345\212\250\345\256\211\350\243\205\357\274\211", nullptr));
|
||||
// systemVersion->setPlaceholderText(QCoreApplication::translate("MainWindow", "\350\257\267\351\200\211\346\213\251\347\263\273\347\273\237\347\261\273\345\236\213\357\274\210\345\246\202\346\236\234\350\257\206\345\210\253\344\270\215\344\272\206\350\257\267\350\207\252\350\241\214\351\200\211\346\213\251\357\274\214\345\246\202\346\236\234\351\200\211\346\213\251\351\224\231\350\257\257\346\210\226\344\270\215\346\224\257\346\214\201\345\260\206\346\227\240\346\263\225\350\277\233\350\241\214\350\207\252\345\212\250\345\256\211\350\243\205\357\274\211", nullptr));
|
||||
install->setText(QCoreApplication::translate("MainWindow", "\345\256\211\350\243\205", nullptr));
|
||||
textBrowser_3->setHtml(QCoreApplication::translate("MainWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
||||
"p, li { white-space: pre-wrap; }\n"
|
||||
"</style></head><body style=\" font-family:'Noto Sans CJK SC'; font-size:10.5pt; font-weight:400; font-style:normal;\">\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">\344\275\277\347\224\250\350\277\205\351\233\267\346\210\226\350\200\205\347\275\221\347\233\230\344\270\213\350\275\275\344\273\245\344\270\213\344\273\273\346\204\217\344\270\200\344\270\252\351\223\276\346\216\245\347\204\266\345\220\216\345\234\250\344\270\212\351\235\242\351\200\211\346\213\251\345\215\263\345\217\257\357\274\232</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">\357\274\210\345"
|
||||
"\246\202\346\236\234\344\270\213\350\275\275\350\277\231\344\270\252\357\274\214\347\263\273\347\273\237\347\211\210\346\234\254\351\200\211\347\254\254\344\270\200\351\241\271\357\274\214\344\270\200\350\210\254\346\216\250\350\215\220\350\277\231\344\270\252\357\274\211ed2k://|file|cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso|2653276160|7503E4B9B8738DFCB95872445C72AEFB|/</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">123 \347\275\221"
|
||||
"\347\233\230\351\223\276\346\216\245\357\274\232https://www.123pan.com/s/pDSKVv-oypWv</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">\350\277\205\351\233\267\347\275\221\347\233\230\357\274\232https://pan.xunlei.com/s/VNKMz3wgbYHg6JIh50ZKIc7pA1?pwd=35e5 \346\217\220\345\217\226\347\240\201\357\274\23235e5</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">\347\231\276\345\272\246\347\275\221\347\233\230\357\274\232https://pan.baidu.com/s/19WbvinITCQJFZpAdZutrjg?pwd=me4y \346\217\220\345\217\226\347\240\201: me4y</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">\357\274\210\345\246\202\346\236\234\344\270\213\350\275\275\350\277\231\344\270\252\357\274"
|
||||
"\214\347\263\273\347\273\237\347\211\210\346\234\254\351\200\211\347\254\254\344\270\200\351\241\271\357\274\214\344\270\200\350\210\254\346\216\250\350\215\220\350\277\231\344\270\252\357\274\211ed2k://|file|cn_windows_7_ultimate_with_sp1_x86_dvd_u_677486.iso|2653276160|7503E4B9B8738DFCB95872445C72AEFB|/</span></p>\n"
|
||||
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">\357\274\210\345\246\202\346\236\234\344\270\213\350\275\275\350\277\231\344\270\252\357\274\214\347\263\273\347\273\237\347\211\210\346\234\254\351\200\211\347\254\254\344\272\214\351\241\271\357\274\211ed2k://|file|cn_windows_7_ultimate_with_sp1_x64_dvd_u_677408.iso|3420557312|B58548681854236C7939003B583A8078|/</span></p>\n"
|
||||
"<hr /></body></html>", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(tab), QCoreApplication::translate("MainWindow", "\350\256\276\347\275\256", nullptr));
|
||||
@@ -343,11 +347,11 @@ public:
|
||||
"></p>\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\346\255\244\347\273\204\344\273\266\344\271\237\346\234\211\351\235\236\345\270\270\345\244\247\347\232\204\347\274\272\347\202\271\357\274\214\345\260\261\346\230\257\347\233\270\346\257\224\344\272\216 Wine\357\274\214\344\274\232\351\234\200\350\246\201\345\215\240\347\224\250\345\244\247\351\207\217\347\232\204\347\251\272\351\227\264\343\200\201\345\256\211\350\243\205\351\234\200\350\246\201\345\244\247\351\207\217\347\232\204\346\227\266\351\227\264\343\200\201\346\237\220\344\272\233\346\203\205\345\206\265\344\270\213\351\234\200\350\246\201\347\233\270\346\257\224\344\272\216 Wine \351\234\200\350\246\201\346\266\210\350\200\227\346\233\264\345\244\232\347\232\204\347\263\273\347\273\237\350\265\204\346\272\220\357\274\214\344\275\206\345\217\257\344\273\245\346\233\264\345\212\240\345\256\214\347\276\216\343\200\201\346\265\201\347\225\205\347\232\204\350\277\220\350\241"
|
||||
"\214 Windows \345\272\224\347\224\250\357\274\214\344\274\232\345\260\275\351\207\217\345\207\217\345\260\221\345\233\240\344\270\272\347\274\272\345\260\221\346\210\226\346\234\252\345\256\236\347\216\260\345\257\274\350\207\264\347\232\204 Windows exe \347\250\213\345\272\217\350\277\220\350\241\214\345\274\202\345\270\270</p>\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\350\257\245\347\273\204\344\273\266\345\210\266\344\275\234\350\200\205\357\274\232gfdgd xi\343\200\201\344\270\272\344\273\200\344\271\210\346\202\250\344\270\215\345\226\234\346\254\242\347\206\212\345\207\272\346\262\241\345\222\214\351\230\277\345\270\203\345\221\242</p>\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\350\257\245\347\273\204\344\273\266\345\210\266\344\275\234\350\200\205\357\274\232gfdgd xi、为什么您不喜欢熊出没和阿布呢,RacoonGX 团队作品</p>\n"
|
||||
"<hr />\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\345\217\202\350\200\203\346\226\207\347\214\256\357\274\232</p>\n"
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-b"
|
||||
"lock-indent:0; text-indent:0px;\"><span style=\" font-family:'Droid Sans Mono','monospace','monospace'; font-size:11pt; color:#6a9955;\">https://juejin.cn/post/7080484519328874510</span></p></body></html>", nullptr));
|
||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:'Droid Sans Mono','monospace','monospace'; font-size:11pt; color:#6a9955;\">https://juejin.cn/"
|
||||
"post/7080484519328874510</span></p></body></html>", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(tab_2), QCoreApplication::translate("MainWindow", "\345\205\263\344\272\216", nullptr));
|
||||
} // retranslateUi
|
||||
|
||||
|
||||
BIN
VM/Windows7X64Auto.iso
Executable file → Normal file
BIN
VM/Windows7X86Auto.iso
Executable file → Normal file
BIN
Wine运行器和Wine打包器傻瓜式使用教程(小白专用)20221126-V2.pdf
Executable file
0
arm-package.7z
Normal file → Executable file
@@ -1,29 +1,30 @@
|
||||
Package: spark-deepin-wine-runner
|
||||
Version: 2.5.0
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢
|
||||
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner
|
||||
Version: 3.1.0
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||
Homepage: https://gitee.com/gfdgd-xi-org/deep-wine-runner
|
||||
Architecture: all
|
||||
Severity: serious
|
||||
Certainty: possible
|
||||
Check: binaries
|
||||
Type: binary, udeb
|
||||
Priority: optional
|
||||
Depends: python3, python3-pil, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, fakeroot, bash, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip
|
||||
Recommends: winbind, wimtools
|
||||
Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar, unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo
|
||||
Recommends: winbind, wimtools, python3-pyqt5.qtwebengine
|
||||
Section: utils
|
||||
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
|
||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer
|
||||
Installed-Size: 21844
|
||||
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器
|
||||
2.5.0 更新内容:
|
||||
※1、容器自动配置脚本 GUI 查看介绍使用 QWebEngineWidget,支持图片(非强制依赖,只做推荐);
|
||||
※2、不基于生态适配活动脚本打包器跟进 arm 架构 2022年11月11日的 Wine 微信打包方式;
|
||||
※3、支持多图标的程序打包;
|
||||
※4、修复了安装更多 Wine 换源换了个寂寞的问题;
|
||||
※5、修复安装更多 Wine 重新安装后列表丢失的问题;
|
||||
※6、新增了对 Deepin 23 Alpha 优化的 Wine 安装器;
|
||||
※7、新增 Dll 名称查询功能,可以查询对应 Dll 的作用;
|
||||
※8、支持静态获取可执行文件可以调用的 Dll 并提供解决方案;
|
||||
※9、支持移除指定的 .desktop 快捷方式;
|
||||
※10、新增日志分析功能以及导出、上传日志功能;
|
||||
11、修复了不基于生态适配活动脚本打包器在选择 arm 打包架构下容器自动删除脚本取消勾选无用的问题;
|
||||
12、优化文案、新增友链;
|
||||
13、提供了部分组件的测试功能。
|
||||
更新时间:2022年11月25日
|
||||
作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner
|
||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner
|
||||
Installed-Size: 25856
|
||||
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器,RacoonGX 团队作品
|
||||
3.1.0 更新内容:
|
||||
※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;
|
||||
※2、自动容器配置脚本新增命令 decompressionbottle、programforum、installmsi 以及上述命令的帮助;
|
||||
※3、自动容器配置脚本新增评论功能;
|
||||
※4、自动容器配置脚本新增许多应用安装脚本;
|
||||
※5、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;
|
||||
※6、安装 Windows 虚拟机功能提供镜像下载的网盘链接;
|
||||
※7、简易打包器支持自动添加宋体;
|
||||
8、修复 installfont 命令下载的字体目录错误问题;
|
||||
9、修复提交日志功能在提交成功时依旧提示提交失败问题;
|
||||
10、支持强制启用所有被禁用的组件(不推荐)。
|
||||
更新时间:2023年01月06日
|
||||
作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢,RacoonGX 团队作品
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# 使用系统默认的 sh 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.3.0
|
||||
# 版本:3.0.0
|
||||
# 更新时间:2022年10月02日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
# 基于 sh
|
||||
@@ -10,6 +10,7 @@
|
||||
# 非强制性的必应组件,所以成功不成功都行
|
||||
echo 安装组件
|
||||
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
|
||||
echo 执行完成
|
||||
echo 移除旧组件
|
||||
if [ -d /opt/apps/deepin-wine-runner/arm-package ]; then
|
||||
@@ -48,9 +49,19 @@ if [ `arch` != "x86_64" ]; then
|
||||
rm -rf /opt/apps/deepin-wine-runner/InstallNewWineHQ.sh
|
||||
fi
|
||||
# 到时候切换 gpg 源会方便很多
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FD6EEA1F20CD4B27 > /dev/null 2>&1 | true
|
||||
apt update > /dev/null 2>&1 | true
|
||||
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
|
||||
# 向服务器返回安装数加1(不显示内容且忽略错误)
|
||||
curl https://304626p927.goho.co/spark-deepin-wine-runner/Install.php?Version=2.5.0 -s > /dev/null 2>&1 | true
|
||||
python3 /opt/apps/deepin-wine-runner/Download.py 3.1.0 > /dev/null 2>&1 | true
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import WineRunner
|
||||
WineRunner.Bash("a").runList([["thank"], ["version"]])
|
||||
#WineRunner.Bash("a").runCommand("thank")
|
||||
@@ -15,6 +15,7 @@ import sys
|
||||
import base64
|
||||
import json
|
||||
import traceback
|
||||
import urllib.request
|
||||
import req as requests
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
from UI.AutoConfig import *
|
||||
@@ -31,12 +32,13 @@ urlSourcesList = [
|
||||
"https://gitee.com/gfdgd-xi/deep-wine-runner-auto-configuration-script/raw/master/", # Gitee 源
|
||||
"https://gfdgd-xi.github.io/deep-wine-runner-auto-configuration-script/", # Github 源
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/auto/", # 备用源1,纯 IPv6 源
|
||||
"http://120.25.153.144/deep-wine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/deep-wine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/wine-runner-list/auto/", # 备用源 3
|
||||
"http://127.0.0.1/wine-runner-list/auto/" # 本地测试源
|
||||
]
|
||||
urlSources = urlSourcesList[0]
|
||||
lists = []
|
||||
|
||||
class ProgramRunStatusUpload():
|
||||
msgWindow = None
|
||||
starLayout = None
|
||||
@@ -136,7 +138,7 @@ class InformationWindow():
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
||||
try:
|
||||
import requests as r
|
||||
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
@@ -207,10 +209,36 @@ class InformationWindow():
|
||||
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()
|
||||
@@ -224,15 +252,12 @@ class ProgramRunStatusShow():
|
||||
fileName = i[1]
|
||||
break
|
||||
try:
|
||||
fenlists = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9iYXNoYXBwLw==").decode("utf-8") + fileName + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
#r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
|
||||
#r.encoding = "utf-8"
|
||||
#title = r.text
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
#traceback.print_exc()
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?"
|
||||
tipsInfo = "暂时无人提交此脚本评分,是否立即提交?"
|
||||
|
||||
maxHead = fenlists.index(max(fenlists))
|
||||
allNumber = 0
|
||||
@@ -248,13 +273,13 @@ class ProgramRunStatusShow():
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
starLayout = QtWidgets.QHBoxLayout()
|
||||
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
|
||||
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)
|
||||
msgWidgetLayout.addLayout(starLayout, 0, 1)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2)
|
||||
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, 3, 0, 1, 2)
|
||||
msgWidgetLayout.addWidget(uploadButton, 1, 2)
|
||||
end = 5
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
@@ -265,12 +290,135 @@ class ProgramRunStatusShow():
|
||||
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"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{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"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{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"https://code.gitlink.org.cn/gfdgd-xi-org/bashpinlun/raw/branch/master/{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
|
||||
# 获取选中项
|
||||
@@ -401,6 +549,7 @@ if __name__ == "__main__":
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
pinLunLayout = QtWidgets.QHBoxLayout()
|
||||
ui.setupUi(window)
|
||||
window.setWindowTitle(f"Wine 运行器 {version}——容器自动配置部署脚本")
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
@@ -422,7 +571,7 @@ if __name__ == "__main__":
|
||||
#pass
|
||||
# 连接信号和槽
|
||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||
ui.uploadFen.clicked.connect(UploadFen)
|
||||
#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)
|
||||
|
||||
14
deb/opt/apps/deepin-wine-runner/AutoShell/command/decompressionbottle
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
deb/opt/apps/deepin-wine-runner/AutoShell/command/installmsi
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
14
deb/opt/apps/deepin-wine-runner/AutoShell/command/programforum
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
||||
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))
|
||||
3
deb/opt/apps/deepin-wine-runner/ChangePassword.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
echo -e "123456\n123456\n\n\n\n\n\n\n\n\n" | adduser "$1"
|
||||
echo -e "123456\n123456\n" | passwd root
|
||||
@@ -38,5 +38,9 @@
|
||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6"
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6",
|
||||
"installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库",
|
||||
"decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径",
|
||||
"programforum": "打开程序论坛\n参数数量:0\n参数介绍:无",
|
||||
"installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径"
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 版本:3.0.1
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
@@ -11,8 +11,10 @@ import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import random
|
||||
import platform
|
||||
import traceback
|
||||
import webbrowser
|
||||
import subprocess
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
# 读取文本文档
|
||||
@@ -38,8 +40,8 @@ programEnv = [
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
@@ -57,6 +59,19 @@ readOnlyEnv = [
|
||||
"($SYSTEM)",
|
||||
"($DEBUG)"
|
||||
]
|
||||
|
||||
def FindFile(file, name):
|
||||
for i in os.listdir(file):
|
||||
path = f"{file}/{i}"
|
||||
if os.path.isdir(path):
|
||||
returnPath = FindFile(path, name)
|
||||
if returnPath != None:
|
||||
return returnPath.replace("//", "/")
|
||||
if os.path.isfile(path):
|
||||
if i == name:
|
||||
return path
|
||||
return None
|
||||
|
||||
def Debug():
|
||||
if "--debug" in sys.argv:
|
||||
traceback.print_exc()
|
||||
@@ -111,7 +126,10 @@ class Command():
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink",
|
||||
"installvb",
|
||||
"installother"
|
||||
"installother",
|
||||
"decompressionbottle",
|
||||
"programforum",
|
||||
"installmsi"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
@@ -279,7 +297,7 @@ class Command():
|
||||
|
||||
def Version(self):
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
return 0
|
||||
|
||||
def Pause(self) -> int:
|
||||
@@ -389,6 +407,20 @@ class Command():
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyServer", "/d", f"{proxyServerAddress}:{port}", "/f"]
|
||||
self.Bat()
|
||||
|
||||
def DecompressionBottle(self):
|
||||
tempDebDir = f"/tmp/wine-runner-unpack-deb-{random.randint(0, 1000)}"
|
||||
if os.system(f"dpkg -x '{self.command[1]}' '{tempDebDir}'"):
|
||||
return 1
|
||||
zippath = FindFile(tempDebDir, "files.7z")
|
||||
if zippath == None:
|
||||
return 2
|
||||
# 解压文件
|
||||
os.system(f"mkdir -p '{self.command[2]}'")
|
||||
fi = os.system(f"7z x -y '{zippath}' -o'{self.command[2]}'")
|
||||
os.system(f"rm -rfv '{tempDebDir}'")
|
||||
return fi
|
||||
|
||||
|
||||
def DisbledHttpProxy(self):
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
self.Bat()
|
||||
@@ -401,6 +433,13 @@ class Command():
|
||||
import InstallOther
|
||||
return InstallOther.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
def ProgramForum(self):
|
||||
webbrowser.open_new_tab("https://gfdgdxi.flarum.cloud/")
|
||||
|
||||
def InstallMSI(self):
|
||||
self.command = ["bat", "msiexec", "/i", self.command[1]]
|
||||
return self.Bat()
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
@@ -443,7 +482,10 @@ class Command():
|
||||
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
|
||||
"installvb": InstallVB,
|
||||
"installother": InstallOther
|
||||
"installother": InstallOther,
|
||||
"decompressionbottle": DecompressionBottle,
|
||||
"programforum": ProgramForum,
|
||||
"installmsi": InstallMSI
|
||||
}
|
||||
|
||||
# 参数数列表
|
||||
@@ -488,7 +530,10 @@ class Command():
|
||||
"disbledWinebottlecreatelink": [0],
|
||||
"enabledWinebottlecreatelink": [0],
|
||||
"installvb": [1],
|
||||
"installother": [1]
|
||||
"installother": [1],
|
||||
"decompressionbottle": [2],
|
||||
"programforum": [0],
|
||||
"installmsi": [1]
|
||||
}
|
||||
windowsUnrun = [
|
||||
"createbotton",
|
||||
@@ -502,7 +547,8 @@ class Command():
|
||||
"disbledopengl",
|
||||
"installdxvk",
|
||||
"installfont",
|
||||
"installsparkcorefont"
|
||||
"installsparkcorefont",
|
||||
"decompressionbottle"
|
||||
]
|
||||
# 解析
|
||||
def __init__(self, command: list, wineBottonPath: str, wine: str) -> int:
|
||||
@@ -554,7 +600,7 @@ class Command():
|
||||
i[a] = i[a].replace(b[0], b[1])
|
||||
commandReturn = self.commandList[i[0]](self)
|
||||
if commandReturn:
|
||||
print(f"运行命令{' '.join(self.command)}出现错误")
|
||||
print(f"运行命令{' '.join(self.command)}出现错误,返回值:", commandReturn)
|
||||
programEnv[9][1] = str(commandReturn)
|
||||
if self.close:
|
||||
break
|
||||
@@ -574,7 +620,7 @@ if __name__ == "__main__":
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("--------------------------------------------------------------")
|
||||
while True:
|
||||
commandLine = input(">")
|
||||
|
||||
5
deb/opt/apps/deepin-wine-runner/Download.py
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import base64
|
||||
import requests
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9JbnN0YWxsLnBocD9WZXJzaW9uPQ==").decode("utf-8") + sys.argv[1]).text)
|
||||
BIN
deb/opt/apps/deepin-wine-runner/GetEXEVersion.exe
Executable file
BIN
deb/opt/apps/deepin-wine-runner/Icon/Function/CHROOT.png
Executable file
|
After Width: | Height: | Size: 22 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Function/more-wine.png
Executable file
|
After Width: | Height: | Size: 62 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Function/wine.png
Executable file
|
After Width: | Height: | Size: 67 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Function/wine23A.png
Executable file
|
After Width: | Height: | Size: 75 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Function/wine23P.png
Executable file
|
After Width: | Height: | Size: 75 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Program/Windows虚拟机.png
Executable file
|
After Width: | Height: | Size: 63 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Program/webp2.png
Executable file
|
After Width: | Height: | Size: 84 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Program/webp3.png
Executable file
|
After Width: | Height: | Size: 85 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Program/wine打包器.png
Executable file
|
After Width: | Height: | Size: 67 KiB |
BIN
deb/opt/apps/deepin-wine-runner/Icon/Program/wine运行器.png
Executable file
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
29
deb/opt/apps/deepin-wine-runner/IconList.json
Executable file
@@ -0,0 +1,29 @@
|
||||
[
|
||||
[
|
||||
["QQ", "wineBottonPath/drive_c/Program Files/Tencent/QQ/Bin/QQ.exe"],
|
||||
["QQ", "wineBottonPath/drive_c/Program Files (x86)/Tencent/QQ/Bin/QQ.exe"],
|
||||
["TIM", "wineBottonPath/drive_c/Program Files/Tencent/TIM/Bin/TIM.exe"],
|
||||
["TIM", "wineBottonPath/drive_c/Program Files (x86)/Tencent/TIM/Bin/TIM.exe"]
|
||||
],
|
||||
[
|
||||
["cmd", "cmd"],
|
||||
["cmd", "cmd.exe"],
|
||||
["cmd", "wineBottonPath/drive_c/windows/system32/cmd.exe"],
|
||||
["Internet Explorer", "iexplore"],
|
||||
["Internet Explorer", "iexplore.exe"],
|
||||
["Internet Explorer", "wineBottonPath/drive_c/Program Files/Internet Explorer/iexplore.exe"],
|
||||
["Internet Explorer", "wineBottonPath/drive_c/Program Files (x86)/Internet Explorer/iexplore.exe"],
|
||||
["微信", "wineBottonPath/drive_c/Program Files/Tencent/WeChat/WeChat.exe"],
|
||||
["微信", "wineBottonPath/drive_c/Program Files (x86)/Tencent/WeChat/WeChat.exe"],
|
||||
["UltraISO", "wineBottonPath/drive_c/Program Files/UltraISO/UltraISO.exe"],
|
||||
["UltraISO", "wineBottonPath/drive_c/Program Files (x86)/UltraISO/UltraISO.exe"],
|
||||
["迅雷", "wineBottonPath/drive_c/Program Files/Thunder Network/MiniThunder/Bin/ThunderMini.exe"],
|
||||
["迅雷", "wineBottonPath/drive_c/Program Files (x86)/Thunder Network/MiniThunder/Bin/ThunderMini.exe"],
|
||||
["Microsoft Office Word", "wineBottonPath/drive_c/Program Files/Microsoft Office/Office12/WINWORD.EXE"],
|
||||
["Microsoft Office Word", "wineBottonPath/drive_c/Program Files (x86)/Microsoft Office/Office12/WINWORD.EXE"],
|
||||
["腾讯会议", "wineBottonPath/drive_c/Program Files/Tencent/WeMeet/wemeetapp.exe"],
|
||||
["腾讯会议", "wineBottonPath/drive_c/Program Files (x86)/Tencent/WeMeet/wemeetapp.exe"],
|
||||
["腾讯课堂", "wineBottonPath/drive_c/Program Files/Tencent/EDU/bin/TXEDU.exe"],
|
||||
["腾讯课堂", "wineBottonPath/drive_c/Program Files (x86)/Tencent/EDU/bin/TXEDU.exe"]
|
||||
]
|
||||
]
|
||||
@@ -32,7 +32,7 @@ except:
|
||||
["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"]
|
||||
]
|
||||
def Download(wineBotton: str, id: int) -> int:
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/{fontList[id][2]}' -o '{fontList[id][0]}' \"{fontList[id][1]}\"")
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/' -o '{fontList[id][0]}' \"{fontList[id][1]}\"")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
|
||||
46
deb/opt/apps/deepin-wine-runner/Mount.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
if [ ` whoami ` != "root" ]; then
|
||||
echo "Only root can run me"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "路径不存在!"
|
||||
exit 1
|
||||
fi
|
||||
programPath=`dirname $0`
|
||||
echo $0
|
||||
echo $1
|
||||
echo $2
|
||||
echo $3
|
||||
# 挂载必备目录
|
||||
cd "$1"
|
||||
# 拷贝 Qemu Static
|
||||
cp -r /usr/bin/qemu-*-static ./usr/bin
|
||||
# 挂载目录
|
||||
# 此部分将会由 pardus-chroot 来处理
|
||||
#mount --bind /dev ./dev
|
||||
#mount --bind /dev/pts ./dev/pts
|
||||
#mount -t proc /proc ./proc
|
||||
#mount --bind /etc/resolv.conf ./etc/resolv.conf
|
||||
#mount -t sysfs /sys ./sys
|
||||
#mount --bind /dev/shm ./dev/shm
|
||||
chmod 777 -R root tmp
|
||||
xhost +
|
||||
# 挂载 Wine 运行器目录
|
||||
mount -o bind `dirname $0` ./opt/apps/deepin-wine-runner/
|
||||
# 挂载字体
|
||||
mount -o bind /usr/share/fonts ./usr/share/fonts
|
||||
# 配置用户
|
||||
if [ ! -d "home/$2" ]; then
|
||||
# 新建用户,且密码为 123456,以便读写
|
||||
"$programPath/pardus-chroot" . bash /opt/apps/deepin-wine-runner/ChangePassword.sh "$2"
|
||||
fi
|
||||
# 挂载用户目录到 /root(默认 $HOME 路径)
|
||||
if [[ $2 == "root" ]]; then
|
||||
mount --bind root "$1/root/"
|
||||
else
|
||||
mount --bind "/home/$2" "$1/home/$2"
|
||||
fi
|
||||
|
||||
# 如果参数 3 存在
|
||||
"$programPath/pardus-chroot" "--userspec=$2:$2" . env "HOME=/home/$2" ${@:3}
|
||||
31
deb/opt/apps/deepin-wine-runner/MountWithoutHome.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
if [ ` whoami ` != "root" ]; then
|
||||
echo "Only root can run me"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "路径不存在!"
|
||||
exit 1
|
||||
fi
|
||||
programPath=`dirname $0`
|
||||
echo $0
|
||||
echo $1
|
||||
echo $2
|
||||
echo $3
|
||||
# 挂载必备目录
|
||||
cd "$1"
|
||||
# 拷贝 Qemu Static
|
||||
cp -r /usr/bin/qemu-*-static ./usr/bin
|
||||
# 挂载目录
|
||||
# 这里将由 pardus-chroot 处理
|
||||
#mount --bind /dev ./dev
|
||||
#mount --bind /dev/pts ./dev/pts
|
||||
#mount -t proc /proc ./proc
|
||||
#mount --bind /etc/resolv.conf ./etc/resolv.conf
|
||||
#mount -t sysfs /sys ./sys
|
||||
#mount --bind /dev/shm ./dev/shm
|
||||
chmod 777 -R root tmp
|
||||
xhost +
|
||||
|
||||
# 如果参数 3 存在
|
||||
"$programPath/pardus-chroot" . ${@:3}
|
||||
121
deb/opt/apps/deepin-wine-runner/ProgramFen.py
Normal file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import base64
|
||||
import traceback
|
||||
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(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Zlbi9GZW4=").decode("utf-8") + 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_()
|
||||
438
deb/opt/apps/deepin-wine-runner/QemuDownload.py
Executable file
@@ -0,0 +1,438 @@
|
||||
#!/usr/bin/env python3
|
||||
# 本来是用C++写的,但在非deepin/UOS编译/运行就是下载不了https文件,只能用python重写
|
||||
#########################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布
|
||||
# 版本:2.4.0
|
||||
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#########################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import os
|
||||
import shutil
|
||||
import random
|
||||
import sys
|
||||
import json
|
||||
import traceback
|
||||
import requests
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../")
|
||||
from Model import *
|
||||
from trans import *
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
# UI 布局(自动生成)
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(693, 404)
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
transla = Trans("en_US", f"{programPath}/trans/deepin-wine-runner-qemu-download.json")
|
||||
else:
|
||||
transla = Trans("zh_CN")
|
||||
_translate = transla.transe
|
||||
self.centralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralWidget.setObjectName("centralWidget")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralWidget)
|
||||
self.verticalLayout_2.setContentsMargins(11, 11, 11, 11)
|
||||
self.verticalLayout_2.setSpacing(6)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setSpacing(6)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.localWineList = QtWidgets.QListView(self.centralWidget)
|
||||
self.localWineList.setObjectName("localWineList")
|
||||
self.horizontalLayout_2.addWidget(self.localWineList)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setSpacing(6)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.verticalLayout_2.addWidget(QtWidgets.QLabel(_translate("U", """使用前须知:
|
||||
1、Qemu 跨架构效率较低,如果有条件建议优先使用 box86、exagear 等效率较高的转换层;
|
||||
2、使用此方案需要使用到 Root 权限(需开启管理员模式)并安装 qemu-user-static;
|
||||
3、chroot 时候可能会出现问题导致程序闪退或异常,出现该问题重启电脑即可;
|
||||
4、在此环境使用 Wine 时,只能读取到您用户目录或本程序文件夹下的文件,其它路径无法读取;
|
||||
5、移除容器时请保证在这次打开电脑时没有调用过需要删除容器,如果有调用过建议重启电脑后再移除;
|
||||
6、暂时属于测试功能;""")))
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.addButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.addButton.setObjectName("addButton")
|
||||
self.verticalLayout.addWidget(self.addButton)
|
||||
self.delButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.delButton.setObjectName("delButton")
|
||||
self.verticalLayout.addWidget(self.delButton)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem1)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout)
|
||||
self.internetWineList = QtWidgets.QListView(self.centralWidget)
|
||||
self.internetWineList.setObjectName("internetWineList")
|
||||
self.horizontalLayout_2.addWidget(self.internetWineList)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setSpacing(6)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
#self.unzip = QtWidgets.QCheckBox(self.centralWidget)
|
||||
#self.unzip.setObjectName("unzip")
|
||||
#self.horizontalLayout.addWidget(self.unzip)
|
||||
#self.deleteZip = QtWidgets.QCheckBox(self.centralWidget)
|
||||
#self.deleteZip.setChecked(True)
|
||||
#self.deleteZip.setTristate(False)
|
||||
#self.deleteZip.setObjectName("deleteZip")
|
||||
#self.horizontalLayout.addWidget(self.deleteZip)
|
||||
#self.addOtherWine = QtWidgets.QPushButton(self.centralWidget)
|
||||
#self.horizontalLayout.addWidget(self.addOtherWine)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem2)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
MainWindow.setCentralWidget(self.centralWidget)
|
||||
# 菜单栏
|
||||
#_translate = QtCore.QCoreApplication.translate
|
||||
|
||||
self.menu = MainWindow.menuBar()
|
||||
self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源"))
|
||||
self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)"))
|
||||
self.ipv6Action = QtWidgets.QAction(_translate("MainWindow", "备用源(只支持 IPv6 用户)"))
|
||||
self.localAction = QtWidgets.QAction(_translate("MainWindow", "本地测试源(127.0.0.1)"))
|
||||
self.changeSources.addAction(self.gitlinkAction)
|
||||
self.changeSources.addAction(self.ipv6Action)
|
||||
self.changeSources.addAction(self.localAction)
|
||||
for i in [self.gitlinkAction, self.ipv6Action, self.localAction]:
|
||||
i.setCheckable(True)
|
||||
self.gitlinkAction.setChecked(True)
|
||||
self.changeSourcesGroup = QtWidgets.QActionGroup(MainWindow)
|
||||
self.changeSourcesGroup.addAction(self.gitlinkAction)
|
||||
self.changeSourcesGroup.addAction(self.ipv6Action)
|
||||
self.changeSourcesGroup.addAction(self.localAction)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "下载 Qemu 镜像"))
|
||||
self.addButton.setText(_translate("MainWindow", "<<"))
|
||||
self.delButton.setText(_translate("MainWindow", ">>"))
|
||||
#self.unzip.setText(_translate("MainWindow", "不解压Wine资源文件"))
|
||||
#self.deleteZip.setText(_translate("MainWindow", "删除下载的资源包,只解压保留(两个选项都选相互抵消)"))
|
||||
#self.addOtherWine.setText(_translate("MainWindow", "导入自己的Wine"))
|
||||
|
||||
def ReadLocalInformation():
|
||||
try:
|
||||
global localJsonList
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
|
||||
localJsonList = json.loads(file.read())
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in localJsonList:
|
||||
item = QtGui.QStandardItem(i)
|
||||
nmodel.appendRow(item)
|
||||
ui.localWineList.setModel(nmodel)
|
||||
file.close()
|
||||
except:
|
||||
print("新建空列表")
|
||||
try:
|
||||
with open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w") as file:
|
||||
file.write("[]")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
def InstallOtherWine():
|
||||
path = QtWidgets.QFileDialog.getOpenFileName(window, "选择 Wine", os.getenv("~"), "wine(wine);;wine64(wine64);;全部文件(*.*)")
|
||||
if path[0] == "" or not path[1]:
|
||||
return
|
||||
try:
|
||||
# 写入配置文件
|
||||
rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/winelist.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# 创建映射
|
||||
name = os.path.basename(os.path.dirname(os.path.dirname(path[0])))
|
||||
if name == "" or name == None:
|
||||
name = f"useradd-wine-{random.randint(0, 99999)}"
|
||||
#binPath = os.path.dirname(os.path.dirname(path[0]))
|
||||
os.makedirs(f"{programPath}/{name}/bin")
|
||||
if os.system(f"ln -s '{path[0]}' '{programPath}/{name}/bin/wine'") != 0:
|
||||
QtWidgets.QMessageBox.critical(window, "新建wine映射失败")
|
||||
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w")
|
||||
list.append(name)
|
||||
file.write(json.dumps(list))
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
ReadLocalInformation()
|
||||
|
||||
def ChangeSources():
|
||||
global urlSources
|
||||
global internetWineSource
|
||||
sources = [ui.gitlinkAction, ui.ipv6Action, ui.localAction]
|
||||
for i in range(0, len(sources)):
|
||||
if sources[i].isChecked():
|
||||
urlSources = internetWineSourceList[i]
|
||||
internetWineSource = internetWineSourceList[i]
|
||||
# 读取信息
|
||||
ReadLocalInformation()
|
||||
ReadInternetInformation()
|
||||
break
|
||||
print(urlSources)
|
||||
|
||||
# 下面内容均翻译自 C++ 版本
|
||||
def ReadInternetInformation():
|
||||
global internetJsonList
|
||||
# C++ 版本是用 curl 的,考虑到 Python 用 requests 反而方便,于是不用 curl
|
||||
try:
|
||||
internetJsonList = json.loads(requests.get(f"{internetWineSource}/lists.json").text)
|
||||
internetJsonListNew = []
|
||||
for k in internetJsonList:
|
||||
archList = json.loads(requests.get(f"{internetWineSource}/{k}/lists.json").text)
|
||||
for e in archList:
|
||||
internetJsonListNew.append([e[0], e[1], k])
|
||||
internetJsonList = internetJsonListNew
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!")
|
||||
return
|
||||
print(internetJsonList)
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in internetJsonList:
|
||||
item = QtGui.QStandardItem(i[0])
|
||||
nmodel.appendRow(item)
|
||||
ui.internetWineList.setModel(nmodel)
|
||||
|
||||
class DownloadThread(QtCore.QThread):
|
||||
MessageBoxInfo = QtCore.pyqtSignal(str)
|
||||
MessageBoxError = QtCore.pyqtSignal(str)
|
||||
ChangeDialog = QtCore.pyqtSignal(QtWidgets.QProgressDialog, int, int, int)
|
||||
Finish = QtCore.pyqtSignal()
|
||||
def __init__(self, progressDialog: QtWidgets.QProgressDialog,
|
||||
url: str, savePath: str, fileName: str, view: QtWidgets.QListView, deleteZip: bool,
|
||||
unzip: bool, localList) -> None:
|
||||
self.dialog = progressDialog
|
||||
self.fileUrl = url
|
||||
self.fileSavePath = savePath
|
||||
self.fileSaveName = fileName
|
||||
self.localView = view
|
||||
self.downloadDeleteZip = deleteZip
|
||||
self.downloadUnzip = unzip
|
||||
self.localJsonList = localList
|
||||
super().__init__()
|
||||
|
||||
def ReadLocalInformation(self):
|
||||
global localJsonList
|
||||
try:
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
|
||||
nmodel = QtGui.QStandardItemModel()
|
||||
localJsonList = json.loads(file.read())
|
||||
for i in localJsonList:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i))
|
||||
self.localView.setModel(nmodel)
|
||||
file.close()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
# 创建文件夹
|
||||
dir = QtCore.QDir()
|
||||
#savePath = f"{programPath}/{self.fileSaveName}"
|
||||
choose = ui.internetWineList.currentIndex().row()
|
||||
arch = internetJsonList[choose][2]
|
||||
savePath = f"{homePath}/.deepin-wine-runner-ubuntu-images/{arch}/{self.fileSaveName}"
|
||||
if not os.path.exists(os.path.dirname(savePath)):
|
||||
os.makedirs(os.path.dirname(savePath))
|
||||
# 文件下载
|
||||
timeout = 0
|
||||
f = requests.get(self.fileUrl, stream=True)
|
||||
allSize = int(f.headers["content-length"]) # 文件总大小
|
||||
bytesRead = 0
|
||||
with open(savePath, "wb") as filePart:
|
||||
for chunk in f.iter_content(chunk_size=1024):
|
||||
if chunk:
|
||||
#progressbar.update(int(part / show))
|
||||
filePart.write(chunk)
|
||||
bytesRead += 1024
|
||||
self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024)
|
||||
self.ChangeDialog.emit(self.dialog, 100, 100, 100)
|
||||
# 写入配置文件
|
||||
rfile = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w")
|
||||
list.append(self.fileSaveName.replace(".tar.gz", ""))
|
||||
file.write(json.dumps(list))
|
||||
file.close()
|
||||
# 读取配置文件
|
||||
self.ReadLocalInformation()
|
||||
self.localJsonList = list
|
||||
# 解压文件
|
||||
shellCommand = ""
|
||||
path = f"{homePath}/.deepin-wine-runner-ubuntu-images/{arch}/{self.fileSaveName.replace('.tar.gz', '')}/"
|
||||
#path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
|
||||
shellCommand += f"""#!/bin/bash
|
||||
mkdir -p \"{path}\"
|
||||
tar -xvf \"{savePath}\" -C \"{path}\"
|
||||
rm \"{savePath}\"
|
||||
"""
|
||||
#if self.downloadDeleteZip:
|
||||
# shellCommand += f"rm -rf \"{savePath}\"\n"
|
||||
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
|
||||
shellFile.write(shellCommand)
|
||||
shellFile.close()
|
||||
process = QtCore.QProcess()
|
||||
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
process.start(f"{programPath}/../launch.sh", command)
|
||||
process.waitForFinished()
|
||||
OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh")
|
||||
self.Finish.emit()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
self.MessageBoxError.emit(traceback.format_exc())
|
||||
|
||||
def MessageBoxInfo(info):
|
||||
QtWidgets.QMessageBox.information(window, "提示", info)
|
||||
|
||||
def MessageBoxError(info):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", info)
|
||||
|
||||
def ChangeDialog(dialog: QtWidgets.QProgressDialog, value, downloadBytes, totalBytes):
|
||||
dialog.setValue(value)
|
||||
dialog.setLabelText(f"{downloadBytes}MB/{totalBytes}MB")
|
||||
|
||||
def DownloadFinish():
|
||||
ui.centralWidget.setEnabled(True)
|
||||
|
||||
class QT:
|
||||
thread = None
|
||||
|
||||
def on_addButton_clicked():
|
||||
choose = ui.internetWineList.currentIndex().row()
|
||||
if choose < 0:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您未选中任何项,无法继续")
|
||||
return
|
||||
downloadName = internetJsonList[choose][1]
|
||||
ReadLocalInformation()
|
||||
for i in localJsonList:
|
||||
if i.replace(".tar.gz", "") == internetJsonList[choose][0]:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您已经安装了这个镜像了!无需重复安装!")
|
||||
return
|
||||
#if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2):
|
||||
# ui.deleteZip.setChecked(False)
|
||||
# ui.unzip.setChecked(False)
|
||||
arch = internetJsonList[choose][2]
|
||||
downloadUrl = f"{internetWineSource}/{arch}/{downloadName}"
|
||||
dialog = QtWidgets.QProgressDialog()
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.setDisabled(True)
|
||||
dialog.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
dialog.setCancelButton(cancel)
|
||||
dialog.setWindowTitle(f"正在下载“{internetJsonList[choose][0]}”")
|
||||
QT.thread = DownloadThread(
|
||||
dialog,
|
||||
downloadUrl,
|
||||
"",
|
||||
internetJsonList[choose][1],
|
||||
ui.localWineList,
|
||||
False,
|
||||
not True,
|
||||
localJsonList
|
||||
)
|
||||
QT.thread.MessageBoxInfo.connect(MessageBoxInfo)
|
||||
QT.thread.MessageBoxError.connect(MessageBoxError)
|
||||
QT.thread.ChangeDialog.connect(ChangeDialog)
|
||||
QT.thread.Finish.connect(DownloadFinish)
|
||||
ui.centralWidget.setDisabled(True)
|
||||
QT.thread.start()
|
||||
|
||||
def on_delButton_clicked():
|
||||
if os.path.exists("/tmp/deepin-wine-runner-qemu-lock"):
|
||||
if QtWidgets.QMessageBox.question(window, "提示", "检测到您的电脑已经运行了 Qemu/Chroot 容器,建议您重启电脑后再删除该容器,否则容易造成数据损失!\n是否取消操作?") == QtWidgets.QMessageBox.Yes:
|
||||
return
|
||||
if QtWidgets.QMessageBox.question(window, "提示", "你确定要删除吗?") == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
if ui.localWineList.currentIndex().row() < 0:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您未选择任何项")
|
||||
return
|
||||
try:
|
||||
# {localJsonList[ui.localWineList.currentIndex().row()]}
|
||||
path = f"{homePath}/.deepin-wine-runner-ubuntu-images/"
|
||||
changed = False
|
||||
for i in os.listdir(path):
|
||||
if os.path.exists(f"{path}/{i}/{localJsonList[ui.localWineList.currentIndex().row()]}"):
|
||||
changed = True
|
||||
name = f"{path}/{i}/{localJsonList[ui.localWineList.currentIndex().row()]}".replace(".tar.gz", "")
|
||||
if not changed:
|
||||
name = f"{path}/i386/{localJsonList[ui.localWineList.currentIndex().row()]}".replace(".tar.gz", "")
|
||||
print(name)
|
||||
# 必须取消挂载目录才行
|
||||
os.system(f"bash '{programPath}/UnMount.sh' '{name}'")
|
||||
#name = f"{homePath}/.deepin-wine-runner-ubuntu-images/{localJsonList[ui.localWineList.currentIndex().row()]}"
|
||||
dir = QtCore.QDir(name)
|
||||
dir.removeRecursively()
|
||||
QtCore.QFile.remove(name + ".tar.gz")
|
||||
del localJsonList[ui.localWineList.currentIndex().row()]
|
||||
file = open(f"{homePath}/.deepin-wine-runner-ubuntu-images/lists.json", "w")
|
||||
file.write(json.dumps(localJsonList))
|
||||
file.close()
|
||||
ReadLocalInformation()
|
||||
QtWidgets.QMessageBox.information(window, "提示", "删除成功!")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
# 获取当前语言
|
||||
def get_now_lang()->"获取当前语言":
|
||||
return os.getenv('LANG')
|
||||
|
||||
if __name__ == "__main__":
|
||||
homePath = os.getenv("HOME")
|
||||
localJsonList = []
|
||||
internetJsonList = []
|
||||
internetWineSourceList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/deepin-wine-runner-ubuntu-image/raw/branch/master/Sandbox",
|
||||
"http://gfdgdxi.msns.cn/deepin-wine-runner-ubuntu-image/Sandbox", # 备用源,纯 IPv6 源
|
||||
"http://127.0.0.1/deepin-wine-runner-ubuntu-image/Sandbox/" # 本地测试源
|
||||
]
|
||||
internetWineSource = internetWineSourceList[0]
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
if os.system("which qemu-i386-static"):
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "检测到您未安装 qemu-user-static,是否安装?") == QtWidgets.QMessageBox.Yes:
|
||||
OpenTerminal(f"pkexec bash '{programPath}/ShellList/InstallQemuUserStatic.sh'")
|
||||
exit()
|
||||
try:
|
||||
if not os.path.exists(f"{homePath}/.deepin-wine-runner-ubuntu-images/"):
|
||||
os.makedirs(f"{homePath}/.deepin-wine-runner-ubuntu-images/")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(None, "错误", traceback.format_exc())
|
||||
exit()
|
||||
# 读取翻译
|
||||
if not get_now_lang() == "zh_CN.UTF-8":
|
||||
trans = QtCore.QTranslator()
|
||||
trans.load(f"{programPath}/../LANG/installwine-en_US.qm")
|
||||
app.installTranslator(trans)
|
||||
# 窗口构建
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
ui.setupUi(window)
|
||||
window.show()
|
||||
# 连接信号
|
||||
ui.addButton.clicked.connect(on_addButton_clicked)
|
||||
ui.delButton.clicked.connect(on_delButton_clicked)
|
||||
#ui.addOtherWine.clicked.connect(InstallOtherWine)
|
||||
ui.changeSourcesGroup.triggered.connect(ChangeSources)
|
||||
## 加载内容
|
||||
# 设置列表双击不会编辑
|
||||
ui.localWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
ui.internetWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
# 读取信息
|
||||
ReadLocalInformation()
|
||||
ReadInternetInformation()
|
||||
# 图标
|
||||
ui.centralWidget.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||
|
||||
app.exec_()
|
||||
44
deb/opt/apps/deepin-wine-runner/QemuRun.py
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import getpass
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
|
||||
if __name__ == "__main__":
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
homePath = os.getenv("HOME")
|
||||
if len(sys.argv) <= 1:
|
||||
print("参数不足")
|
||||
sys.exit(1)
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
# 判断是否已下载镜像
|
||||
if not os.path.exists(f"{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}"):
|
||||
QtWidgets.QMessageBox.information(None, "提示", "此镜像未下载解压,无法继续")
|
||||
exit()
|
||||
commandList = ""
|
||||
userName = getpass.getuser()
|
||||
for i in sys.argv[3:]:
|
||||
commandList += f"'{i}' "
|
||||
if commandList.replace(" ", "") == "":
|
||||
commandList = "bash"
|
||||
# 需要先取消挂载其它目录以防止冲突
|
||||
path = f"{homePath}/.deepin-wine-runner-ubuntu-images"
|
||||
for i in os.listdir(path):
|
||||
archPath = f"{path}/{i}"
|
||||
if os.path.isdir(archPath):
|
||||
for k in os.listdir(archPath):
|
||||
bottlePath = f"{archPath}/{k}"
|
||||
if os.path.isdir(bottlePath):
|
||||
if f"{i}/{k}" == sys.argv[1]:
|
||||
continue
|
||||
if os.path.ismount(f"{bottlePath}/dev"):
|
||||
os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/UnMount.sh' '{bottlePath}' ")
|
||||
os.system("touch /tmp/deepin-wine-runner-qemu-lock")
|
||||
# 判断是否挂载
|
||||
if not os.path.ismount(f"{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/dev"):
|
||||
print("文件暂未挂载,开始挂载")
|
||||
if int(sys.argv[2]):
|
||||
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/MountWithoutHome.sh' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}' '{userName}' {commandList}"))
|
||||
else:
|
||||
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/Mount.sh' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}' '{userName}' {commandList}"))
|
||||
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY chroot '--userspec={userName}:{userName}' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/' env 'HOME=/home/{userName}' {commandList}"))
|
||||