Compare commits

...

77 Commits

Author SHA1 Message Date
df5d08cd68 应用运行库新增bwrap识别
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-21 11:46:54 +08:00
2357c646a1 优化在termux的使用体验 2024-07-21 11:34:44 +08:00
0b0a757765 添加NOVNC 2024-07-21 09:36:40 +08:00
104d197e4b 调整依赖关系以在termux可以获得更好的体验
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-20 22:53:49 +08:00
60f838144d 初步termux支持 2024-07-20 22:26:35 +08:00
3146467477 新增proot和android识别
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-20 09:37:26 +08:00
30d4986214 调整系统判断机制
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-19 22:59:46 +08:00
11ad6f3766 新增Wine tag 取反逻辑(!) 2024-07-19 22:54:12 +08:00
046fe2c103 修复AOSC loong64 因为 pyperclip 问题导致无法正常打开运行器的问题 2024-07-19 22:16:55 +08:00
b672fd93e6 修复打包器选择Wine封装入deb模式时helper只能使用spark dwine helper的问题 2024-07-19 21:59:46 +08:00
a7d478ab93 更改 Wine git 仓库地址以修复 Wine 日构建问题
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-19 11:22:03 +08:00
c4987b4ce6 适配AOSC
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-18 21:13:28 +08:00
6ac4fa72ad 修改下更新日志
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-17 21:37:48 +08:00
15946ccb4e 适配debian testing的7z以修复打包时会把/打入.7z包导致死机的问题 2024-07-17 21:16:36 +08:00
e109502c34 新增开关选项
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-17 14:54:37 +08:00
97f944f4b9 安装更多wine工具支持根据当前机器实际情况自动推荐适合的wine 2024-07-17 14:45:30 +08:00
a447fa6343 清空下过时的helper
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-16 22:39:04 +08:00
3018f4276e 调整run.sh 2024-07-16 22:37:36 +08:00
c3bfb33dd9 推荐安装helper 2024-07-16 22:32:48 +08:00
f1decf51d1 支持导入.7z包时自动移除部分特殊符号
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-15 21:46:24 +08:00
e3c54ffc32 支持手动导入7z包 2024-07-15 20:46:21 +08:00
10db5c042d 安装wine出新增网盘入口
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-15 15:14:20 +08:00
18ce8a080f 支持调用GXDE的deepin-terminal-gtk 2024-07-15 12:52:51 +08:00
f9e9a4eb72 调整运行器缩放机制
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-07-14 18:48:30 +08:00
ebb6c2c5fa 修改打包器包名生成机制以及文本提示 2024-07-14 18:27:01 +08:00
de98af8c99 漏调Makefile
Some checks failed
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Has been cancelled
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Has been cancelled
2024-07-12 19:06:19 +08:00
5f41d73dbd 跟进dxvk 2024-07-12 19:05:25 +08:00
7aff330137 忘记改启动器虚拟机入口的qemu调用了,现在支持调用Qemu Extra了
Some checks failed
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Has been cancelled
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Has been cancelled
2024-06-30 09:22:16 +08:00
6c53446134 修复deepin23无法正常使用Mono/gecko安装器的问题
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-29 18:50:56 +08:00
8683ee1730 3.9.2
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-29 15:44:14 +08:00
f4bce0e99f 调整run.sh问题 2024-06-29 12:51:56 +08:00
380cf74bbf 新增拖动条 2024-06-29 12:04:46 +08:00
535232ac5f 优化小屏幕使用体验 2024-06-29 11:45:02 +08:00
6509a89658 精简组建*2 2024-06-29 11:15:40 +08:00
962fec1ca9 精简组件 2024-06-29 11:03:04 +08:00
89c61eeef2 移除废弃组建、wine虚拟机工具支持读取extra包的virtio-win.iso 2024-06-29 10:51:16 +08:00
ae119a7d1a 调整依赖
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-29 09:01:32 +08:00
f5a65ec92f 修复wine安装器在文件下载失败后无法自动关闭进度条和解除控件禁用的问题 2024-06-29 08:50:36 +08:00
fc9f2f05d2 不允许版本号开头输入首字母以及版本号不允许出现空格 2024-06-29 08:46:13 +08:00
c55ba35827 新增推荐依赖
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
2024-06-28 21:27:46 +08:00
5aca3fb038 生成的deb同时支持使用spark-dwine-helper和deepin-wine-helper(未测试) 2024-06-28 16:31:13 +08:00
0ca24b773c 支持调用拓展qemu 2024-06-17 22:38:45 +08:00
f43ffa0fac 调整README 2024-06-16 22:09:19 +08:00
5736dd0bfa 更新README 2024-06-15 19:55:29 +08:00
d0071a9e5d 新增readme 2024-06-15 19:36:50 +08:00
dbb7a6f9b2 3.9.1初步 2024-06-07 13:38:12 +08:00
8870ec6764 处理UOS arm dwine6不同的问题 2024-06-07 12:37:07 +08:00
006b8ae773 处理UOS arm dwine6不同的问题 2024-06-07 11:17:31 +08:00
3cd38c0032 调整helper以单包支持UOS arm 2024-06-06 22:04:19 +08:00
d19453bb22 新增应急脚本 2024-06-06 21:11:15 +08:00
cca44603c2 新增一点点英文翻译 2024-06-02 22:38:01 +08:00
5eb7bcd358 更新预编译文件 2024-06-01 16:41:57 +08:00
5818d109b0 更新README 2024-06-01 15:39:25 +08:00
01adbc9e20 调整Mips Qemu路径 2024-06-01 15:08:20 +08:00
35246e6046 支持使用本地的qemu 2024-06-01 13:07:04 +08:00
d84191d17e 添加独立的qemu mips包 2024-06-01 11:03:02 +08:00
950eca478c 启动脚本跟进logo 2024-06-01 10:37:06 +08:00
1bf5eab4e0 新增虚拟机logo显示 2024-06-01 09:55:22 +08:00
3966cd0b70 忘记拷贝了 2024-06-01 08:57:08 +08:00
c4923fa5b9 新增驱动文件 2024-06-01 08:56:18 +08:00
d369503284 修复虚拟机模块选择其它选项自动跳回默认选项的问题 2024-06-01 07:30:01 +08:00
e26bf4e30f 补充linglong依赖 2024-05-25 15:38:11 +08:00
bdb53267ee 调整url 2024-05-25 13:09:39 +08:00
dae29fd54e 调整脚本 2024-05-23 22:34:29 +08:00
40c52bd1a8 调整默认启动条目 2024-05-23 22:23:49 +08:00
47ebb5ca29 添加linglong配置文件 2024-05-23 22:12:58 +08:00
e28dc5927e 调整打包器包名识别机制 2024-05-07 22:03:56 +08:00
1825136eac adjust: change spark wine launcher path 2024-05-07 21:47:51 +08:00
9cce5771e5 !3 adjust: change spark wine launcher path
Merge pull request !3 from shenmo/N/A
2024-05-07 13:26:42 +00:00
20c2cc9949 adjust: change spark wine launcher path
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-05-07 06:24:10 +00:00
c84ca04f96 !2 update spark-dwine-helper/spark_run_v4.sh.
Merge pull request !2 from shenmo/N/A
2024-05-06 14:50:50 +00:00
6f039e7355 update spark-dwine-helper/spark_run_v4.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2024-05-06 00:57:16 +00:00
44514dfc78 修改dpkg-deb参数以减少打包时间 2024-05-05 11:38:52 +08:00
840fb73ba8 banner并入运行器 2024-05-03 21:48:34 +08:00
4485ff3b74 新增转包脚本 2024-05-01 08:09:44 +08:00
808cbfd228 修复简易打包器生产的deb无法运行的问题 2024-04-28 22:19:08 +08:00
4ecd03a520 修复lat安装无法开启的问题 2024-04-27 21:56:21 +08:00
252 changed files with 10006 additions and 6590 deletions

3
.gitignore vendored
View File

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

3
.gitmodules vendored Normal file
View File

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

View File

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

View File

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

View File

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

74
ExePreview/.gitignore vendored Normal file
View File

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

View File

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

31
ExePreview/ExePreview.pro Normal file
View File

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

View File

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

View File

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

17
ExePreview/main.cpp Normal file
View File

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

22
ExePreview/main.h Normal file
View File

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

BIN
Icon/Program/AboutIcon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -1,6 +1,22 @@
#!/bin/bash
echo lat只能在loongarch架构安装
sudo apt update
sudo apt install lat
# 检查是否有 aptss
aptPath=apt
if [[ -f /usr/bin/aptss ]]; then
aptPath=aptss
fi
# 判断新旧世界
if [[ `dpkg --print-architecture` == "loong64" ]]; then
# 新世界
sudo $aptPath update
sudo $aptPath install lat lat-runtime-i386 lat-runtime-amd64
echo 按回车键退出
read
exit
fi
# 旧世界
sudo $aptPath update
sudo $aptPath install lat i386-runtime-base i386-runtime-extra
echo 按回车键退出
read
read
exit

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,18 +1,24 @@
<p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
<h1 align="center">Wine 运行器 3.8.0</h1>
<h1 align="center">Wine 运行器 3.9.2</h1>
<hr>
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/members'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
## 介绍
Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
当前支持 amd64、arm64、mips64el、loong64新世界、loongarch64旧世界、riscv64
注:
**在使用运行器时不要随便动 .deepinwine 下的容器,否则会导致安装的 wine 应用无法正常打开**
**除非你有把握不会损坏容器**
Wine Runner is a program that allows Linux users to run Windows applications more conveniently. It has built-in support for Wine graphics, various Wine tools, self-made Wine program packager and runtime installation tools. It also has a built-in Windows virtual machine installation tool based on VirtualBox, which is specially used by Xiaobai. You can download the system image and click Install without considering the installation, creation and partitioning of virtual machines.
![截图_选择区域_20221002221112.png](https://storage.deepin.org/thread/202210022215217037_截图_选择区域_20221002221112.png)
@@ -23,6 +29,16 @@ Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程
Wine 运行器 QQ 交流群762985460
Wine 运行器离线包下载地址https://www.123pan.com/s/pDSKVv-pAJWv.html
### 如何手动下载 Wine
下载链接: http://ctfile.gfdgdxi.top/d/31540479-61624693-080e74?p=2061 (访问密码: 2061)
### 如果使用更新版本的 Qemu
后续版本将支持调用以下链接 deb 包安装的 Qemu
Wine运行器Qemu: http://ctfile.gfdgdxi.top/d/31540479-61635610-54327c?p=2061 (访问密码: 2061)
https://sourceforge.net/projects/deep-wine-runner/files/Wine%20Runner%20Qemu%20Extra/
### Debian sid 依赖
https://gfdgdxi.lanzouw.com/b0plly5cj
密码:b346
@@ -143,7 +159,41 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志
### 3.8.02023年04月27日
### 3.9.22024/06/29
**※1、移除冗余组件**
**※2、修复 Wine 安装器在文件下载失败后无法自动关闭进度条和解除控件禁用的问题**
**※3、Wine 打包器不允许版本号开头输入首字母以及版本号不允许出现空格**
**※4、Wine 打包器生成的 deb 同时支持使用 spark-dwine-helper 和 deepin-wine-helper**
**※5、支持调用拓展 Qemu**
**※6、新增滚动条优化小屏幕使用体验**
![image.png](https://storage.deepin.org/thread/202406290742035395_image.png)
### 3.9.12024/06/07
**※1、修复 Windows 虚拟机安装工具安装程序在 Mips 架构无法正确启动虚拟机的问题**
**※2、优化打包器依赖**
### 3.9.02024年06月01日
**※1、UOS Mips64如 3a4000用户无需手动降级 Qemu 即可正常开启使用虚拟机**
**※2、修复开启部分 exe 提示参数有误的问题**
**※3、Qemu 在启动时可以按 ESC 键打开启动菜单**
**※4、虚拟机工具 Windows 7 自动安装镜像文件选项内置 Virtio 驱动安装包**
**※5、Qemu 虚拟机参数调整若干**
**※6、修复虚拟机安装工具系统安装选项会自动跳回第一项的问题**
**※7、优化简易打包器包名识别机制**
**※8、减少不必要的压缩以减少打包器打包 deb 所需时间**
**※9、修复简易打包器生成的 deb 包无法运行的问题**
10、优化 lat 安装脚本
11、调整星火 Wine 助手路径
![F87D3721C30A235F9F47E8A8899FC3B7.png](https://storage.deepin.org/thread/20240601073716327_F87D3721C30A235F9F47E8A8899FC3B7.png)
![image.png](https://storage.deepin.org/thread/202406010841258081_image.png)
### 3.8.02024年04月27日
**※1、修复系统/应用运行库无法下载的问题**
**※2、打包器支持指定打包架构为 loong64、loongarch64、armhf 和 amd64**
**※3、更新 Geek Uninstaller 版本**
@@ -154,6 +204,16 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
8、修复问题 https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I9B4L0
9、针对 Loongarch ACE 做特别优化
**※1. Repair system/application library download failed problem**
**※2. Support building loong64, loongarch64, armhf and amd64 architecture deb with packager**
**※3. Update Geek Uninstaller version**
**※4. Enable English translation by default**
**※5. Update dxvk version**
**※6. Repair virtual machine running problem with newer Qemu**
**※7. Support adding space with Qemu virtual disk**
8. Fixed an issue related to https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I9B4L0
9. Added support for Loongarch ACE
![image.png](https://storage.deepin.org/thread/202404271014409954_image.png)
@@ -699,8 +759,8 @@ Sourceforgehttps://sourceforge.com/projects/deep-wine-runner
屏蔽微信在Wine中运行时产生的水印/黑块可以参考https://12101111.github.io/block-wine-wechat-black-window/ 和 https://blog.csdn.net/ericden/article/details/122118443
### 拉取
***(需要先安装 Docker 后再输入以下命令)***
Docker 镜像下载链接:
```bash
wget https://code.gitlink.org.cn/gfdgd_xi/wine-building-docker/raw/branch/master/wine-latest-debian10.tar.gz
sudo docker load -i wine-latest-debian10.tar.gz
```
### 启用

View File

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

View File

@@ -0,0 +1,50 @@
#!/usr/bin/env python3
import os
import sys
def Replace(path):
"spark-dwine-helper | store.spark-app.spark-dwine-helper"
"deepin-wine-helper (>= 5.1.30-1)"
"com.wine-helper.deepin"
with open(f"{path}/DEBIAN/control", "r") as file:
data = file.read()
isReplace = False
isSparkHelper = False
# 替换 Wine 包名
data = data.replace("deepin-wine6-stable,", "deepin-wine6-stable | com.deepin-wine6-stable.deepin,")
data = data.replace("deepin-wine6-stable | deepin-wine6-stable-bcm | deepin-wine6-stable-dcm,", "deepin-wine6-stable | deepin-wine6-stable-bcm | deepin-wine6-stable-dcm | com.deepin-wine6-stable.deepin,")
if "spark-dwine-helper | store.spark-app.spark-dwine-helper" in data and not isReplace:
isReplace = True
isSparkHelper = True
data = data.replace("spark-dwine-helper | store.spark-app.spark-dwine-helper", "deepin-wine-helper | com.wine-helper.deepin")
if "deepin-wine-helper (>= 5.1.30-1)" in data and not isReplace:
isReplace = True
data = data.replace("deepin-wine-helper (>= 5.1.30-1)", "deepin-wine-helper | com.wine-helper.deepin")
with open(f"{path}/DEBIAN/control", "w") as file:
file.write(data)
if isSparkHelper:
ReplaceSparkHelper(path)
def ReplaceSparkHelper(path):
name = os.listdir(f"{path}/opt/apps/")[0]
with open(f"{path}/opt/apps/{name}/files/run.sh", "r") as file:
data = file.read().replace("/opt/deepinwine/tools/spark_run_v4.sh", "/opt/deepinwine/tools/run_v4.sh")
with open(f"{path}/opt/apps/{name}/files/run.sh", "w") as file:
file.write(data)
if len(sys.argv) <= 1:
print(f"请加参数,命令示例: {sys.argv[0]} xxx.deb")
exit(1)
tempPath = "/tmp/turn-deb"
for i in sys.argv[1:]:
os.system(f"rm -rf '{tempPath}'")
os.system(f"dpkg -x '{i}' '{tempPath}'")
os.system(f"dpkg -e '{i}' '{tempPath}/DEBIAN'")
fileName = os.path.splitext(i)[0]
# 修改 control 文件
Replace(tempPath)
os.system(f"dpkg-deb -Z xz -z 0 -b '{tempPath}' '{fileName}-new.deb'")

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env python3
import os
import sys
def ReadTXT(path):
with open(path, "r") as file:
thing = file.read()
return thing
def WriteTXT(path, data):
with open(path, "w") as file:
file.write(data)
debList = sys.argv[1:]
for i in debList:
# 解包
os.system("rm -rf /tmp/change-old-to-new")
os.system(f"dpkg -x '{i}' /tmp/change-old-to-new")
os.system(f"dpkg -e '{i}' /tmp/change-old-to-new/DEBIAN")
info = ReadTXT("/tmp/change-old-to-new/DEBIAN/control").replace(": all", ": amd64")
WriteTXT("/tmp/change-old-to-new/DEBIAN/control", info)
os.system(f"dpkg-deb -Z xz -z 0 -b /tmp/change-old-to-new '{os.path.basename(i).replace('_all', '_amd64')}'")
info = ReadTXT("/tmp/change-old-to-new/DEBIAN/control").replace(": amd64", ": arm64")
WriteTXT("/tmp/change-old-to-new/DEBIAN/control", info)
os.system(f"dpkg-deb -Z xz -z 0 -b /tmp/change-old-to-new '{os.path.basename(i).replace('_all', '_arm64')}'")
# 检查是否能正常安装

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
import os
import sys
def ReadTXT(path):
with open(path, "r") as file:
thing = file.read()
return thing
def WriteTXT(path, data):
with open(path, "w") as file:
file.write(data)
debList = sys.argv[1:]
for i in debList:
# 解包
os.system("rm -rf /tmp/change-old-to-new")
os.system(f"dpkg -x '{i}' /tmp/change-old-to-new")
os.system(f"dpkg -e '{i}' /tmp/change-old-to-new/DEBIAN")
info = ReadTXT("/tmp/change-old-to-new/DEBIAN/control").replace(": loongarch64", ": loong64").replace("Depends: ", "Depends: liblol, ")
WriteTXT("/tmp/change-old-to-new/DEBIAN/control", info)
os.system(f"dpkg-deb -Z xz -z 9 -b /tmp/change-old-to-new '{os.path.basename(i).replace('_loongarch64', '_loong64')}'")
# 检查是否能正常安装

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env python3
import os
import sys
def ReadTXT(path):
with open(path, "r") as file:
thing = file.read()
return thing
def WriteTXT(path, data):
with open(path, "w") as file:
file.write(data)
debList = sys.argv[1:]
for i in debList:
# 解包
os.system("rm -rf /tmp/change-old-to-new")
os.system(f"dpkg -x '{i}' /tmp/change-old-to-new")
os.system(f"dpkg -e '{i}' /tmp/change-old-to-new/DEBIAN")
info = ReadTXT("/tmp/change-old-to-new/DEBIAN/control").replace("spark-dwine-helper | store.spark-app.spark-dwine-helper", "deepin-wine-helper (>= 5.1.30-1)")
WriteTXT("/tmp/change-old-to-new/DEBIAN/control", info)
path = os.listdir("/tmp/change-old-to-new/opt/apps")[0]
info = ReadTXT(f"/tmp/change-old-to-new/opt/apps/{path}/files/run.sh").replace("/opt/deepinwine/tools/spark_run_v4.sh", "/opt/deepinwine/tools/run_v4.sh")
WriteTXT(f"/tmp/change-old-to-new/opt/apps/{path}/files/run.sh", info)
os.system(f"dpkg-deb -Z xz -z 0 -b /tmp/change-old-to-new '{os.path.basename(i)}'")
# 检查是否能正常安装

View File

@@ -8,6 +8,7 @@
# 基于 Python3 的 tkinter 构建
###########################################################################################
cd `dirname $0`
CURRENT_DIR=$(cd $(dirname $0); pwd)
VBoxManage showvminfo Windows
if [[ 0 == $? ]]; then
# 检测到虚拟机存在,启动虚拟机
@@ -15,6 +16,7 @@ if [[ 0 == $? ]]; then
exit
fi
# 检查是否有 QEMU
export PATH=/opt/apps/deepin-wine-runner-qemu-system-extra/files/usr/local/bin:$PATH
which qemu-system-x86_64
if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
if [[ -f "$HOME/.config/deepin-wine-runner/QemuSetting.json" ]]; then
@@ -23,6 +25,10 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
python3 ./VM/StartQemu.py
exit
fi
# 判断是否有安装增强 Qemu
if [[ -f /opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh ]]; then
qemuMore=/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh
fi
# 查看CPU个数
CpuSocketNum=`cat /proc/cpuinfo | grep "cpu cores" | uniq | wc -l`
# 查看CPU核心数
@@ -49,29 +55,53 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
if [[ -f $HOME/.config/deepin-wine-runner/QEMU-EFI ]]; then
echo 使用 UEFI 启动
if [[ -f /usr/share/qemu/OVMF.fd ]]; then
qemuUEFI="--bios /usr/share/qemu/OVMF.fd"
qemuUEFI="--bios /usr/share/qemu/OVMF.fd -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 "
else
if [[ -f `dirname $0`/VM/OVMF.fd ]]; then
qemuUEFI="--bios `dirname $0`/VM/OVMF.fd"
qemuUEFI="--bios `dirname $0`/VM/OVMF.fd -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 "
fi
fi
echo $qemuUEFI
else
qemuUEFI="-vga virtio -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 "
fi
echo $qemuUEFI
./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "x86_64" ]]; then
echo X86 架构,使用 kvm 加速
qemu-system-x86_64 --enable-kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-x86_64 --enable-kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
# 判断系统版本以选择 Qemu
isUOS=0
qemuPath=qemu-system-x86_64
cat /etc/os-version | grep -i uos
if [[ $? == 0 ]]; then
isUOS=1
fi
cat /etc/os-version | grep -i unio
if [[ $? == 0 ]]; then
isUOS=1
fi
if [[ $isUOS == 1 ]]; then
arch=`uname -m`
if [[ $arch == "mips64" ]] || [[ $arch == "mips64el" ]]; then
qemuPath="bwrap --dev-bind / / --bind ./VM/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so ./VM/MipsQemu/usr/bin/qemu-system-x86_64"
fi
fi
if [[ $qemuMore != "" ]]; then
qemuPath=$qemuMore
fi
echo 不使用 kvm 加速
qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuPath --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> /tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
@@ -89,7 +119,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo $qemuUEFI
./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
qemu-system-arm --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-arm --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \
@@ -97,10 +127,11 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
qemu-system-arm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-arm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \
@@ -108,6 +139,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
@@ -125,7 +157,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo $qemuUEFI
./VM/kvm-ok
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
qemu-system-aarch64 --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-aarch64 --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \
@@ -134,10 +166,11 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi
qemu-system-aarch64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
$qemuMore qemu-system-aarch64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \
@@ -146,6 +179,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
-device usb-kbd,id=keyboard,bus=xhci.0,port=2 \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
exit
fi

View File

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

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 7.0.1, 2023-11-25T17:10:08. -->
<!-- Written by QtCreator 9.0.2, 2024-06-01T15:39:37. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@@ -8,7 +8,7 @@
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
<value type="qlonglong">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -28,7 +28,7 @@
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="qlonglong" 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>
@@ -54,6 +54,7 @@
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
</valuemap>
</data>
<data>
@@ -92,9 +93,9 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{b17c65ba-6912-41bf-b5c1-4c7446f6c967}</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>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/gfdgd_xi/Desktop/build-VirtualMachine-unknown-Debug</value>
@@ -110,9 +111,9 @@
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</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.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
@@ -121,7 +122,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -149,9 +150,9 @@
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</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.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
@@ -160,7 +161,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -190,9 +191,9 @@
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</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.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
@@ -201,7 +202,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -217,12 +218,12 @@
<value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</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">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="qlonglong" 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>
@@ -230,7 +231,7 @@
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
@@ -247,7 +248,7 @@
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/gfdgd_xi/Desktop/build-VirtualMachine-unknown-Debug</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
@@ -257,9 +258,9 @@
<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>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" 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/building/deep-wine-runner/VM-source</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/gfdgd_xi/Desktop/building/deep-wine-runner/VM-source</value>
@@ -274,9 +275,9 @@
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</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">Build</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</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.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
@@ -285,7 +286,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -299,12 +300,12 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value>
<value type="qlonglong" 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">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="qlonglong" 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>
@@ -312,7 +313,7 @@
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
@@ -328,12 +329,12 @@
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">2</value>
<value type="qlonglong">2</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>

Binary file not shown.

Binary file not shown.

BIN
VM-source/boot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

198
VM-source/boot.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

View File

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

View File

@@ -145,7 +145,7 @@ void MainWindow::ShowCPUMessage(){
}
m_cpuAll = cpuAll;
m_cpuFree = cpuFree;
ui->retranslateUi(this);
//ui->retranslateUi(this);
}
QString MainWindow::GetRunCommand(QString command){

View File

@@ -245,7 +245,7 @@ hr { height: 1px; border-width: 0; }
li.unchecked::marker { content: &quot;\2610&quot;; }
li.checked::marker { content: &quot;\2612&quot;; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt;&quot;&gt;UOS 3a4000 用户在使用 Qemu 时可能会出现虚拟机无法正常开机的问题,需要安装/降级到以下链接的版本:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt;&quot;&gt;UOS 3a4000 用户在使用 Qemu 时可能会出现虚拟机无法正常开机的问题,如果出现上述问题需要安装/降级到以下链接的版本:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt;&quot;&gt;蓝奏云:&lt;/span&gt;&lt;a href=&quot;https://gfdgdxi.lanzoue.com/b01rk9wza&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt; text-decoration: underline; color:#0082fa;&quot;&gt;https://gfdgdxi.lanzoue.com/b01rk9wza&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt;&quot;&gt; 密码:6wvf&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt;&quot;&gt;诚通网盘:&lt;/span&gt;&lt;a href=&quot;http://ctfile.gfdgdxi.top/d/31540479-58662214-c46520?p=2061&quot;&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt; text-decoration: underline; color:#0082fa;&quot;&gt;http://ctfile.gfdgdxi.top/d/31540479-58662214-c46520?p=2061&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Noto Sans CJK SC'; font-size:11pt;&quot;&gt; (访问密码: 2061)&lt;/span&gt;&lt;/p&gt;
&lt;hr /&gt;

View File

@@ -22,8 +22,12 @@ qemu::qemu(QString name, QString managerPath)
}
this->managerPath = managerPath;
//Command command = Command();
this->vboxVersion = Command().GetCommand("'" + managerPath + "qemu-system-i386' --version");
QString qemuPath = "qemu-system-i386";
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-i386";
}
this->vboxVersion = Command().GetCommand(qemuPath + " --version");
}
int qemu::Create(QString type)
@@ -108,33 +112,75 @@ int qemu::MountMainDisk(QString diskPath)
int qemu::StartArmhf()
{
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "aarch64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system(("qemu-system-arm -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
QString qemuPath = "qemu-system-arm";
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-arm";
}
return system(("qemu-system-arm --boot d -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "aarch64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
int qemu::StartAarch64()
{
QString bootScreenLogo = "";
QString qemuPath = "qemu-system-aarch64";
// 判断 boot 文件是否存在
if(QFile::exists(QCoreApplication::applicationDirPath() + "/boot.jpg")) {
bootScreenLogo = QCoreApplication::applicationDirPath() + "/boot.jpg";
}
else {
// 写入 logo
QFile::copy(":/boot.jpg", "/tmp/deep-wine-runner-boot.jpg");
bootScreenLogo = "/tmp/deep-wine-runner-boot.jpg";
}
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-aarch64";
}
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "aarch64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system(("qemu-system-aarch64 --boot d -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
return system(("qemu-system-aarch64 --boot d -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
int qemu::StartLoong64()
{
return 1;
}
int qemu::Start(bool unShown)
{
QString newCommandOption = commandOption;
QString qemuPath = "qemu-system-x86_64";
qDebug() << GetBootLogoPath();
if(isUEFI) {
newCommandOption += " -vga none -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 ";
}
else {
newCommandOption += " -vga virtio -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 ";
}
// UOS 3a4000 使用程序自带的 qemu
QString info = SystemInfo().toLower();
if(info.contains("uos") || info.contains("unio")) {
// 判断架构
QString arch = GetArch();
if(arch == "mips64" || arch == "mipsel64") {
qemuPath = "bwrap --dev-bind / / --bind '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so' /usr/lib/mips64el-linux-gnuabi64/qemu/ui-gtk.so '" + QCoreApplication::applicationDirPath() + "/MipsQemu/usr/bin/qemu-system-x86_64' ";
}
}
if(QFile::exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")) {
// 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-x86_64";
}
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "x86_64" && !system((QCoreApplication::applicationDirPath() + "/kvm-ok").toUtf8())){
return system(("qemu-system-x86_64 --boot d -display vnc=:5 -display gtk --enable-kvm -cpu host " + commandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
return system(("qemu-system-x86_64 --boot d -display vnc=:5 -display gtk -nic model=rtl8139 " + commandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
return system((qemuPath + " --boot 'splash=" + GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -nic model=rtl8139 " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
int qemu::Stop()
{
@@ -239,6 +285,7 @@ int qemu::UseOtherEFI(QString fdFilePath)
int qemu::EnabledUEFI(bool status)
{
isUEFI = status;
if(!status){
return 0;
}
@@ -268,3 +315,41 @@ int qemu::AddDiskSpace(QString path, double data)
{
return system(("qemu-img resize '" + path + "' +" + QString::number(data) + "G").toUtf8());
}
QString qemu::GetBootLogoPath()
{
QString bootScreenLogo = "";
// 判断 boot 文件是否存在
if(QFile::exists(QCoreApplication::applicationDirPath() + "/boot.jpg")) {
bootScreenLogo = QCoreApplication::applicationDirPath() + "/boot.jpg";
}
else {
// 写入 logo
if(QFile::exists("/tmp/deep-wine-runner-boot.jpg")) {
QFile::remove("/tmp/deep-wine-runner-boot.jpg");
}
QFile::copy(":/boot.jpg", "/tmp/deep-wine-runner-boot.jpg");
bootScreenLogo = "/tmp/deep-wine-runner-boot.jpg";
}
return bootScreenLogo;
}
QString qemu::SystemInfo()
{
QFile file("/etc/os-version");
file.open(QFile::ReadOnly);
QString data = file.readAll();
file.close();
return data;
}
QString qemu::GetArch()
{
QProcess process;
process.start("uname", QStringList() << "-m");
process.waitForStarted();
process.waitForFinished();
QString data = process.readAllStandardOutput();
process.close();
return data.replace("\n", "").replace(" ", "");
}

View File

@@ -52,6 +52,10 @@ public:
int AddDiskSpace(QString path, double data);
private:
QString commandOption = "";
bool isUEFI = false;
QString GetBootLogoPath();
QString SystemInfo();
QString GetArch();
};

View File

@@ -5,6 +5,8 @@
<file>LANG/virtualmachine-en_US.qm</file>
<file>LANG/virtualmachine-en_US.ts</file>
<file>application-vnd.oasis.opendocument.text.svg</file>
<file>boot.jpg</file>
<file>boot.svg</file>
</qresource>
<qresource prefix="/picture">
<file>截图_VirtualBox Machine_20220712142929.png</file>

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

View File

@@ -0,0 +1,131 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: qemu-guest-agent
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: QEMU Guest Agent startup script
# Description: Start the QEMU Guest Agent if we're running
# in a QEMU virtual machine
### END INIT INFO
# Author: Michael Tokarev <mjt@tls.msk.ru>
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="QEMU Guest Agent"
NAME=qemu-ga
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
# config
DAEMON_ARGS=""
# default transport
TRANSPORT=virtio-serial:/dev/virtio-ports/org.qemu.guest_agent.0
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/qemu-guest-agent ] && . /etc/default/qemu-guest-agent
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
#
# Function that checks whenever system has necessary environment
# It also splits $TRANSPORT into $method and $path
#
do_check_transport() {
method=${TRANSPORT%%:*}; path=${TRANSPORT#*:}
case "$method" in
virtio-serial | isa-serial)
if [ ! -e "$path" ]; then
log_warning_msg "$NAME: transport endpoint not found, not starting"
return 1
fi
;;
esac
}
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon -Sq -p $PIDFILE -x $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon -Sq -p $PIDFILE -x $DAEMON -- --daemonize \
$DAEMON_ARGS -m "$method" -p "$path" \
|| return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon -Kq --retry=TERM/30/KILL/5 -p $PIDFILE --name $NAME
}
case "$1" in
start)
do_check_transport || exit 0
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" $NAME
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" $NAME
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
status)
status_of_proc "$DAEMON" $NAME && exit 0 || exit $?
;;
restart|force-reload) # we do not support reload
do_check_transport || exit 0
log_daemon_msg "Restarting $DESC" $NAME
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: /etc/init.d/qemu-guest-agent {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
:

6
VM/MipsQemu/etc/qemu-ifdown Executable file
View File

@@ -0,0 +1,6 @@
#! /bin/sh
# Script to shut down a network (tap) device for qemu.
# Initially this script is empty, but you can configure,
# for example, accounting info here.
:

42
VM/MipsQemu/etc/qemu-ifup Executable file
View File

@@ -0,0 +1,42 @@
#! /bin/sh
# Script to bring a network (tap) device for qemu up.
# The idea is to add the tap device to the same bridge
# as we have default routing to.
# in order to be able to find brctl
PATH=$PATH:/sbin:/usr/sbin
ip=$(which ip)
if [ -n "$ip" ]; then
ip link set "$1" up
else
brctl=$(which brctl)
if [ ! "$ip" -o ! "$brctl" ]; then
echo "W: $0: not doing any bridge processing: neither ip nor brctl utility not found" >&2
exit 0
fi
ifconfig "$1" 0.0.0.0 up
fi
switch=$(ip route ls | \
awk '/^default / {
for(i=0;i<NF;i++) { if ($i == "dev") { print $(i+1); next; } }
}'
)
# only add the interface to default-route bridge if we
# have such interface (with default route) and if that
# interface is actually a bridge.
# It is possible to have several default routes too
for br in $switch; do
if [ -d /sys/class/net/$br/bridge/. ]; then
if [ -n "$ip" ]; then
ip link set "$1" master "$br"
else
brctl addif $br "$1"
fi
exit # exit with status of the previous command
fi
done
echo "W: $0: no bridge for guest interface found" >&2

View File

@@ -0,0 +1,33 @@
#!/bin/sh
# This script is executed when a guest agent receives fsfreeze-freeze and
# fsfreeze-thaw command, if it is specified in --fsfreeze-hook (-F)
# option of qemu-ga or placed in default path (/etc/qemu/fsfreeze-hook).
# When the agent receives fsfreeze-freeze request, this script is issued with
# "freeze" argument before the filesystem is frozen. And for fsfreeze-thaw
# request, it is issued with "thaw" argument after filesystem is thawed.
LOGFILE=/var/log/qga-fsfreeze-hook.log
FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d
# Check whether file $1 is a backup or rpm-generated file and should be ignored
is_ignored_file() {
case "$1" in
*~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave | *.sample | *.dpkg-old | *.dpkg-new | *.dpkg-tmp | *.dpkg-dist | *.dpkg-bak | *.dpkg-backup | *.dpkg-remove)
return 0 ;;
esac
return 1
}
# Iterate executables in directory "fsfreeze-hook.d" with the specified args
[ ! -d "$FSFREEZE_D" ] && exit 0
for file in "$FSFREEZE_D"/* ; do
is_ignored_file "$file" && continue
[ -x "$file" ] || continue
printf "$(date): execute $file $@\n" >>$LOGFILE
"$file" "$@" >>$LOGFILE 2>&1
STATUS=$?
printf "$(date): $file finished with status=$STATUS\n" >>$LOGFILE
done
exit 0

View File

@@ -0,0 +1,11 @@
[Unit]
Description=QEMU Guest Agent
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
[Service]
ExecStart=-/usr/sbin/qemu-ga
Restart=always
RestartSec=0
[Install]

View File

@@ -0,0 +1,2 @@
SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"

Binary file not shown.

Binary file not shown.

BIN
VM/MipsQemu/usr/bin/qemu-img Executable file

Binary file not shown.

BIN
VM/MipsQemu/usr/bin/qemu-io Executable file

Binary file not shown.

BIN
VM/MipsQemu/usr/bin/qemu-nbd Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
qemu/pxe-e1000.rom

View File

@@ -0,0 +1 @@
qemu/pxe-e1000.rom

View File

@@ -0,0 +1 @@
qemu/pxe-eepro100.rom

View File

@@ -0,0 +1 @@
qemu/pxe-ne2k_pci.rom

View File

@@ -0,0 +1 @@
qemu/pxe-pcnet.rom

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
qemu/pxe-rtl8139.rom

View File

@@ -0,0 +1 @@
qemu/pxe-virtio.rom

Binary file not shown.

BIN
VM/MipsQemu/usr/sbin/qemu-ga Executable file

Binary file not shown.

View File

@@ -0,0 +1,141 @@
#! /bin/sh -e
#
# $Id: qemu-make-debian-root 353 2008-10-16 20:28:22Z aurel32 $
#
# Script to make a debian root image.
#
set -e
which debootstrap >/dev/null || {
echo "error: missing debootstrap package" >&2
exit 1
}
which sfdisk >/dev/null || {
echo "error: missing fdisk package" >&2
exit 1
}
which mke2fs >/dev/null || {
echo "error: missing e2fsprogs package" >&2
exit 1
}
KEEPFS=0
SPARSE=0
while :; do
case "$1" in
-k)
KEEPFS=1
;;
-s)
SPARSE=1
;;
-ks|-sk)
KEEPFS=1
SPARSE=1
;;
*)
break
;;
esac
shift
done
if [ $# -lt 4 ]; then
echo Usage: "$0 [-ks] size-in-MB distrib deburl image [files_to_copy_in_/root]" >&2
echo "eg $0 150 sid http://proxy:10000/debian qemu" >&2
echo "-k keep file system -s sparse image" >&2
echo "$0 is normally run as root." >&2
exit 1
fi
SIZE=$1 # In Mib
DISTRO=$2
URL=$3
IMAGE=$4
shift 4
# now files to copy are in "$@". We don't put them in a variable
# because that would coufuse spaces-in-filenames with
# whitespace-separation.
if [ $SIZE -lt 130 ]; then
echo 'Size must be at least 130 megabytes (Debian unstable takes 100)' >&2
exit 1
fi
cleanup()
{
echo Cleaning up... >&2
umount -d $TMP_DIR || true
losetup -d $LOOP || true
rm -f $IMAGE
}
trap cleanup EXIT
# Create a filesystem: one track for partition table.
if [ "$SPARSE" = "1" ]; then
truncate -s ${SIZE}M "$IMAGE"
else
dd bs=1M count=$SIZE if=/dev/zero of=$IMAGE
fi
SECT=63 # first sector of a partition
# Partition so one partition covers entire disk.
echo "$SECT," | sfdisk -uS -L $IMAGE
# Find an unused loop device and set it up.
LOOP=`losetup -f`
losetup -o $(($SECT*512)) $LOOP $IMAGE
# Create filesystem.
mke2fs -q -m1 $LOOP
TMP_DIR="$(mktemp -d /tmp/mount.XXXXXX)" || \
{ echo >&2 "Failed to create temporary directory"; exit 1; }
# Mount it.
mount $LOOP $TMP_DIR
# Do debian install on it.
debootstrap --variant=minbase $DISTRO $TMP_DIR $URL
# Final configuration.
cat > $TMP_DIR/etc/fstab <<EOF
/dev/hda1 / ext2 errors=remount-ro 0 1
proc /proc proc defaults 0 0
EOF
# Console on ttyS0, not tty1, and no other gettys.
sed 's,1:2345:respawn:/sbin/getty 38400 tty1,1:2345:respawn:/sbin/getty 38400 ttyS0,' < $TMP_DIR/etc/inittab | sed 's,^.:23:respawn.*,,' > $TMP_DIR/etc/inittab.new
mv $TMP_DIR/etc/inittab.new $TMP_DIR/etc/inittab
# Set hostname to base of image name.
basename $IMAGE > $TMP_DIR/etc/hostname
# Create /etc/shadow
chroot $TMP_DIR pwconv
# Set root password to "root"
sed 's/^root:[^:]*/root:$1$aybpiIGf$cB7iFDNZvViQtQjEZ5HFQ0/' < $TMP_DIR/etc/shadow > $TMP_DIR/etc/shadow.new
mv $TMP_DIR/etc/shadow.new $TMP_DIR/etc/shadow
# Remove packages we don't need
chroot $TMP_DIR /usr/bin/dpkg --remove console-common console-tools console-data base-config man-db manpages
# Try to remove all libraries: some won't be removable.
chroot $TMP_DIR dpkg --remove `chroot $TMP_DIR dpkg --get-selections | sed -n 's/^\(lib[^ \t]*\)[\t ]*install/\1/p'` 2>/dev/null || true
# Copy wanted files to /root if asked to
if [ $# -gt 0 ]; then
cp -a "$@" $TMP_DIR/root/
fi
umount -d $TMP_DIR
trap "" EXIT
echo Done.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
../extboot.bin

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