diff --git a/Makefile b/Makefile index 270a4a3..9709c6a 100755 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ package: #cd VM-source && make #cd wine && make make clean -j$(nproc) + mkdir deb/opt/apps/deepin-wine-runner/LANG -pv cp -rv helperset deb/opt/apps/deepin-wine-runner/ #cp -rv VM-source/VirtualMachine VM cp -rv VM-source/deepin-wine-runner.svg VM @@ -112,7 +113,10 @@ package: cp -rv InstallRuntime deb/opt/apps/deepin-wine-runner python3 UpdateTime.py python3 RemovePycacheFile.py + sudo rm -rfv /tmp/spark-deepin-wine-runner-builder/ cp -rv deb /tmp/spark-deepin-wine-runner-builder + rm -rfv deb/opt/apps/deepin-wine-runner/* + rm -rfv package-script.zip mkdir -pv /tmp/spark-deepin-wine-runner-builder/usr/bin ln -s /opt/apps/deepin-wine-runner/deepin-wine-packager.py /tmp/spark-deepin-wine-runner-builder/usr/bin/deepin-wine-package-builder ln -s /opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py /tmp/spark-deepin-wine-runner-builder/usr/bin/deepin-wine-packager-easy-builder diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control index 54abc86..082a87d 100755 --- a/deb/DEBIAN/control +++ b/deb/DEBIAN/control @@ -18,7 +18,6 @@ Description: gfdgd xi 制作的 wine 运行器 3.2.2 更新内容: ※1. 修改源地址,脱离 Gitlink; ※2. 修复非 X86 架构运行器主页面虚拟机工具禁用的问题。 - 3.2.1 更新内容: ※1、Windows 虚拟机安装工具支持非 X86 架构; ※2、应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine 包; diff --git a/deb/opt/apps/deepin-wine-runner/2048/.gitignore b/deb/opt/apps/deepin-wine-runner/2048/.gitignore deleted file mode 100644 index 0d31019..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.sass-cache/ diff --git a/deb/opt/apps/deepin-wine-runner/2048/.jshintrc b/deb/opt/apps/deepin-wine-runner/2048/.jshintrc deleted file mode 100644 index 87dbf9a..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/.jshintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "esnext": true, - "indent": 2, - "maxlen": 80, - "freeze": true, - "camelcase": true, - "unused": true, - "eqnull": true, - "proto": true, - "supernew": true, - "noyield": true, - "evil": true, - "node": true, - "boss": true, - "expr": true, - "loopfunc": true, - "white": true, - "maxdepth": 4 -} diff --git a/deb/opt/apps/deepin-wine-runner/2048/CONTRIBUTING.md b/deb/opt/apps/deepin-wine-runner/2048/CONTRIBUTING.md deleted file mode 100644 index 8b269ae..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -# Contributing -Changes and improvements are more than welcome! Feel free to fork and open a pull request. - -Please follow the house rules to have a bigger chance of your contribution being merged. - -## House rules - -### How to make changes - - To make changes, create a new branch based on `master` (do not create one from `gh-pages` unless strictly necessary) and make them there, then create a Pull Request to master. - `gh-pages` is different from master in that it contains sharing features, analytics and other things that have no direct bearing with the game. `master` is the "pure" version of the game. - - If you want to modify the CSS, please edit the SCSS files present in `style/`: `main.scss` and others. Don't edit the `main.css`, because it's supposed to be generated. - In order to compile your SCSS modifications, you need to use the `sass` gem (install it by running `gem install sass` once Ruby is installed). - To run SASS, simply use the following command: - `sass --unix-newlines --watch style/main.scss` - SASS will automatically recompile your css when changed. - - `Rakefile` contains some tasks that help during development. Feel free to add useful tasks if needed. - - Please use 2-space indentation when editing the JavaScript. A `.jshintrc` file is present, which will help your code to follow the guidelines if you install and run `jshint`. - - Please test your modification thoroughly before submitting your Pull Request. - -### Changes that might not be accepted -We have to be conservative with the core game. This means that some modifications won't be merged, or will have to be evaluated carefully before being merged: - - - Undo/redo features - - Save/reload features - - Changes to how the tiles look or their contents - - Changes to the layout - - Changes to the grid size - -### Changes that are welcome - - Bug fixes - - Compatibility improvements - - "Under the hood" enhancements - - Small changes that don't have an impact on the core gameplay diff --git a/deb/opt/apps/deepin-wine-runner/2048/LICENSE.txt b/deb/opt/apps/deepin-wine-runner/2048/LICENSE.txt deleted file mode 100644 index b0dbfa4..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Gabriele Cirulli - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/deb/opt/apps/deepin-wine-runner/2048/README.md b/deb/opt/apps/deepin-wine-runner/2048/README.md deleted file mode 100644 index 6b1da38..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# 2048 -A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone). - -Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/) - -The official app can also be found on the [Play Store](https://play.google.com/store/apps/details?id=com.gabrielecirulli.app2048) and [App Store!](https://itunes.apple.com/us/app/2048-by-gabriele-cirulli/id868076805) - -### Contributions - -[Anna Harren](https://github.com/iirelu/) and [sigod](https://github.com/sigod) are maintainers for this repository. - -Other notable contributors: - - - [TimPetricola](https://github.com/TimPetricola) added best score storage - - [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile - - [marcingajda](https://github.com/marcingajda) made swipes work on Windows Phone - - [mgarciaisaia](https://github.com/mgarciaisaia) added support for Android 2.3 - -Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions. - -### Screenshot - -
- -
- -That screenshot is fake, by the way. I never reached 2048 :smile: - -## Contributing -Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process. - -You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md) - -## License -2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt) - -## Donations -I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much! diff --git a/deb/opt/apps/deepin-wine-runner/2048/Rakefile b/deb/opt/apps/deepin-wine-runner/2048/Rakefile deleted file mode 100644 index 3e9851e..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/Rakefile +++ /dev/null @@ -1,11 +0,0 @@ -require "date" - -namespace :appcache do - desc "update the date in the appcache file (in the gh-pages branch)" - task :update do - appcache = File.read("cache.appcache") - updated = "# Updated: #{DateTime.now}" - - File.write("cache.appcache", appcache.sub(/^# Updated:.*$/, updated)) - end -end diff --git a/deb/opt/apps/deepin-wine-runner/2048/favicon.ico b/deb/opt/apps/deepin-wine-runner/2048/favicon.ico deleted file mode 100644 index 22109e0..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/2048/favicon.ico and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/2048/index.html b/deb/opt/apps/deepin-wine-runner/2048/index.html deleted file mode 100644 index 0da0ee0..0000000 --- a/deb/opt/apps/deepin-wine-runner/2048/index.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - -Join the numbers and get to the 2048 tile!
- New Game -- How to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one! -
-- Note: This site is the official version of 2048. You can play it on your phone via http://git.io/2048. All other apps or sites are derivatives or fakes, and should be used with caution. -
-- Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer. -
-{i}
\n" - #about = f"{about}" - about = f"
暂无此程序的介绍
" - try: - import requests as r - fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json() - tipsInfo = "" - except: - fenlists = [0, 0, 0, 0, 0] - 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"\n" - else: - starHtml += f"\n" - else: - for i in range(maxHead): - if webeng: - starHtml += f"\n" - else: - starHtml += f"\n" - head = maxHead - for i in range(head, end): - if webeng: - starHtml += f"" - else: - starHtml += f"" - about += f"\n{starHtml}
\n{tipsInfo}
" - 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("第{i[1]}层
"), 1, 2) - inLayout.addWidget(QtWidgets.QLabel(i[2]), 2, 0, 1, 3) - widget.setLayout(inLayout) - pinLunLayout1.addWidget(widget) - #pinLunLayout.addWidget(QtWidgets.QLabel("此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键
Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务
Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理
当前 deb 打包情况:{thing}
") - -def ReplaceText(string: str, lists: list): - for i in lists: - string = string.replace(i[0], i[1]) - return string - -class make_deb_threading(QtCore.QThread): - signal = QtCore.pyqtSignal(str) - label = QtCore.pyqtSignal(str) - getSavePath = QtCore.pyqtSignal(str) - errorMsg = QtCore.pyqtSignal(str) - infoMsg = QtCore.pyqtSignal(str) - disabled_or_NORMAL_all = QtCore.pyqtSignal(bool) - build = False - def __init__(self, build) -> None: - super().__init__() - self.build = build - - def run_command(self, command): - res = subprocess.Popen([command], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - # 实时读取程序返回 - while res.poll() is None: - try: - text = res.stdout.readline().decode("utf8") - except: - text = "" - print(text, end="") - self.signal.emit(text) - - def run(self): - ##################################### - # 程序创建的 deb 构建临时文件夹目录树: - # /XXX - # ├── DEBIAN - # │ ├── control - # │ └── postrm - # └── opt - # └── apps - # └── XXX - # ├── entries - # │ ├── applications - # │ │ └── XXX.desktop - # │ └── icons - # │ └── hicolor - # │ └── scalable - # │ └── apps - # │ └── XXX.png(XXX.svg) - # ├── files - # │ ├── files.7z - # │ └── run.sh - # └── info - # - # 11 directories, 7 files - ##################################### - try: - ##################### - # 判断文件是否存在 - ##################### - self.label.emit("正在检查文件是否存在并为后面步骤准备……") - a = "" - if e6_text.text() == "/": - b = e6_text.text()[:-1] - else: - b = e6_text.text() - if desktopIconTab.count() <= 1: - if e9_text.text() != "": - # 获取图片格式(不太准) - try: - im = Image.open(e9_text.text()) - imms = im.format.lower() - except: # 未知(就直接设置为 svg 后缀) - imms = "svg" - a = "/opt/apps/{}/entries/icons/hicolor/scalable/apps/{}.{}".format(e1_text.text(), e1_text.text(), imms) - if not os.path.exists(e9_text.text()): - self.errorMsg.emit("图标的路径填写错误,无法进行构建 deb 包") - self.disabled_or_NORMAL_all.emit(True) - self.label.emit("图标的路径填写错误,无法进行构建 deb 包") - return - else: - a = [] - for i in iconUiList: - if i[4].text != "": - # 获取图片格式(不太准) - try: - im = Image.open(e9_text.text()) - imms = im.format.lower() - except: - imms = ".svg" - a.append("/opt/apps/{}/entries/icons/hicolor/scalable/apps/{}-{}.{}".format(e1_text.text(), e1_text.text(), os.path.splitext(os.path.basename(i[0].text().replace("\\", "/")))[0], imms)) - if not os.path.exists(i[4].text()): - self.errorMsg.emit("图标的路径填写错误,无法进行构建 deb 包") - self.disabled_or_NORMAL_all.emit(True) - self.label.emit("图标的路径填写错误,无法进行构建 deb 包") - return - if not os.path.exists(e6_text.text()): - print("aa") - self.errorMsg.emit("路径填写错误,无法继续构建 deb 包") - print("aaa1") - self.disabled_or_NORMAL_all.emit(True) - self.label.emit("容器路径填写错误,无法进行构建 deb 包") - print("bbb") - return - debInformation = [ - { - # I386 wine 打包配置文件 - "Wine": wine[wineVersion.currentText()], - "Architecture": debFirstArch.currentText(), - "Depends": [ - f"{wine[wineVersion.currentText()]}, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei", - f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper, fonts-wqy-microhei, fonts-wqy-zenhei" - ][int(chooseWineHelperValue.isChecked())], - "postinst": "", - "postrm": ["", f"""#!/bin/bash -if [ "$1" = "remove" ] || [ "$1" = "purge" ];then - -echo "清理卸载残留" -CONTAINER_NAME="{e5_text.text()}" - -if [ -z $CONTAINER_NAME ];then -echo "W: 没有指定容器,跳过清理容器。请手动前往 ~/.deepinwine/ 下删除" -exit -fi - -/opt/deepinwine/tools/kill.sh $CONTAINER_NAME -###这里注意,如果没写CONTAINER_NAME,会把QQ杀了 - -for username in $(ls /home) - do - echo /home/$username - if [ -d /home/$username/.deepinwine/$CONTAINER_NAME ] - then - rm -rf /home/$username/.deepinwine/$CONTAINER_NAME - fi - done -else -echo "非卸载,跳过清理" -fi"""][int(rmBash.isChecked())], - "run.sh": [ - f"""#!/bin/sh - -# Copyright (C) 2016 Deepin, Inc. -# -# Author: Li LongYu当前 deb 打包情况:暂未打包
") -option1_text = QtWidgets.QComboBox() -button1 = QtWidgets.QPushButton(transla.transe("U", "浏览……")) -button2 = QtWidgets.QPushButton(transla.transe("U", "浏览……")) -button4 = QtWidgets.QPushButton(transla.transe("U", "浏览……")) -debControlFrame = QtWidgets.QHBoxLayout() -button5 = QtWidgets.QPushButton(transla.transe("U", "打包……")) -installDeb = QtWidgets.QPushButton(transla.transe("U", "安装打包完成的 deb……")) -buildDebDir = QtWidgets.QPushButton(transla.transe("U", "根据填写内容打包模板")) -build7z = QtWidgets.QPushButton(transla.transe("U", "打包容器 7z 包")) -debControlFrame.addWidget(button5) -debControlFrame.addWidget(installDeb) -rmBash = QtWidgets.QCheckBox(transla.transe("U", "设置卸载该 deb 后自动删除该容器")) -cleanBottonByUOS = QtWidgets.QCheckBox(transla.transe("U", "使用统信 Wine 生态适配活动容器清理脚本")) -disabledMono = QtWidgets.QCheckBox(transla.transe("U", "禁用 Mono 和 Gecko 安装器")) -debArch = QtWidgets.QComboBox() -debArch.addItems(["默认选项", "arm64(box86+exagear)"]) -#debArch.addItems(["i386", "arm64(box86+exagear)", "all(crossover)"]) -textbox1 = QtWidgets.QTextBrowser() -option1_text.addItems(["Network", "Chat", "Audio", "Video", "Graphics", "Office", "Translation", "Development", "Utility"]) -option1_text.setCurrentText("Network") -wineFrame = QtWidgets.QHBoxLayout() -chooseWineHelperValue = QtWidgets.QCheckBox(transla.transe("U", "使用星火wine helper\n(如不勾选默认为deepin-wine-helper)")) -button1.clicked.connect(button1_cl) -button2.clicked.connect(lambda: button2_cl(0)) -mapLink.append(e9_text) -button4.clicked.connect(button4_cl) -button5.clicked.connect(make_deb) -buildDebDir.clicked.connect(lambda: make_deb(True)) -build7z.clicked.connect(Build7zButton_Clicked) -installDeb.clicked.connect(InstallDeb) -wineFrame.addWidget(wineVersion) -e1_text.textChanged.connect(ChangeBottleName) -e5_text.textChanged.connect(LockBottleName) -e6_text.textChanged.connect(ChangeBottleName) -e7_text.textChanged.connect(ChangeTapTitle) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要打包的 deb 包的包名(※必填):")), 0, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包的版本号(※必填):")), 1, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包的说明(※必填):")), 2, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包的维护者(※必填):")), 3, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要解压的 wine 容器的名称(※必填):")), 4, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要打包的 wine 容器路径(※必填):")), 5, 0, 1, 1) -desktopIconTab = QtWidgets.QTabWidget() -controlWidget = QtWidgets.QWidget() -controlWidgetLayout = QtWidgets.QHBoxLayout() -desktopIconTabAdd = QtWidgets.QPushButton("+") -desktopIconTabDel = QtWidgets.QPushButton("-") -desktopIconTabAdd.setWhatsThis("添加新图标") -desktopIconTabDel.setWhatsThis("移除选中图标") -controlWidgetLayout.addWidget(desktopIconTabAdd) -controlWidgetLayout.addWidget(desktopIconTabDel) -controlWidget.setLayout(controlWidgetLayout) -desktopIconTabAdd.clicked.connect(AddTab) -desktopIconTabDel.clicked.connect(DelTab) -iconTab1 = QtWidgets.QWidget() -desktopIconTabLayout = QtWidgets.QGridLayout() -desktopIconTabLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "wine 容器里需要运行的可执行文件路径(※必填):")), 6, 0, 1, 1) -desktopIconTabLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的分类(※必填):")), 7, 0, 1, 1) -desktopIconTabLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "wine 容器里需要运行的可执行文件的参数:")), 8, 0, 1, 1) -desktopIconTabLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的名称(※必填):")), 9, 0, 1, 1) -desktopIconTabLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的图标:")), 10, 0, 1, 1) -iconTab1.setLayout(desktopIconTabLayout) -#desktopIconTab.setTabPosition(QtWidgets.QTabWidget.East) -desktopIconTab.addTab(iconTab1, "默认图标") -desktopIconTab.setCornerWidget(controlWidget) -widgetLayout.addWidget(desktopIconTab, 8, 0, 6, 3) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "选择打包的 wine 版本(※必选):")), 6, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包 deb 的保存路径(※必填):")), 7, 0, 1, 1) -widgetLayout.addWidget(e1_text, 0, 1, 1, 1) -widgetLayout.addWidget(e2_text, 1, 1, 1, 1) -widgetLayout.addWidget(e3_text, 2, 1, 1, 1) -widgetLayout.addWidget(e4_text, 3, 1, 1, 1) -widgetLayout.addWidget(e5_text, 4, 1, 1, 1) -widgetLayout.addWidget(e6_text, 5, 1, 1, 1) -widgetLayout.addWidget(button1, 5, 2, 1, 1) -desktopIconTabLayout.addWidget(e7_text, 6, 1, 1, 1) -desktopIconTabLayout.addWidget(option1_text, 7, 1, 1, 1) -desktopIconTabLayout.addWidget(e15_text, 8, 1, 1, 1) -desktopIconTabLayout.addWidget(e8_text, 9, 1, 1, 1) -desktopIconTabLayout.addWidget(e9_text, 10, 1, 1, 1) -desktopIconTabLayout.addWidget(button2, 10, 2, 1, 1) -iconUiList.append([e7_text, option1_text, e15_text, e8_text, e9_text]) -print(iconUiList) -widgetLayout.addLayout(wineFrame, 6, 1, 1, 1) -widgetLayout.addWidget(e12_text, 7, 1, 1, 1) -widgetLayout.addWidget(button4, 7, 2, 1, 1) -widgetLayout.addLayout(debControlFrame, 16, 1, 1, 1) -widgetLayout.addWidget(label13_text, 17, 0, 1, 3) -widgetLayout.addWidget(textbox1, 18, 0, 1, 3) -# 高级功能 -moreSetting = QtWidgets.QGroupBox(transla.transe("U", "高级设置")) -debDepends = QtWidgets.QLineEdit() -debRecommend = QtWidgets.QLineEdit() -debFirstArch = QtWidgets.QComboBox() -debFirstArch.addItems(["all", "i386", "arm64"]) -debFirstArch.setCurrentIndex(0) -debFirstArch.currentIndexChanged.connect(AutoPathSet) -debDepends.setPlaceholderText(transla.transe("U", "deb 包的依赖(如无特殊需求默认即可)")) -debDepends.setText("deepin-wine6-stable, deepin-wine-helper (>= 5.1.30-1), fonts-wqy-microhei, fonts-wqy-zenhei") -debRecommend.setPlaceholderText(transla.transe("U", "deb 包的推荐依赖(非强制,一般默认即可)")) -moreSettingLayout = QtWidgets.QVBoxLayout() -localWineVersion = QtWidgets.QComboBox() -useInstallWineArch = QtWidgets.QComboBox() -useInstallWineArch.addItems(["wine", "wine64"]) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "Wine 位数(只限本地需要打包集成的Wine):\n提示:32位的Wine不能使用64位容器"))) -#moreSettingLayout.addWidget(localWineVersion) -moreSettingLayout.addWidget(useInstallWineArch) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 包选项:"))) -moreSettingLayout.addWidget(rmBash) -moreSettingLayout.addWidget(cleanBottonByUOS) -moreSettingLayout.addWidget(chooseWineHelperValue) -moreSettingLayout.addWidget(disabledMono) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 的依赖(强制,如无特殊需求默认即可):"))) -moreSettingLayout.addWidget(debDepends) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "deb 的推荐依赖(非强制,一般默认即可):"))) -moreSettingLayout.addWidget(debRecommend) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "要显示的 .desktop 文件的 MimeType:"))) -moreSettingLayout.addWidget(e10_text) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包 deb 架构:"))) -moreSettingLayout.addWidget(debFirstArch) -moreSettingLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "打包选项:"))) -moreSettingLayout.addWidget(debArch) -moreSetting.setLayout(moreSettingLayout) -widgetLayout.addWidget(moreSetting, 0, 3, 16, 2) -widgetLayout.addWidget(build7z, 16, 3) -widgetLayout.addWidget(buildDebDir, 16, 4) -useInstallWineArch.setDisabled(True) -wineVersion.currentTextChanged.connect(ChangeWine) -chooseWineHelperValue.stateChanged.connect(ChangeWine) -e1_text.textChanged.connect(AutoPathSet) -e2_text.textChanged.connect(AutoPathSet) -debArch.currentIndexChanged.connect(AutoPathSet) -debArch.currentIndexChanged.connect(ChangeArchCombobox) -e12_text.textChanged.connect(UserPathSet) -e1_text.setPlaceholderText("例如 spark-deepin-wine-runner,不建议有大写字符") -e2_text.setPlaceholderText(f"例如 {version}") -e7_text.setPlaceholderText("例如 c:/Program Files/Tencent/QQ/Bin/QQ.exe") -e9_text.setPlaceholderText(transla.transe("U", "支持 png 和 svg 格式,不支持 ico 格式")) -# 菜单栏 -menu = window.menuBar() -programmenu = menu.addMenu(transla.transe("U", "程序")) -debMenu = menu.addMenu(transla.transe("U", "deb 包")) -uploadSparkStore = menu.addMenu(transla.transe("U", "投稿到星火应用商店")) -help = menu.addMenu(transla.transe("U", "帮助")) -exit = QtWidgets.QAction(transla.transe("U", "退出程序")) -debE = QtWidgets.QAction(transla.transe("U", "只读取 Control 信息")) -debX = QtWidgets.QAction(transla.transe("U", "读取所有(需解包,时间较久)")) -uploadSparkStoreWebsize = QtWidgets.QAction(transla.transe("U", "从网页端投稿")) -if os.path.exists("/opt/spark-store-submitter/bin/spark-store-submitter"): - uploadSparkStoreProgram = QtWidgets.QAction(transla.transe("U", "使用投稿器投稿(推荐)")) -else: - uploadSparkStoreProgram = QtWidgets.QAction(transla.transe("U", "使用投稿器投稿(推荐,请先安装投稿器)")) - uploadSparkStoreProgram.setDisabled(True) -tip = QtWidgets.QAction(transla.transe("U", "小提示")) -getPdfHelp = QtWidgets.QAction(transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用)\nBy @雁舞白沙")) -exit.triggered.connect(window.close) -tip.triggered.connect(helps) -programmenu.addAction(exit) -debMenu.addAction(debE) -debMenu.addAction(debX) -uploadSparkStore.addAction(uploadSparkStoreProgram) -uploadSparkStore.addAction(uploadSparkStoreWebsize) -debE.triggered.connect(lambda: ReadDeb(False)) -debX.triggered.connect(lambda: ReadDeb(True)) -uploadSparkStoreWebsize.triggered.connect(lambda: webbrowser.open_new_tab("https://upload.deepinos.org")) -uploadSparkStoreProgram.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"/opt/spark-store-submitter/bin/spark-store-submitter '{e12_text.text()}'"]).start()) -getPdfHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://bbs.deepin.org/post/246837")) -help.addAction(tip) -help.addAction(getPdfHelp) -# 控件配置 -try: - e6_text.setText(sys.argv[1].replace("~", get_home())) - e5_text.setText(pathlib.PurePath(sys.argv[1]).name) - wineVersion.setCurrentText(sys.argv[2]) -except: - pass -rmBash.setChecked(True) -disabledMono.setChecked(True) -cleanBottonByUOS.setChecked(True) -chooseWineHelperValue.setChecked(True) -e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_all.deb") -widget.setLayout(widgetLayout) -window.setCentralWidget(widget) -window.setWindowTitle(f"wine 应用打包器 {version}") -window.setWindowIcon(QtGui.QIcon(iconPath)) -window.resize(int(window.frameSize().width() * 2.1), int(window.frameSize().height())) -e1_text.setWhatsThis("""com.XXX.deepin -XXX指windows软件的英文名称,可以自定义名称,但最好是用软件解压安装后自动生成的英文名称,如:dingtalk。包名只能含有小写字母(a-z)、数字(0-9)、加号(+)和减号(-)、以及点号(.),软件包名最短长度为两个字符,且包名必须以字母开头。""") -# 创建控件 -e2_text.setWhatsThis(transla.transe("U", """6.5.50(随便填写或填写该软件的windows版本的版本号,6.5.50只是示例)。""")) -e3_text.setWhatsThis(transla.transe("U", """随便填写或使用该软件的windows版本的软件简介。""")) -e4_text.setWhatsThis(transla.transe("U", """填写自己的网名,若是自用软件,不上架至应用商店,不进行后续维护,可随便填写。""")) -e5_text.setWhatsThis(f"解压容器到其它机器的容器名称,一般自动带出
") -e6_text.setWhatsThis(transla.transe("U", f"要打包的容器所在路径,也可以选择已经好打包的 7z 文件,一般自动带出")) -e7_text.setWhatsThis("""可执行文件的运行路径格式是“C:/XXX/XXX.exe”(不包含引号)""") -debArch.setWhatsThis(transla.transe("U", "选择生成 deb 包所对应的架构")) -rmBash.setWhatsThis(transla.transe("U", "清理容器无用内容,一般建议勾选,最新版本默认勾选,如果有特殊需求(如容器内有 mono、gecko 等)建议取消勾选")) -debDepends.setWhatsThis(transla.transe("U", "生成 deb 包所需的依赖,一般情况下默认即可")) -debRecommend.setWhatsThis(transla.transe("U", "生成 deb 包的推荐依赖,一般情况下为空即可")) -cleanBottonByUOS.setWhatsThis(transla.transe("U", "清理容器无用内容,一般建议勾选,最新版本默认勾选,如果有特殊需求(如容器内有 mono、gecko 等)建议取消勾选")) -chooseWineHelperValue.setWhatsThis(transla.transe("U", "使用星火 dwine helper 替换 Deepin Wine Helper,投稿星火应用商店的话建议勾选,最新版本默认勾选(如果打包 arm 包将不会提供选择)")) -option1_text.setWhatsThis("""点击右侧的下拉箭头,选择该软件所属的软件分类即可,常见软件分类名称释义: -Network=网络应用; -Chat=即时通讯或社交沟通; -Video=视频播放; -Graphics=图形图像; -Office=办公学习; -Translation=阅读翻译; -Development=软件开发; -Utility=工具软件或其他应用。 -不明白英文的可以百度查询一下软件分类名称的意思。 -注意:此时选择的软件分类名称决定了该软件打包后再安装时会安装在启动器中的哪个软件分类目录中。""") -e8_text.setWhatsThis(transla.transe("U", """填写该软件的中文或英文名称。""")) -e9_text.setWhatsThis(transla.transe("U", """图标只支持PNG格式和SVG格式,其他格式无法显示。""")) -e10_text.setWhatsThis(transla.transe("U", "快捷方式的 MimeType 项,一般为空即可")) -option1_text.setWhatsThis(transla.transe("U", "打包的 Wine 版本,根据实际情况选择(如果打包 arm 包将不会提供选择)")) -e12_text.setWhatsThis(transla.transe("U", "打包出的 deb 生成的位置,一般自动生成")) -e15_text.setWhatsThis(transla.transe("U", "程序参数,如%u,一般不需要")) -build7z.setWhatsThis(transla.transe("U", "只打包容器生成 7z 包,不做其它操作")) -buildDebDir.setWhatsThis(transla.transe("U", "构建 deb 包目录,但不打包成 deb")) -textbox1.setWhatsThis(transla.transe("U", "查看打包过程中命令返回内容")) -button5.setWhatsThis(transla.transe("U", "点击该按钮打包生成 deb")) -installDeb.setWhatsThis(transla.transe("U", "调用默认的 deb 安装工具安装生成的 deb")) -#window.setWindowFlag(QtGui.Qt) -window.show() -sys.exit(app.exec_()) -# Flag:解包只读control和解包全部读取 \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner deleted file mode 100755 index 65004ce..0000000 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner +++ /dev/null @@ -1,3105 +0,0 @@ -#!/usr/bin/env python3 -# 使用系统默认的 python3 运行 -################################################################################################################# -# 作者:gfdgd xi -# 版本:3.0.0 -# 更新时间:2022年12月10日 -# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 -# 基于 Python3 的 PyQt5 构建 -################################################################################################################# -################# -# 引入所需的库 -################# -import os -import sys -import time -import json -import pyperclip -import random -import base64 -import shutil -import hashlib -import platform -import threading -import traceback -import webbrowser -import updatekiller -import subprocess -import req as requests -import urllib.parse as parse -import PyQt5.QtGui as QtGui -import PyQt5.QtCore as QtCore -import PyQt5.QtWidgets as QtWidgets -try: - import PyQt5.QtWebEngineWidgets as QtWebEngineWidgets - bad = False -except: - bad = True -from trans import * -from Model import * - -def PythonLower(): - app = QtWidgets.QApplication(sys.argv) - QtWidgets.QMessageBox.critical(None, "错误", "Python 至少需要 3.6 及以上版本,目前版本:" + platform.python_version() + "") - sys.exit(1) - -# Python 版本检测,因为 f-string 格式化要至少 Python 3.6 及以上的版本,所以需要检测 -# 判断主版本号 -if sys.version_info[0] < 3: - PythonLower() -if sys.version_info[1] < 6: - PythonLower() - -################### -# 程序所需事件 -################### - -# 打开程序官网 -def OpenProgramURL(): - webbrowser.open_new_tab(programUrl) - -# 读取文本文档 -def readtxt(path): - f = open(path, "r") # 设置文件对象 - str = f.read() # 获取内容 - f.close() # 关闭文本对象 - return str # 返回结果 - -# 写入文本文档 -def write_txt(path, things): - file = open(path, 'w', encoding='UTF-8') # 设置文件对象 - file.write(things) # 写入文本 - file.close() # 关闭文本对象 - -# 获取用户桌面目录 -def get_desktop_path(): - for line in open(get_home() + "/.config/user-dirs.dirs"): # 以行来读取配置文件 - desktop_index = line.find("XDG_DESKTOP_DIR=\"") # 寻找是否有对应项,有返回 0,没有返回 -1 - if desktop_index != -1: # 如果有对应项 - break # 结束循环 - if desktop_index == -1: # 如果是提前结束,值一定≠-1,如果是没有提前结束,值一定=-1 - return -1 - else: - get = line[17:-2] # 截取桌面目录路径 - get_index = get.find("$HOME") # 寻找是否有对应的项,需要替换内容 - if get != -1: # 如果有 - get = get.replace("$HOME", get_home()) # 则把其替换为用户目录(~) - return get # 返回目录 - -# 获取用户主目录 -def get_home(): - return os.path.expanduser('~') - -# 第一个浏览按钮事件 -def liulanbutton(): - path = QtWidgets.QFileDialog.getExistingDirectory(widget, "选择 wine 容器", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"]) - if path != "" and path != "()": - e1.setEditText(path) - write_txt(get_home() + "/.config/deepin-wine-runner/WineBotton.json", json.dumps({"path": path})) # 写入配置文件 - -# 第二个浏览按钮事件 -def liulanexebutton(): - path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 exe 可执行文件", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExe.json"))["path"], "exe 可执行文件(*.exe);;MSI 文件(*.msi);;所有文件(*.*)") - if path != "" and path != "()": - e2.setEditText(path[0]) # 显示路径 - write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": os.path.dirname(path[0])})) # 写入配置文件 - -run = None -# 使用多线程运行可执行文件 -def runexebutton(self): - global run - DisableButton(True) - if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: - if QtWidgets.QMessageBox.question(widget, "提示", "检查到您未安装这个 wine,是否继续使用这个 wine 运行?") == QtWidgets.QMessageBox.No: - DisableButton(False) - return - if e2.currentText() == "": # 判断文本框是否有内容 - QtWidgets.QMessageBox.information(widget, "提示", "没有填写需要使用的 exe 应用") - DisableButton(False) - return - returnText.setText("") - run = Runexebutton_threading() - run.signal.connect(QT.ShowWineReturn) - run.showHistory.connect(QT.ShowHistory) - run.start() - -class QT: - message = None - def ShowWineReturn(things): - returnText.insertPlainText(things) - - def ShowHistory(temp): - e1.clear() - e2.clear() - e2.addItems(wineBottonHistory) - e2.setEditText(wineBottonHistory[-1]) - e1.addItems(findExeHistory) - e1.setEditText(findExeHistory[-1]) - -repairList = [] -# Flag: 日志推断解决方案功能 -class LogChecking(): - def ShowWindow(): - global logThread - global logWindow - global questionList - global repairButton - logWindow = QtWidgets.QWidget() - logWindowLayout = QtWidgets.QGridLayout() - questionList = QtWidgets.QListView() - repairButton = QtWidgets.QPushButton("一键修复") - repairButton.setDisabled(True) - repairButton.clicked.connect(LogChecking.RepairButton) - nmodel = QtGui.QStandardItemModel(window) - item = QtGui.QStandardItem("正在分析中……") - questionList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - nmodel.appendRow(item) - questionList.setModel(nmodel) - logWindowLayout.addWidget(questionList, 0, 0, 3, 1) - logWindowLayout.addWidget(repairButton, 0, 2, 1, 1) - logWindow.setWindowTitle("分析日志") - logWindow.setLayout(logWindowLayout) - logThread = LogThreading() - logThread.done.connect(LogChecking.Show) - logThread.start() - logWindow.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) - logWindow.resize(int(logWindow.frameGeometry().width() * 1.2), int(logWindow.frameGeometry().height() * 1.2)) - logWindow.show() - - def RepairButton(): - index = questionList.currentIndex().row() - lists = questionMap[index] - print(f"{programPath}/CheckDLL/bash/{lists[1].lower()}.sh") - if lists[0] == 1 and os.path.exists(f"{programPath}/CheckDLL/bash/{lists[1].lower()}.sh"): - OpenTerminal(f"'{programPath}/AutoShell/main.py' '{programPath}/CheckDLL/bash/{lists[1].lower()}.sh'") - return - if lists[0] == 2: - QtWidgets.QMessageBox.information(logWindow, "修复方法", "切换其它 Wine") - return - if lists[0] == 4: - QtWidgets.QMessageBox.information(logWindow, "修复方法", "如是 Deepin Wine 可以尝试切换 WineHQ,\n并且取消勾选运行器主页面菜单栏“程序”=>“设置Wine”,取消勾选“屏蔽 Wine 默认 Mono 和 Gecko 安装器”\n然后尝试在菜单栏的“Wine”=>“在指定 Wine、容器安装组件”=>“在指定 Wine、容器安装 Gecko”来安装 Gecko") - return - if lists[0] == 5: - InstallMonoGecko("mono") - return - QtWidgets.QMessageBox.critical(logWindow, "错误", "无法修复该问题") - - def Show(lists): - global questionMap - nmodel = QtGui.QStandardItemModel(window) - disbledButton = False - print(lists) - if not len(lists): - nmodel.appendRow(QtGui.QStandardItem(f"√ 无法分析到错误")) - disbledButton = True - for i in lists: - if i[0] == 0: - nmodel.appendRow(QtGui.QStandardItem(f"√ 无法分析到错误")) - disbledButton = True - break - if i[0] == 1: - nmodel.appendRow(QtGui.QStandardItem(f"× 无法调用 Dll:{i[1]}")) - if i[0] == 2: - nmodel.appendRow(QtGui.QStandardItem(f"× 尝试用 Mono 运行非 .net 应用 {i[1]}?")) - if i[0] == 3: - nmodel.appendRow(QtGui.QStandardItem(f"! 无法加载 Gecko,是被禁用或未安装?")) - if i[0] == 4: - nmodel.appendRow(QtGui.QStandardItem(f"× 无法更新 Wine 容器版本,是否还有 Wine 程序运行?")) - if i[0] == 5: - nmodel.appendRow(QtGui.QStandardItem(f"× Mono 禁用/未安装")) - questionMap = lists[:] - repairButton.setDisabled(disbledButton) - questionList.setModel(nmodel) - -class LogThreading(QtCore.QThread): - done = QtCore.pyqtSignal(list) - def __init__(self): - super().__init__() - - def run(self): - global logText - repairList = [] - logText = returnText.toPlainText() - print(logText.splitlines()) - for i in logText.splitlines(): - print(i) - checkingText = i.lower() - if "err:module:import_dll Library".lower() in checkingText: - # Lose Dll - repairList.append([1, i[i.index("Library") + 8: i.index("(")].strip()]) - continue - if "err:module:fixup_imports_ilonly".lower() in checkingText: - # Lose Dll - repairList.append([1, i[i.index("_ilonly") + 8: i.index("not")].strip()]) - continue - if "Cannot open assembly".lower() in checkingText and ": File does not contain a valid CIL image.".lower() in checkingText: - # Mono - repairList.append([2, i.replace(": File does not contain a valid CIL image.", "").replace("Cannot open assembly", "").strip()[1: -1]]) - if "Could not load wine-gecko. HTML rendering will be disabled.".lower() in checkingText and "Could not find Wine Gecko. HTML rendering will be disabled.".lower() in checkingText: - # Disbled Gecko - repairList.append([3, ""]) - if "Your wineserver binary was not upgraded correctly".lower() in checkingText: - repairList.append([4, ""]) - if "Wine Mono is not installed".lower() in checkingText: - repairList.append([5, ""]) - self.done.emit(repairList) - - -def DisableButton(things): - button_r_6.setDisabled(things) - button1.setDisabled(things) - button2.setDisabled(things) - button3.setDisabled(things) - wineConfig.setDisabled(things) - e1.setDisabled(things) - e2.setDisabled(things) - o1.setDisabled(things) - miniAppStore.setDisabled(things) - #winetricksOpen.configure(state=a[things]) - getProgramIcon.setDisabled(things) - uninstallProgram.setDisabled(things) - trasButton.setDisabled(things) - -def CheckProgramIsInstall(program): - return not bool(os.system(f"which '{program}'")) -class Runexebutton_threading(QtCore.QThread): - signal = QtCore.pyqtSignal(str) - showHistory = QtCore.pyqtSignal(str) - def __init__(self): - super().__init__() - - def run(self): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - option = "" - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if setting["MonoGeckoInstaller"]: - option += f"WINEDLLOVERRIDES=\"mscoree,mshtml=\" " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - else: - option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " - wineUsingOption = "" - exePath = e2.currentText() - if True: - fileName = [".exe"] - changePath = False - for i in fileName: - if i in exePath: - print(i) - print(exePath) - l = exePath.index(i) - exePath = f"{exePath[:l+4]}' {exePath[l+4:]} '" - print(l) - print(exePath) - changePath = True - break - #if not changePath and not os.path.exists(changePath): - if not changePath and not os.path.exists(exePath): - # 删除前后无用空格以防止出现问题 - print(exePath) - exePath = exePath.strip() - # 有空格再说 - if " " in exePath: - l = exePath.index(" ") - exePath = f"{exePath[:l]}' {exePath[l:]} '" - print(l) - #print(i) - print(exePath) - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable": - wineUsingOption = "" - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - if setting["TerminalOpen"]: - res = "" - if e2.currentText()[-4:] == ".msi" and os.path.exists(e2.currentText()): - OpenTerminal("env WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " msiexec /i '" + e2.currentText() + "' " + setting["WineOption"]) - elif e2.currentText()[-4:] == ".bat" and os.path.exists(e2.currentText()): - OpenTerminal("env WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " wineconsole '" + e2.currentText() + "' " + setting["WineOption"]) - else: - OpenTerminal("env WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + exePath + "' " + setting["WineOption"]) - #res = subprocess.Popen([f"'{programPath}/launch.sh' deepin-terminal -C \"WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + e2.currentText() + "' " + setting["WineOption"] + "\" --keep-open" + wineUsingOption], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - else: - if e2.currentText()[-4:] == ".msi" and os.path.exists(e2.currentText()): - res = subprocess.Popen(["WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " msiexec /i '" + e2.currentText() + "' " + setting["WineOption"]], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - elif e2.currentText()[-4:] == ".bat" and os.path.exists(e2.currentText()): - res = subprocess.Popen(["WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " wineconsole '" + e2.currentText() + "' " + setting["WineOption"]], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - else: - print(["WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + exePath + "' " + setting["WineOption"]]) - res = subprocess.Popen(["WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + exePath + "' " + setting["WineOption"]], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - # 实时读取程序返回 - # - if not setting["TerminalOpen"]: - while res.poll() is None: - try: - text = res.stdout.readline().decode("utf8") - except: - text = "" - self.signal.emit(text) - print(text, end="") - if len(findExeHistory) == 0 or findExeHistory[-1] != wineBottonPath: - findExeHistory.append(wineBottonPath) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", str(json.dumps(ListToDictionary(findExeHistory)))) # 将历史记录的数组转换为字典并写入 - if len(wineBottonHistory) == 0 or wineBottonHistory[-1] != e2.currentText(): - wineBottonHistory.append(e2.currentText()) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", str(json.dumps(ListToDictionary(wineBottonHistory)))) # 将历史记录的数组转换为字典并写入 - self.showHistory.emit("") - # 针对 QQ、TIM 安装后不会生成 lnk 的问题,由程序读取以及自动创建 - # 判断是否安装了 QQ/TIM - for i in iconListUnBuild: - if os.path.exists(i[1].replace("wineBottonPath", wineBottonPath)): - if not os.path.exists(f"{get_home()}/.local/share/applications/wine/{i[0]}-{os.path.basename(wineBottonPath)}.desktop"): - print("图标不存在,创建图标") - # 图标不存在 - # 写入 .desktop 文件 - try: - os.system(f"mkdir -p '{get_home()}/.local/share/applications/wine'") - name = i[0] - if setting["BuildByBottleName"]: - name = f"{i[0]}——{os.path.basename(wineBottonPath)}" - write_txt(f"{get_home()}/.local/share/applications/wine/{i[0]}-{os.path.basename(wineBottonPath)}.desktop", f'''[Desktop Entry] -Name={name} -Exec=env WINEPREFIX='{wineBottonPath}' {option} {wine[o1.currentText()]} '{i[1].replace("wineBottonPath", wineBottonPath)}' {setting["WineOption"]} {wineUsingOption} -Icon={programPath}/Icon/{i[0]}.svg -Type=Application -StartupNotify=true''') - except: - # 写入不进去就别写入了,当什么事情都没发生就行 - traceback.print_exc() - DisableButton(False) - -class Temp: - webWindow = None - -def OpenUrl(url): - print(url.url()) - # 判断是否可以使用小窗打开 - if not bad: - '''Temp.webWindow = QtWidgets.QMainWindow() - web = QtWebEngineWidgets.QWebEngineView() - web.setUrl(url) - Temp.webWindow.setWindowTitle("浏览页面") - Temp.webWindow.setCentralWidget(web) - Temp.webWindow.setWindowIcon(QtGui.QIcon(iconPath)) - Temp.webWindow.show() - return''' - webbrowser.open_new_tab(url.url()) - - #QtCore.QUrl().url() - -# 显示“关于这个程序”窗口 -def about_this_program()->"显示“关于这个程序”窗口": - global about - global title - global iconPath - QT.message = QtWidgets.QMainWindow() - QT.message.setWindowIcon(QtGui.QIcon(iconPath)) - messageWidget = QtWidgets.QWidget() - QT.message.setWindowTitle(f"关于 {title}") - messageLayout = QtWidgets.QGridLayout() - messageLayout.addWidget(QtWidgets.QLabel(f""), 0, 0, 1, 1, QtCore.Qt.AlignTop) - aboutInfo = QtWidgets.QTextBrowser(messageWidget) - aboutInfo.setFocusPolicy(QtCore.Qt.NoFocus) - #aboutInfo.copyAvailable.connect(lambda: print("b")) - aboutInfo.anchorClicked.connect(OpenUrl) - aboutInfo.setOpenLinks(False) - aboutInfo.setHtml(about) - aboutInfo.setOpenExternalLinks(False) - messageLayout.addWidget(aboutInfo, 0, 1, 1, 1) - ok = QtWidgets.QPushButton(transla.transe("U", "确定")) - ok.clicked.connect(QT.message.close) - messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight) - messageWidget.setLayout(messageLayout) - QT.message.setCentralWidget(messageWidget) - QT.message.resize(int(messageWidget.frameGeometry().width() * 1.5), int(messageWidget.frameGeometry().height() * 1.5)) - QT.message.show() - -# 显示“提示”窗口 -def helps(): - global tips - QtWidgets.QMessageBox.information(widget, "提示", tips) - -# 显示更新内容窗口 -def UpdateThings(): - QtWidgets.QMessageBox.information(widget, "更新内容", updateThings) - -# 生成 desktop 文件在启动器 -def make_desktop_on_launcher(): - try: - if combobox1.currentText() == "" or e2.currentText() == "": # 判断文本框是否有内容 - QtWidgets.QMessageBox.information(widget, "提示", "没有填写需要使用 exe 应用或保存的文件名") - return - if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: - if QtWidgets.QMessageBox.question(widget, "提示", "检查到您未安装这个 wine,是否继续使用这个 wine 写入?") == QtWidgets.QMessageBox.No: - DisableButton(False) - return - else: # 如果都有 - if os.path.exists(get_home() + "/.local/share/applications/" + combobox1.currentText() + ".desktop"): # 判断目录是否有该文件,如果有 - choose = QtWidgets.QMessageBox.question(widget, "提示", "文件已经存在,是否覆盖?") == QtWidgets.QMessageBox.Yes - if choose: # 如要覆盖 - os.remove(get_home() + "/.local/share/applications/" + combobox1.currentText() + ".desktop") # 删除该文件 - else: # 如不覆盖 - return # 结束 - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - option = "" - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - else: - option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " - wineUsingOption = "" - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable": - wineUsingOption = "" - value = "" - if e2.currentText()[:2].upper() == "C:": - value = f"{wineBottonPath}/drive_c/{e2.currentText()[2:]}".replace("\\", "/").replace("//", "/") - print(value) - iconPaths = iconPath - for i in iconList: - listValue = i[1].replace("wineBottonPath", wineBottonPath) - if listValue == e2.currentText() or listValue == value: - # 如果路径相同,即可以用程序对应的图标 - iconPaths = f"{programPath}/Icon/{i[0]}.svg" - # 读到了就不需要再读取了 - break - os.system(f"mkdir -p '{get_home()}/.local/share/applications/wine'") - write_txt(get_home() + "/.local/share/applications/wine/" + combobox1.currentText() + ".desktop", f'''[Desktop Entry] -Name={combobox1.currentText()} -Exec=env WINEPREFIX='{wineBottonPath}' {option} {wine[o1.currentText()]} '{e2.currentText()}' {setting["WineOption"]} {wineUsingOption} -Icon={iconPaths} -Type=Application -StartupNotify=true''') # 写入文本文档 - if len(shellHistory) == 0 or shellHistory[-1] != combobox1.currentText(): - shellHistory.append(combobox1.currentText()) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", str(json.dumps(ListToDictionary(shellHistory)))) # 将历史记录的数组转换为字典并写入 - combobox1.clear() - combobox1.addItems(shellHistory) - QtWidgets.QMessageBox.information(widget, "提示", "生成完成!") # 显示完成对话框 - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", f"快捷方式创建失败,错误如下:\n{traceback.format_exc()}") - -def ConfigQemu(): - lists = [] - for i in qemuBottleList: - lists.append(f"{i[0]}/{i[1]}") - choose = QtWidgets.QInputDialog.getItem(window, "提示", "选择需要 Chroot 到里面的容器", lists, 0, False) - if not choose[1]: - return - threading.Thread(target=OpenTerminal, args=[f"python3 '{programPath}/QemuRun.py' '{choose[0]}' '{int(setting['QemuUnMountHome'])}' "]).start() - print(choose) - -# 生成 desktop 文件在桌面 -# (第四个按钮的事件) -def make_desktop_on_desktop(): - try: - if combobox1.currentText() == "" or e2.currentText() == "": # 判断文本框是否有内容 - QtWidgets.QMessageBox.information(widget, "提示", "没有填写需要使用 exe 应用或保存的文件名") - return - if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: - if QtWidgets.QMessageBox.question(widget, "提示", "检查到您未安装这个 wine,是否继续使用这个 wine 写入?") == QtWidgets.QMessageBox.No: - DisableButton(False) - return - else: # 如果都有 - if os.path.exists(get_desktop_path() + "/" + combobox1.currentText() + ".desktop"): # 判断目录是否有该文件,如果有 - choose = QtWidgets.QMessageBox.question(widget, "提示", "文件已经存在,是否覆盖?") == QtWidgets.QMessageBox.Yes - if choose: # 如要覆盖 - os.remove(get_desktop_path() + "/" + combobox1.currentText() + ".desktop") # 删除该文件 - else: # 如不覆盖 - return # 结束 - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - wineUsingOption = "" - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable": - wineUsingOption = "" - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - if not os.path.exists(get_desktop_path()): - os.makedirs(get_home()) - os.mknod(get_desktop_path() + "/" + combobox1.currentText() + ".desktop") - option = "" - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - value = "" - if e2.currentText()[:2].upper() == "C:": - value = f"{wineBottonPath}/drive_c/{e2.currentText()[2:]}".replace("\\", "/").replace("//", "/") - print(value) - iconPaths = iconPath - for i in iconList: - listValue = i[1].replace("wineBottonPath", wineBottonPath) - if listValue == e2.currentText() or listValue == value: - # 如果路径相同,即可以用程序对应的图标 - iconPaths = f"{programPath}/Icon/{i[0]}.svg" - # 读到了就不需要再读取了 - break - os.system(f"mkdir -p '{get_home()}/.local/share/applications/wine'") - write_txt(get_desktop_path() + "/" + combobox1.currentText() + ".desktop", f'''[Desktop Entry] -Name={combobox1.currentText()} -Exec=env WINEPREFIX='{wineBottonPath}' {option} {wine[o1.currentText()]} '{e2.currentText()}' {setting["WineOption"]} {wineUsingOption} -Icon={iconPaths} -Type=Application -StartupNotify=true''') # 写入文本文档 - if len(shellHistory) == 0 or shellHistory[-1] != combobox1.currentText(): - shellHistory.append(combobox1.currentText()) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", str(json.dumps(ListToDictionary(shellHistory)))) # 将历史记录的数组转换为字典并写入 - combobox1.clear() - combobox1.addItems(shellHistory) - QtWidgets.QMessageBox.information(widget, "提示", "生成完成!") # 显示完成对话框 - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", f"快捷方式创建失败,错误如下:\n{traceback.format_exc()}") - -# 数组转字典 -def ListToDictionary(list): - dictionary = {} - for i in range(len(list)): - dictionary[i] = list[i] - return dictionary - -def CleanProgramHistory(): - if QtWidgets.QMessageBox.question(widget, "警告", "删除后将无法恢复,你确定吗?\n删除后软件将会自动重启。") == QtWidgets.QMessageBox.Yes: - try: - shutil.rmtree(get_home() + "/.config/deepin-wine-runner") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc()) - ReStartProgram() - -def CleanProgramCache(): - try: - shutil.rmtree(get_home() + "/.cache/deepin-wine-runner") - QtWidgets.QMessageBox.information(widget, "提示", "缓存清理完毕!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc()) - - -# 重启本应用程序 -def ReStartProgram(): - python = sys.executable - os.execl(python, python, * sys.argv) - -def KillAllProgram(): - pass - -def KillProgram(): - os.system(f"killall {wine[o1.currentText()]} -9") - os.system("killall winedbg -9") - exeName = os.path.basename(e2.currentText()) - os.system(f"killall {exeName} -9") - -def InstallWine(): - threading.Thread(target=OpenTerminal, args=[f"'{programPath}/AllInstall.py'"]).start() - -def InstallWineOnDeepin23(): - threading.Thread(target=OpenTerminal, args=[f"'{programPath}/InstallWineOnDeepin23.py'"]).start() - -class DllWindow(): - def ShowWindow(): - global dllMessage - global dllInfoMap - global textInfo - global dllName - dllMessage = QtWidgets.QWidget() - dllLayout = QtWidgets.QGridLayout() - try: - dllInfoMap["check"] - except: - try: - with open(f"{programPath}/CheckDLL/lists.json", "r") as file: - dllInfoMap = json.loads(file.read()) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(dllMessage, "错误", traceback.format_exc()) - # UI - dllName = QtWidgets.QLineEdit() - dllButton = QtWidgets.QPushButton("查询") - textInfo = QtWidgets.QTextBrowser() - dllButton.clicked.connect(DllWindow.Find) - dllLayout.addWidget(QtWidgets.QLabel("Dll 名称:"), 0, 0) - dllLayout.addWidget(dllName, 0, 1) - dllLayout.addWidget(dllButton, 0, 2) - dllLayout.addWidget(textInfo, 1, 0, 1, 3) - dllMessage.setWindowTitle(f"{title}——查询 Dll") - dllMessage.setLayout(dllLayout) - dllMessage.resize(int(dllMessage.frameGeometry().width() * 1.2), int(dllMessage.frameGeometry().height() * 1.1)) - dllMessage.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) - dllMessage.show() - - def Find(): - dllNameText = dllName.text().strip().lower() - if dllNameText[-4:] != ".dll": - dllNameText += ".dll" - try: - textInfo.setText(dllInfoMap[dllNameText]) - except: - textInfo.setText(f"未查询到有关 Dll '{dllNameText}' 有关的内容") - -def InstallWineOnDeepin23Alpha(): - threading.Thread(target=OpenTerminal, args=[f"'{programPath}/InstallWineOnDeepin23Alpha.py'"]).start() - -def InstallWineHQ(): - threading.Thread(target=OpenTerminal, args=[f"{programPath}/InstallNewWineHQ.sh"]).start() - -def OpenWineBotton(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - os.system("xdg-open \"" + wineBottonPath.replace("\'", "\\\'") + "\"") - -def OpenWineFontPath(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - QtWidgets.QMessageBox.information(widget, "提示", transla.transe("U", "如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录")) - os.system("xdg-open \"" + wineBottonPath.replace("\'", "\\\'") + "/drive_c/windows/Fonts\"") - -def GetLoseDll(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - option = "" - if setting["MonoGeckoInstaller"]: - option += f"WINEDLLOVERRIDES=\"mscoree,mshtml=\" " - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - wineUsingOption = "" - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'") - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable": - wineUsingOption = "" - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - threading.Thread(target=os.system, args=[f"python3 '{programPath}/CheckDLL/main.py' '{e2.currentText()}' '{wineBottonPath}' '{wine[o1.currentText()]}'" + setting["WineOption"]]).start() - -class RunWineProgramThread(QtCore.QThread): - signal = QtCore.pyqtSignal(str) - showHistory = QtCore.pyqtSignal(str) - def __init__(self, wineProgram, history = False, Disbled = True): - super().__init__() - self.wineProgram = wineProgram - self.history = history - self.Disbled = Disbled - - def run(self): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - option = "" - if setting["MonoGeckoInstaller"]: - option += f"WINEDLLOVERRIDES=\"mscoree,mshtml=\" " - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - wineUsingOption = "" - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - os.system(f"'{programPath}/deepin-wine-runner-create-botton.py' '{wineBottonPath}'") - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable": - wineUsingOption = "" - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - if setting["TerminalOpen"]: - res = "" - OpenTerminal(f"env WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + self.wineProgram + "' " + setting["WineOption"] + " " + wineUsingOption) - #res = subprocess.Popen([f"'{programPath}/launch.sh' deepin-terminal -C \"WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + self.wineProgram + "' " + setting["WineOption"] + " " + wineUsingOption + "\" --keep-open"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - else: - res = subprocess.Popen(["WINEPREFIX='" + wineBottonPath + "' " + option + wine[o1.currentText()] + " '" + self.wineProgram + "' " + setting["WineOption"]], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - # 实时读取程序返回 - if not setting["TerminalOpen"]: - while res.poll() is None: - try: - text = res.stdout.readline().decode("utf8") - except: - text = "" - self.signal.emit(text) - print(text, end="") - if self.history: - if len(findExeHistory) == 0 or findExeHistory[-1] != wineBottonPath: - findExeHistory.append(wineBottonPath) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", str(json.dumps(ListToDictionary(findExeHistory)))) # 将历史记录的数组转换为字典并写入 - if len(wineBottonHistory) == 0 or wineBottonHistory[-1] != e2.currentText(): - wineBottonHistory.append(e2.currentText()) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", str(json.dumps(ListToDictionary(wineBottonHistory)))) # 将历史记录的数组转换为字典并写入 - self.showHistory.emit("") - if self.Disbled: - DisableButton(False) - - -runProgram = None -def RunWineProgram(wineProgram, history = False, Disbled = True): - global runProgram - DisableButton(True) - if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable(不推荐)" and o1.currentText() != "基于 UOS exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable": - if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: - if QtWidgets.QMessageBox.question(widget, "提示", "检查到您未安装这个 wine,是否继续使用这个 wine 运行?") == QtWidgets.QMessageBox.No: - DisableButton(False) - return - returnText.setText("") - runProgram = RunWineProgramThread(wineProgram, history, Disbled) - runProgram.signal.connect(QT.ShowWineReturn) - runProgram.showHistory.connect(QT.ShowHistory) - runProgram.start() - -class RunWinetricksThread(QtCore.QThread): - signal = QtCore.pyqtSignal(str) - def __init__(self): - super().__init__() - - def run(self): - wineBottonPath = setting["DefultBotton"] - if not e1.currentText() == "": - wineBottonPath = e1.currentText() - option = "" - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - wineUsingOption = "" - if o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable": - wineUsingOption = "" - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - if setting["TerminalOpen"]: - res = "" - # 用终端开应该不用返回输出内容了 - OpenTerminal(f"WINEPREFIX='{wineBottonPath}' {option} WINE=" + subprocess.getoutput(f"which {wine[o1.currentText()]}").replace(" ", "").replace("\n", "") + f" winetricks --gui {wineUsingOption}") - #res = subprocess.Popen([f"'{programPath}/launch.sh' deepin-terminal -C \"WINEPREFIX='{wineBottonPath}' {option} WINE=" + subprocess.getoutput(f"which {wine[o1.currentText()]}").replace(" ", "").replace("\n", "") + f" winetricks --gui {wineUsingOption}\" --keep-open"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - else: - res = subprocess.Popen([f"WINEPREFIX='{wineBottonPath}' {option} WINE='" + subprocess.getoutput(f"which {wine[o1.currentText()]}").replace(" ", "").replace("\n", "") + "' winetricks --gui"], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - # 实时读取程序返回 - while res.poll() is None: - try: - text = res.stdout.readline().decode("utf8") - except: - text = "" - self.signal.emit(text) - print(text, end="") - - - DisableButton(False) - -runWinetricks = None -def RunWinetricks(): - global runWinetricks - DisableButton(True) - if not CheckProgramIsInstall(wine[o1.currentText()]) and o1.currentText() != "基于 linglong 的 deepin-wine6-stable(不推荐)" and o1.currentText() != "基于 UOS exagear 的 deepin-wine6-stable" and o1.currentText() != "基于 UOS box86 的 deepin-wine6-stable": - if not CheckProgramIsInstall(wine[o1.currentText()]) and not o1.currentText() in untipsWine: - DisableButton(False) - return - if o1.currentText() == "基于 UOS box86 的 deepin-wine6-stable" or o1.currentText() == "基于 UOS exagear 的 deepin-wine6-stable": - if not os.path.exists(f"{programPath}/dlls-arm"): - if os.system(f"7z x -y \"{programPath}/dlls-arm.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dlls-arm.7z") - returnText.setText("") - runWinetricks = RunWinetricksThread() - runWinetricks.signal.connect(QT.ShowWineReturn) - runWinetricks.start() - -def CleanWineBottonByUOS(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{wine[o1.currentText()]}' '{programPath}/cleanbottle.sh' '{wineBottonPath}'") - -def FontAppStore(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{programPath}/launch.sh' '{programPath}/InstallFont.py' '{wineBottonPath}' {int(setting['RuntimeCache'])}") - -def GetDllFromInternet(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{programPath}/launch.sh' '{programPath}/InstallDll.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}") - -def WineBottonAutoConfig(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - option = "" - if setting["Architecture"] != "Auto": - option += f"WINEARCH={setting['Architecture']} " - if setting["MonoGeckoInstaller"]: - option += f"WINEDLLOVERRIDES=\"mscoree,mshtml=\" " - if not setting["Debug"]: - option += "WINEDEBUG=-all " - else: - option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message " - os.system(f"env WINEPREFIX='{wineBottonPath}' {option} WINE='{wine[o1.currentText()]}' '{programPath}/AutoConfig.py' '{wine[o1.currentText()]}' '{wineBottonPath}'") - -def InstallMonoGecko(program): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/InstallMono.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {program} {int(setting['RuntimeCache'])}") - -def InstallNetFramework(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/InstallNetFramework.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}") - -def InstallVB(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/InstallVisualBasicRuntime.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}") - -def InstallVisualStudioCPlusPlus(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/InstallVisualCPlusPlus.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}") - -def InstallMSXML(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/InstallMsxml.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}") - -def InstallDXVK(): - if not os.path.exists(f"{programPath}/dxvk"): - if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dxvk.7z") - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{wine[o1.currentText()]}' WINE64='{wine[o1.currentText()]}' WINEPREFIX='{wineBottonPath}' '{programPath}/dxvk/setup_dxvk.sh' uninstall") - -def InstallVkd3d(): - if not os.path.exists(f"{programPath}/vkd3d-proton"): - if os.system(f"7z x -y \"{programPath}/vkd3d-proton.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/vkd3d-proton.7z") - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{wine[o1.currentText()]}' WINE64='{wine[o1.currentText()]}' WINEPREFIX='{wineBottonPath}' '{programPath}/vkd3d-proton/setup_vkd3d_proton.sh' install") - -def UninstallVkd3d(): - if not os.path.exists(f"{programPath}/vkd3d-proton"): - if os.system(f"7z x -y \"{programPath}/vkd3d-proton.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/vkd3d-proton.7z") - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{wine[o1.currentText()]}' WINE64='{wine[o1.currentText()]}' WINEPREFIX='{wineBottonPath}' '{programPath}/vkd3d-proton/setup_vkd3d_proton.sh' uninstall") - #process = QtCore.QProcess() - #process.startDetached(f"{programPath}/launch.sh", ["deepin-terminal", "-e", - #"env", f"WINE={wine[o1.currentText()]}", f"WINE64={wine[o1.currentText()]}", f"WINEPREFIX={wineBottonPath}", "bash", - #f"{programPath}/dxvk/setup_dxvk.sh", "install"]) - -def UninstallDXVK(): - if not os.path.exists(f"{programPath}/dxvk"): - if os.system(f"7z x -y \"{programPath}/dxvk.7z\" -o\"{programPath}\""): - QtWidgets.QMessageBox.critical(widget, "错误", "无法解压资源") - return - os.remove(f"{programPath}/dxvk.7z") - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"env WINE='{wine[o1.currentText()]}' WINE64='{wine[o1.currentText()]}' WINEPREFIX='{wineBottonPath}' '{programPath}/dxvk/setup_dxvk.sh' uninstall") - #process = QtCore.QProcess() - #process.startDetached(f"{programPath}/launch.sh", ["deepin-terminal", "-e", - #"env", f"WINE={wine[o1.currentText()]}", f"WINE64={wine[o1.currentText()]}", f"WINEPREFIX={wineBottonPath}", - #f"{programPath}/dxvk/setup_dxvk.sh", "uninstall"]) - -def MiniAppStore(): - if e1.currentText()== "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/AppStore.py' '{wineBottonPath}' '{wine[o1.currentText()]}'") - -def InstallOther(): - if e1.currentText()== "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - OpenTerminal(f"'{programPath}/InstallOther.py' '{wineBottonPath}' '{wine[o1.currentText()]}' {int(setting['RuntimeCache'])}") - -def BuildExeDeb(): - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - threading.Thread(target=os.system, args=[f"python3 '{programPath}/deepin-wine-packager.py' '{wineBottonPath}' '{wine[o1.currentText()]}'"]).start() - -def SetDeepinFileDialogDeepin(): - code = os.system(f"pkexec \"{programPath}/deepin-wine-venturi-setter.py\" deepin") - if code != 0: - if code == 1: - QtWidgets.QMessageBox.critical(widget, "错误", "无法更新配置:配置不准重复配置") - return - QtWidgets.QMessageBox.critical(widget, "错误", "配置失败") - return - QtWidgets.QMessageBox.information(widget, "提示", "设置完成!") - -def AddReg(): - path = QtWidgets.QFileDialog.getOpenFileName(window, "保存路径", get_home(), "reg文件(*.reg);;所有文件(*.*)") - if path[0] == "" and not path[1]: - return - RunWineProgram(f"regedit' /S '{path[0]}' 'HKEY_CURRENT_USER\Software\Wine\DllOverrides") - -def SaveDllList(): - path = QtWidgets.QFileDialog.getSaveFileName(window, "保存路径", get_home(), "reg文件(*.reg);;所有文件(*.*)") - if path[0] == "" and not path[1]: - return - RunWineProgram(f"regedit' /E '{path[0]}' 'HKEY_CURRENT_USER\Software\Wine\DllOverrides") - -def SetDeepinFileDialogDefult(): - code = os.system(f"pkexec \"{programPath}/deepin-wine-venturi-setter.py\" defult") - if code != 0: - if code == 1: - QtWidgets.QMessageBox.critical(widget, "错误", "无法更新配置:配置不准重复配置") - return - QtWidgets.QMessageBox.critical(widget, "错误", "配置失败") - return - QtWidgets.QMessageBox.information(widget, "提示", "设置完成!") - -def SetDeepinFileDialogRecovery(): - threading.Thread(target=OpenTerminal, args=[f"pkexec '{programPath}/deepin-wine-venturi-setter.py' recovery"]).start() - -def DeleteDesktopIcon(): - if os.path.exists(f"{get_home()}/.local/share/applications/wine"): - try: - shutil.rmtree(f"{get_home()}/.local/share/applications/wine") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc()) - return - QtWidgets.QMessageBox.information(widget, "提示", "删除完成") - -def DeleteWineBotton(): - if QtWidgets.QMessageBox.question(widget, "提示", "你确定要删除容器吗?删除后将无法恢复!\n如果没有选择 wine 容器,将会自动删除默认的容器!") == QtWidgets.QMessageBox.No: - return - if e1.currentText() == "": - wineBottonPath = setting["DefultBotton"] - else: - wineBottonPath = e1.currentText() - try: - shutil.rmtree(wineBottonPath) - QtWidgets.QMessageBox.information(widget, "提示", "删除完毕!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc()) - -def ThankWindow(): - # 直接显示关于窗口,关于窗口已经添加 - about_this_program() - -def InstallWineFont(): - # 筛选 apt - if not os.system("which aptss"): - threading.Thread(target=OpenTerminal, args=[f"sudo aptss install ms-core-fonts -y"]).start() - elif not os.system("which ss-apt-fast"): - threading.Thread(target=OpenTerminal, args=[f"sudo ss-apt-fast install ms-core-fonts -y"]).start() - elif not os.system("which apt-fast"): - threading.Thread(target=OpenTerminal, args=[f"sudo apt-fast install ms-core-fonts -y"]).start() - else: - threading.Thread(target=OpenTerminal, args=[f"sudo apt install ms-core-fonts -y"]).start() - -def WineRunnerBugUpload(): - threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-runner-update-bug'"]).start() - -def SetHttpProxy(): - QtWidgets.QMessageBox.information(window, "提示", "请在下面的对话框正确输入内容以便设置代理") - proxyServerAddress = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器地址")[0] - port = QtWidgets.QInputDialog.getText(window, "提示", "请输入代理服务器端口")[0] - if proxyServerAddress == "" or port == "": - return - RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000001 '/f") - RunWineProgram(f"reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyServer /d '{proxyServerAddress}:{port}' '/f") - -def DisbledHttpProxy(): - RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings' /v ProxyEnable /t REG_DWORD /d 00000000 '/f") - -def GetScreenSize(): - screenInformation = [] - # 使用 xrandr 进行筛选 - for i in subprocess.getoutput("xrandr").split('\n'): - if not " connected " in i: # 检测连接的显示器 - continue - # 获取分辨率基本信息,如 - # DisplayPort-0 connected 1600x900+1280+0 (normal left inverted right x axis y axis) 434mm x 236mm - # 先判断是否为主屏幕 - main = False - if "primary" in i: - main = True - # 进行进一步筛选 - i = i[i.index("connected"):].replace("connected", "").replace("primary", "") - # 进行初步筛选,如 - # 1600x900+1280+0 (normal left inverted right x axis y axis) 434mm x 236mm - i = i[:i.index("(")].replace(" ", "") - # 筛选为 1600x900+0+0 进行最后数值的提取 - screenInformation.append([ - int(i[:i.index("x")]), # 获取宽度 - int(i[i.index("x") + 1 :i.index("+")]), # 获取高度 - int(i[i.index("+") + 1:].split('+')[0]), # 获取显示屏 X 坐标 - int(i[i.index("+") + 1:].split('+')[1]), # 获取显示屏 Y 坐标 - main # 是否为主屏幕 - ]) - return screenInformation # 返回结果 - -def UOSPackageScript(): - threading.Thread(target=os.system, args=[f"python3 '{programPath}/deepin-wine-packager-with-script.py'"]).start() - -def RunVM(): - threading.Thread(target=os.system, args=[f"bash '{programPath}/RunVM.sh'"]).start() - -def CleanProgram(): - OpenTerminal(f"{programPath}/clean-unuse-program.py") - -class UpdateWindow(): - data = {} - update = None - def ShowWindow(): - UpdateWindow.update = QtWidgets.QMainWindow() - updateWidget = QtWidgets.QWidget() - updateWidgetLayout = QtWidgets.QGridLayout() - versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知\n更新内容:") - updateText = QtWidgets.QTextBrowser() - updateText.anchorClicked.connect(OpenUrl) - updateText.setOpenExternalLinks(False) - ok = QtWidgets.QPushButton(transla.transe("U", "更新(更新时会自动关闭 Wine 运行器)")) - ok.clicked.connect(UpdateWindow.Update) - cancel = QtWidgets.QPushButton("取消") - cancel.clicked.connect(UpdateWindow.update.close) - url = "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-update-information/raw/branch/master/update.json" - try: - UpdateWindow.data = json.loads(requests.get(url).text) - versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:") - if UpdateWindow.data["Version"] == version: - updateText.setText("此为最新版本,无需更新") - ok.setDisabled(True) - else: - # 版本号读取(防止出现高版本号提示要“升级”到低版本号的问题) - localVersionList = version.split(".") - webVersionList = UpdateWindow.data['Version'].split(".") - for i in range(len(localVersionList)): - local = int(localVersionList[i]) - web = int(webVersionList[i]) - if web < local: - updateText.setHtml(f"""此为最新版本,无需更新,但似乎您当前使用的程序版本比云端版本还要高。
-出现这个问题可能会有如下几种情况:
-1、使用编译或者内测版本
-2、自己修改了程序版本
-3、作者忘记更新云端上的更新信息了
-如果是第三种情况,请反馈到此:https://gitee.com/gfdgd-xi/deep-wine-runner/issues/I6T3FG
-""") - ok.setDisabled(True) - break - if web > local: - updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n")) - ok.setEnabled(True) - break - - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(updateWidget, "错误", "无法连接服务器!") - updateWidgetLayout.addWidget(versionLabel, 0, 0, 1, 1) - updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3) - updateWidgetLayout.addWidget(ok, 2, 2, 1, 1) - updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1) - updateWidget.setLayout(updateWidgetLayout) - UpdateWindow.update.setCentralWidget(updateWidget) - UpdateWindow.update.setWindowTitle(transla.transe("U", "检查更新")) - UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5)) - UpdateWindow.update.show() - - def Update(): - if os.path.exists("/tmp/spark-deepin-wine-runner/update"): - shutil.rmtree("/tmp/spark-deepin-wine-runner/update") - os.makedirs("/tmp/spark-deepin-wine-runner/update") - try: - print(UpdateWindow.data["Url"]) - write_txt("/tmp/spark-deepin-wine-runner/update.sh", f"""#!/bin/bash -echo 删除多余的安装包 -rm -rfv /tmp/spark-deepin-wine-runner/update/* -echo 关闭“Wine 运行器” -python3 "{programPath}/updatekiller.py" -echo 下载安装包 -wget -P /tmp/spark-deepin-wine-runner/update {UpdateWindow.data["Url"][0]} -echo 安装安装包 -dpkg -i /tmp/spark-deepin-wine-runner/update/* -echo 修复依赖关系 -apt install -f -y -notify-send -i "{iconPath}" "更新完毕!" -zenity --info --text=\"更新完毕!\" --ellipsize -""") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(None, "出现错误,无法继续更新", traceback.format_exc()) - OpenTerminal("pkexec bash /tmp/spark-deepin-wine-runner/update.sh") - -class GetDllFromWindowsISO: - wineBottonPath = get_home() + "/.wine" - isoPath = None - dllList = None - message = None - dllFound = None - dllControl = None - foundButton = None - saveDll = None - setWineBotton = None - browser = None - mount = False - mountButton = None - dllListModel = None - arch = 0 - def ShowWindow(): - #DisableButton(True) - GetDllFromWindowsISO.message = QtWidgets.QMainWindow() - widget = QtWidgets.QWidget() - widgetLayout = QtWidgets.QGridLayout() - if not e1.currentText() == "": - GetDllFromWindowsISO.wineBottonPath = e1.currentText() - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", f"""提示: - 目前本提取功能暂只支持 NT 内核系统的官方安装镜像,不支持读取 ghost 等第三方封装方式的安装镜像 - 以及不要拷贝/替换太多的 dll,否则可能会导致 wine 容器异常,以及不要替换 Wine 的核心 dll - 最后,拷贝/替换 dll 后,建议点击下面“设置 wine 容器”按钮==》函数库 进行设置 -当前选择的 Wine 容器:{GetDllFromWindowsISO.wineBottonPath}""")), 0, 0, 1, 5) - isoLabel = QtWidgets.QLabel(transla.transe("U", "ISO镜像:")) - GetDllFromWindowsISO.isoPath = QtWidgets.QComboBox() - GetDllFromWindowsISO.browser = QtWidgets.QPushButton(transla.transe("U", "浏览")) - isoControl = QtWidgets.QWidget() - isoControlLayout = QtWidgets.QHBoxLayout() - isoControl.setLayout(isoControlLayout) - dllControl = QtWidgets.QWidget() - dllControlLayout = QtWidgets.QHBoxLayout() - dllControl.setLayout(dllControlLayout) - GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton(transla.transe("U", "读取/挂载ISO镜像")) - umountButton = QtWidgets.QPushButton(transla.transe("U", "关闭/卸载ISO镜像")) - GetDllFromWindowsISO.dllFound = QtWidgets.QComboBox() - GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton(transla.transe("U", "查找")) - GetDllFromWindowsISO.dllList = QtWidgets.QListView() - GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton(transla.transe("U", "保存到 wine 容器中")) - GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton(transla.transe("U", "设置 wine 容器")) - isoLabel.setSizePolicy(size) - GetDllFromWindowsISO.isoPath.setEditable(True) - GetDllFromWindowsISO.isoPath.addItems(isoPath) - GetDllFromWindowsISO.isoPath.setEditText("") - GetDllFromWindowsISO.browser.setSizePolicy(size) - GetDllFromWindowsISO.mountButton.setSizePolicy(size) - isoControlLayout.addWidget(GetDllFromWindowsISO.mountButton) - umountButton.setSizePolicy(size) - isoControlLayout.addWidget(umountButton) - GetDllFromWindowsISO.dllFound.setEditable(True) - GetDllFromWindowsISO.dllFound.addItems(isoPathFound) - GetDllFromWindowsISO.dllFound.setEditText("") - GetDllFromWindowsISO.saveDll.setSizePolicy(size) - dllControlLayout.addWidget(GetDllFromWindowsISO.saveDll) - GetDllFromWindowsISO.setWineBotton.setSizePolicy(size) - GetDllFromWindowsISO.DisbledDown(True) - dllControlLayout.addWidget(GetDllFromWindowsISO.setWineBotton) - widgetLayout.addWidget(isoLabel, 1, 0, 1, 1) - widgetLayout.addWidget(GetDllFromWindowsISO.isoPath, 1, 1, 1, 1) - widgetLayout.addWidget(GetDllFromWindowsISO.browser, 1, 2, 1, 1) - widgetLayout.addWidget(isoControl, 2, 1, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "查找DLL\n(为空则代表不查找,\n将显示全部内容):")), 3, 0, 1, 1) - widgetLayout.addWidget(GetDllFromWindowsISO.dllFound, 3, 1, 1, 1) - widgetLayout.addWidget(GetDllFromWindowsISO.foundButton, 3, 2, 1, 1) - widgetLayout.addWidget(GetDllFromWindowsISO.dllList, 4, 1, 1, 1) - widgetLayout.addWidget(dllControl, 5, 1, 1, 1) - widget.setLayout(widgetLayout) - GetDllFromWindowsISO.browser.clicked.connect(GetDllFromWindowsISO.Browser) - GetDllFromWindowsISO.mountButton.clicked.connect(GetDllFromWindowsISO.MountDisk) - umountButton.clicked.connect(GetDllFromWindowsISO.UmountDisk) - GetDllFromWindowsISO.foundButton.clicked.connect(GetDllFromWindowsISO.Found) - GetDllFromWindowsISO.saveDll.clicked.connect(GetDllFromWindowsISO.CopyDll) - GetDllFromWindowsISO.setWineBotton.clicked.connect(lambda: RunWineProgram("winecfg", Disbled=False)) - GetDllFromWindowsISO.message.setCentralWidget(widget) - GetDllFromWindowsISO.dllListModel = QtCore.QStringListModel() - GetDllFromWindowsISO.dllListModel.setStringList([]) - GetDllFromWindowsISO.dllList.setModel(GetDllFromWindowsISO.dllListModel) - GetDllFromWindowsISO.isoPath.currentText() - GetDllFromWindowsISO.message.setWindowTitle(f"Wine 运行器 {version}——从 ISO 提取 DLL") - GetDllFromWindowsISO.message.setWindowIcon(QtGui.QIcon(iconPath)) - GetDllFromWindowsISO.message.show() - - def DisbledUp(state): - GetDllFromWindowsISO.isoPath.setDisabled(state) - GetDllFromWindowsISO.browser.setDisabled(state) - GetDllFromWindowsISO.mountButton.setDisabled(state) - - - def DisbledDown(state): - GetDllFromWindowsISO.dllList.setDisabled(state) - GetDllFromWindowsISO.dllFound.setDisabled(state) - GetDllFromWindowsISO.saveDll.setDisabled(state) - GetDllFromWindowsISO.setWineBotton.setDisabled(state) - GetDllFromWindowsISO.foundButton.setDisabled(state) - - def Browser(): - path = QtWidgets.QFileDialog.getOpenFileName(GetDllFromWindowsISO.message, "选择 ISO 镜像文件", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindISO.json"))["path"], "iso 镜像文件(*.iso);;ISO 镜像文件(*.ISO);;所有文件(*.*)")[0] - if path == None or path == "": - return - GetDllFromWindowsISO.isoPath.setEditText(path) - write_txt(get_home() + "/.config/deepin-wine-runner/FindISO.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件 - - def Found(): - found = GetDllFromWindowsISO.dllFound.currentText() - findList = [] - try: - if found == "": - # 显示所有内容 - # 下面内容需要分类讨论 - if GetDllFromWindowsISO.arch == 0: - for i in os.listdir("/tmp/wine-runner-getdll/i386"): - if i[-3:] == "dl_": - findList.append(i[:-1] + "l") - elif GetDllFromWindowsISO.arch == 32: - for i in os.listdir("/tmp/wine-runner-getdll-wim/Windows/SysWOW64"): - if i[-3:] == "dll": - findList.append(i[:-1] + "l") - elif GetDllFromWindowsISO.arch == 64: - for i in os.listdir("/tmp/wine-runner-getdll-wim/Windows/System32"): - if i[-3:] == "dll": - findList.append(i[:-1] + "l") - GetDllFromWindowsISO.dllListModel.setStringList(findList) - return - if GetDllFromWindowsISO.arch == 0: - for i in os.listdir("/tmp/wine-runner-getdll/i386"): - if found in i[:-1] + "l": - findList.append(i[:-1] + "l") - elif GetDllFromWindowsISO.arch == 32: - for i in os.listdir("/tmp/wine-runner-getdll-wim/Windows/SysWOW64"): - if found in i[:-1] + "l": - findList.append(i[:-1] + "l") - elif GetDllFromWindowsISO.arch == 64: - for i in os.listdir("/tmp/wine-runner-getdll-wim/Windows/System32"): - if found in i[:-1] + "l": - findList.append(i[:-1] + "l") - if len(isoPath) == 0: - if isoPathFound[-1] != found: - isoPathFound.append(found) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/ISOPathFound.json", str(json.dumps(ListToDictionary(isoPathFound)))) # 将历史记录的数组转换为字典并写入 - GetDllFromWindowsISO.dllFound.clear() - GetDllFromWindowsISO.dllFound.addItems(isoPathFound) - GetDllFromWindowsISO.dllListModel.setStringList(findList) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, transla.trans("错误"), traceback.format_exc()) - - - def MountDisk(): - if not os.path.exists(GetDllFromWindowsISO.isoPath.currentText()): - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, transla.trans("错误"), transla.trans("您选择的 ISO 镜像文件不存在")) - return - if os.path.exists("/tmp/wine-runner-getdll"): - try: - os.rmdir("/tmp/wine-runner-getdll") - os.system("rm -rf /tmp/wine-runner-getdll-wim") - except: - # 如果无法删除可能是挂载了文件 - os.system("wimunmount /tmp/wine-runner-getdll-wim") - os.system("pkexec umount /tmp/wine-runner-getdll") - - try: - os.rmdir("/tmp/wine-runner-getdll") - os.rmdir("/tmp/wine-runner-getdll-wim") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", traceback.format_exc()) - return - os.makedirs("/tmp/wine-runner-getdll") - os.system(f"pkexec mount '{GetDllFromWindowsISO.isoPath.currentText()}' /tmp/wine-runner-getdll") - findList = [] - # 判断是新版的 Windows ISO(Windows Vista 及以上版本) - if os.path.exists("/tmp/wine-runner-getdll/sources/install.wim"): - # 如果没有安装 wimtools 的话 - if os.system("which wimmount") != 0: - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", f"镜像内容读取/挂载失败,因为没有安装 wimtools 以至无法读取") - return - # 是新版,挂载 wim - # 需要让用户选择挂载内容 - QtWidgets.QInputDialog.getMultiLineText(GetDllFromWindowsISO.message, "提示", "挂载文件需要用户记住并在下一个对话框输入 Index 以挂载正确的镜像,按下下方任意按钮即可继续", subprocess.getoutput("wiminfo '/tmp/wine-runner-getdll/sources/install.wim'")) - choose = QtWidgets.QInputDialog.getInt(GetDllFromWindowsISO.message, "提示", "请输入 Index") - if not choose[1]: - return - os.makedirs("/tmp/wine-runner-getdll-wim") - os.system(f"wimmount /tmp/wine-runner-getdll/sources/install.wim {choose[0]} /tmp/wine-runner-getdll-wim") - if os.path.exists("/tmp/wine-runner-getdll-wim/Windows/SysWOW64"): - # 如果是 64 位镜像 - if QtWidgets.QInputDialog.getItem(GetDllFromWindowsISO.message, "选择位数", "选择位数(如果没有选择,默认为 64 位)", ["32", "64"], 1, False) == "32": - # 64 位镜像的 32 位是存在 SysWOW64 的 - try: - for i in os.listdir("/tmp/wine-runner-getdll-wim/Windows/SysWOW64"): - if i[-3:] == "dll": - findList.append(i[:-1] + "l") - GetDllFromWindowsISO.dllListModel.setStringList(findList) - GetDllFromWindowsISO.arch = 32 - GetDllFromWindowsISO.DisbledDown(False) - GetDllFromWindowsISO.DisbledUp(True) - GetDllFromWindowsISO.mount = True - if len(isoPath) == 0 or isoPath[-1] != GetDllFromWindowsISO.isoPath.currentText(): - isoPath.append(GetDllFromWindowsISO.isoPath.currentText()) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/ISOPath.json", str(json.dumps(ListToDictionary(isoPath)))) # 将历史记录的数组转换为字典并写入 - GetDllFromWindowsISO.isoPath.clear() - GetDllFromWindowsISO.isoPath.addItems(isoPath) - return - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", f"镜像内容读取/挂载失败,报错如下:\n{traceback.format_exc()}") - return - try: - for i in os.listdir("/tmp/wine-runner-getdll-wim/Windows/System32"): - if i[-3:] == "dll": - findList.append(i[:-1] + "l") - GetDllFromWindowsISO.arch = 64 - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", f"镜像内容读取/挂载失败,报错如下:\n{traceback.format_exc()}") - return - GetDllFromWindowsISO.dllListModel.setStringList(findList) - else: - try: - for i in os.listdir("/tmp/wine-runner-getdll/i386"): - if i[-3:] == "dl_": - findList.append(i[:-1] + "l") - GetDllFromWindowsISO.arch = 0 - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", f"镜像内容读取/挂载失败,报错如下:\n{traceback.format_exc()}") - return - GetDllFromWindowsISO.dllListModel.setStringList(findList) - GetDllFromWindowsISO.DisbledDown(False) - GetDllFromWindowsISO.DisbledUp(True) - GetDllFromWindowsISO.mount = True - if len(isoPath) == 0 or isoPath[-1] != GetDllFromWindowsISO.isoPath.currentText(): - isoPath.append(GetDllFromWindowsISO.isoPath.currentText()) # 将记录写进数组 - write_txt(get_home() + "/.config/deepin-wine-runner/ISOPath.json", str(json.dumps(ListToDictionary(isoPath)))) # 将历史记录的数组转换为字典并写入 - GetDllFromWindowsISO.isoPath.clear() - GetDllFromWindowsISO.isoPath.addItems(isoPath) - #GetDllFromWindowsISO.isoPath['value'] = isoPath - - def UmountDisk(): - os.system("wimunmount /tmp/wine-runner-getdll-wim") - os.system("pkexec umount /tmp/wine-runner-getdll") - try: - shutil.rmtree("/tmp/wine-runner-getdll") - os.system("rm -rf /tmp/wine-runner-getdll-wim") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, transla.transe("U", "错误"), f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}") - return - GetDllFromWindowsISO.DisbledDown(True) - GetDllFromWindowsISO.DisbledUp(False) - GetDllFromWindowsISO.mount = False - QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, transla.transe("U", "提示"), transla.transe("U", "关闭/卸载成功!")) - - def CopyDll(): - choose = GetDllFromWindowsISO.dllList.selectionModel().selectedIndexes()[0].data() - if os.path.exists(f"{GetDllFromWindowsISO.wineBottonPath}/drive_c/windows/system32/{choose}"): - if QtWidgets.QMessageBox.question(GetDllFromWindowsISO.message, "提示", f"DLL {choose} 已经存在,是否覆盖?") == QtWidgets.QMessageBox.No: - return - try: - # 要分类讨论 - if GetDllFromWindowsISO.arch == 0: - shutil.copy(f"/tmp/wine-runner-getdll/i386/{choose[:-1]}_", f"{GetDllFromWindowsISO.wineBottonPath}/drive_c/windows/system32/{choose}") - elif GetDllFromWindowsISO.arch == 32: - shutil.copy(f"/tmp/wine-runner-getdll-wim/Windows/SysWOW64/{choose[:-1]}l", f"{GetDllFromWindowsISO.wineBottonPath}/drive_c/windows/system32/{choose}") - elif GetDllFromWindowsISO.arch == 64: - shutil.copy(f"/tmp/wine-runner-getdll-wim/Windows/System32/{choose[:-1]}l", f"{GetDllFromWindowsISO.wineBottonPath}/drive_c/windows/system32/{choose}") - # 选择原装或优于内建 - if QtWidgets.QInputDialog.getItem(GetDllFromWindowsISO.message, "选择", "选择模式", ["原装先于内建", "原装"], 0, False) == "原装先于内建": - # 原装先于内建 - os.system(f"WINEPREFIX='{GetDllFromWindowsISO.wineBottonPath}' '{wine[o1.currentText()]}' reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(choose)[0]} /d native,builtin /f") - else: - # 原装 - os.system(f"WINEPREFIX='{GetDllFromWindowsISO.wineBottonPath}' '{wine[o1.currentText()]}' reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v {os.path.splitext(choose)[0]} /d native /f") - QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, "提示", "提取成功!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", traceback.format_exc()) - -choose = None -class ProgramRunStatusShow(): - msgWindow = None - def ShowWindow(): - global choose - choose = None - dateVersion = "" - if not os.path.exists(e2.currentText()): - QtWidgets.QMessageBox.information(widget, "提示", "您输入的 exe 不存在") - return - try: - sha = ProgramRunStatusUpload.GetSHA1(e2.currentText()) - lists = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).text) - r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8")) - r.encoding = "utf-8" - title = r.text - except: - choosemsg = QtWidgets.QMessageBox() - choosemsg.setText("""暂时还没有该软件的运行情况信息,请问需要?""") - choosemsg.setWindowTitle("提示") - def Choose(choices): - global choose - choose = choices - choosemsg.addButton("取消", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: Choose(0)) - choosemsg.addButton("提交评分", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: Choose(1)) - choosemsg.addButton("预测评分(不准确)", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: Choose(2)) - choosemsg.exec_() - if choose == None or choose == 0: - return - if choose == 1: - ProgramRunStatusUpload.ShowWindow(sha) - return - if choose == 2: - try: - lists = [0, 0, 0, 0, 0, 0, 0, 0] - info = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL0FJP1NIQTE9").decode("utf-8") + sha).text) - lists[int(info["Fen"])] = 1 - dateVersion = info["Version"] - title = "null" - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", "无法获取预测数值") - return - - - informationList = [ - "0分:无法运行并且也没有报错,自己无法解决", - "1分:无法运行但有报错,自己无法解决", - "2分:可以运行但是效果很差,几乎无法使用", - "3分:可以运行且勉强可以使用", - "4分:可以运行,体验大差不差,还是有点小问题", - "5分:可以运行且完全没有bug和问题,和在 Windows 上一样", - "含有不良内容,不宜安装", - "含有病毒、木马等对计算机有害的软件" - ] - try: - if title.lower() == "null": - title = "未知应用" - except: - title = "未知应用" - maxHead = lists.index(max(lists)) - ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow() - msgWidget = QtWidgets.QWidget() - msgWidgetLayout = QtWidgets.QGridLayout() - starLayout = QtWidgets.QHBoxLayout() - uploadButton = QtWidgets.QPushButton(transla.transe("U", "点此上传运行情况")) - uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(sha, title)) - msgWidgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "综合评价:")), 0, 0) - msgWidgetLayout.addLayout(starLayout, 0, 1) - msgWidgetLayout.addWidget(QtWidgets.QLabel(informationList[maxHead]), 1, 0, 1, 2) - msgWidgetLayout.addWidget(QtWidgets.QLabel("" if dateVersion == "" else f"数据版本:{dateVersion}"), 2, 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"")) - else: - for i in range(maxHead): - starLayout.addWidget(QtWidgets.QLabel(f"")) - head = maxHead - for i in range(head, end): - starLayout.addWidget(QtWidgets.QLabel(f"")) - msgWidget.setLayout(msgWidgetLayout) - ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget) - ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) - ProgramRunStatusShow.msgWindow.setWindowTitle(f"应用“{title}”的运行情况") - 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"") - return - for i in range(ProgramRunStatusUpload.fen.currentIndex()): - ProgramRunStatusUpload.starList[i].setText(f"") - head = ProgramRunStatusUpload.fen.currentIndex() - end = len(ProgramRunStatusUpload.starList) - for i in range(head, end): - ProgramRunStatusUpload.starList[i].setText(f"") - - 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(transla.transe("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"")) - ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) - ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) - ProgramRunStatusUpload.programName.setPlaceholderText(transla.transe("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可")) - ProgramRunStatusUpload.fen.addItems(["0分:无法运行并且也没有报错,自己无法解决", - "1分:无法运行但有报错,自己无法解决", - "2分:可以运行但是效果很差,几乎无法使用", - "3分:可以运行且勉强可以使用", - "4分:可以运行,体验大差不差,还是有点小问题", - "5分:可以运行且完全没有bug和问题,和在 Windows 上一样", - "含有不良内容,不宜安装", - "含有病毒、木马等对计算机有害的软件"]) - ProgramRunStatusUpload.fen.setCurrentIndex(4) - ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) - msgWidgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "程序名:")), 0, 0) - msgWidgetLayout.addWidget(QtWidgets.QLabel(transla.transe("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(transla.transe("U", "上传程序运行情况")) - ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) - ProgramRunStatusUpload.msgWindow.show() - - def Upload(): - if not os.path.exists(e2.currentText()): - QtWidgets.QMessageBox.critical(None, "错误", "exe 文件不存在!") - return - if ProgramRunStatusUpload.programName.text() == "": - QtWidgets.QMessageBox.critical(None, "错误", "程序名称不能为空!") - return - try: - if ProgramRunStatusUpload.sha1Value == "": - ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText()) - QtWidgets.QMessageBox.information(None, transla.transe("U", "提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), { - "SHA1": ProgramRunStatusUpload.sha1Value, - "Name": ProgramRunStatusUpload.programName.text(), - "Fen": ProgramRunStatusUpload.fen.currentIndex(), - "Wine": o1.currentText() - }).text)["Error"]) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(None, transla.transe("U", "错误"), transla.transe("U", "数据上传失败!")) - - def GetSHA1(filePath): - sha1 = hashlib.sha1() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - sha1.update(readByte) - if not readByte: - break - file.close() - return sha1.hexdigest() - -class ProgramSetting(): - wineBottonA = None - wineDebug = None - defultWine = None - defultBotton = None - terminalOpen = None - wineOption = None - #wineBottonDifferent = None - centerWindow = None - message = None - theme = None - monogeckoInstaller = None - autoWine = None - runtimeCache = None - buildByBottleName = None - autoPath = None - qemuUnmountHome = None - chineseLanguage = None - def ShowWindow(): - ProgramSetting.message = QtWidgets.QMainWindow() - widget = QtWidgets.QWidget() - widgetLayout = QtWidgets.QGridLayout() - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "选择 Wine 容器版本:")), 0, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "wine DEBUG 信息输出:")), 1, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "默认 Wine:")), 2, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "默认 Wine 容器:")), 3, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "使用终端打开:")), 4, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "自定义 wine 参数:")), 5, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "程序主题:")), 6, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "Wine 默认 Mono 和 Gecko 安装器:")), 7, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "忽略未安装的 Wine:")), 8, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "下载缓存:")), 9, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "图标生成:")), 10, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "自动根据EXE名称生成路径:")), 11, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "Qemu + Chroot 挂载用户目录:")), 12, 0, 1, 1) - widgetLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "程序翻译:")), 13, 0, 1, 1) - ProgramSetting.wineBottonA = QtWidgets.QComboBox() - ProgramSetting.wineDebug = QtWidgets.QCheckBox(transla.transe("U", "开启 DEBUG 输出")) - ProgramSetting.defultWine = QtWidgets.QComboBox() - ProgramSetting.defultBotton = QtWidgets.QLineEdit() - ProgramSetting.theme = QtWidgets.QComboBox() - ProgramSetting.theme.addItems(QtWidgets.QStyleFactory.keys()) - ProgramSetting.theme.setCurrentText(setting["Theme"]) - save = QtWidgets.QPushButton(transla.transe("U", "保存")) - save.clicked.connect(ProgramSetting.Save) - defultBottonButton = QtWidgets.QPushButton(transla.transe("U", "浏览")) - defultBottonButton.clicked.connect(ProgramSetting.Browser) - themeTry = QtWidgets.QPushButton(transla.transe("U", "测试(重启后变回设置的主题)")) - themeTry.clicked.connect(ProgramSetting.Try) - ProgramSetting.terminalOpen = QtWidgets.QCheckBox(transla.transe("U", "使用终端打开(deepin 终端)")) - ProgramSetting.wineOption = QtWidgets.QLineEdit() - ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox(transla.transe("U", "屏蔽 Wine 默认 Mono 和 Gecko 安装器")) - ProgramSetting.autoWine = QtWidgets.QCheckBox(transla.transe("U", "不显示未检测到的 Wine")) - ProgramSetting.runtimeCache = QtWidgets.QCheckBox(transla.transe("U", "开启下载缓存")) - ProgramSetting.buildByBottleName = QtWidgets.QCheckBox(transla.transe("U", "本软件构建的图标后面添加容器名")) - ProgramSetting.autoPath = QtWidgets.QCheckBox(transla.transe("U", "自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启程序后生效)")) - ProgramSetting.qemuUnmountHome = QtWidgets.QCheckBox(transla.transe("U", "使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效)")) - ProgramSetting.chineseLanguage = QtWidgets.QCheckBox(transla.transe("U", "禁用程序界面翻译")) - ProgramSetting.wineBottonA.addItems(["Auto", "win32", "win64"]) - ProgramSetting.wineBottonA.setCurrentText(setting["Architecture"]) - ProgramSetting.wineDebug.setChecked(setting["Debug"]) - ProgramSetting.defultWine.addItems(wine.keys()) - ProgramSetting.defultWine.setCurrentText(setting["DefultWine"]) - ProgramSetting.defultBotton.setText(setting["DefultBotton"]) - ProgramSetting.terminalOpen.setChecked(setting["TerminalOpen"]) - ProgramSetting.wineOption.setText(setting["WineOption"]) - ProgramSetting.monogeckoInstaller.setChecked(setting["MonoGeckoInstaller"]) - ProgramSetting.autoWine.setChecked(setting["AutoWine"]) - ProgramSetting.runtimeCache.setChecked(setting["RuntimeCache"]) - ProgramSetting.buildByBottleName.setChecked(setting["BuildByBottleName"]) - ProgramSetting.autoPath.setChecked(setting["AutoPath"]) - ProgramSetting.qemuUnmountHome.setChecked(setting["QemuUnMountHome"]) - ProgramSetting.chineseLanguage.setChecked(setting["Chinese"]) - # QemuUnMountHome - widgetLayout.addWidget(ProgramSetting.wineBottonA, 0, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.wineDebug, 1, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.defultWine, 2, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.defultBotton, 3, 1, 1, 1) - widgetLayout.addWidget(defultBottonButton, 3, 2, 1, 1) - widgetLayout.addWidget(ProgramSetting.terminalOpen, 4, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.wineOption, 5, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.theme, 6, 1, 1, 1) - widgetLayout.addWidget(themeTry, 6, 2, 1, 1) - widgetLayout.addWidget(ProgramSetting.monogeckoInstaller, 7, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.autoWine, 8, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.runtimeCache, 9, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.buildByBottleName, 10, 1, 1, 1) - widgetLayout.addWidget(ProgramSetting.autoPath, 11, 1, 1, 2) - widgetLayout.addWidget(ProgramSetting.qemuUnmountHome, 12, 1, 1, 2) - widgetLayout.addWidget(ProgramSetting.chineseLanguage, 13, 1, 1, 2) - widgetLayout.addWidget(save, 14, 2, 1, 1) - widget.setLayout(widgetLayout) - ProgramSetting.message.setCentralWidget(widget) - ProgramSetting.message.setWindowIcon(QtGui.QIcon(iconPath)) - ProgramSetting.message.setWindowTitle(f"设置 wine 运行器 {version}") - ProgramSetting.message.show() - - def Browser(): - path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, transla.transe("U", "选择 Wine 容器"), json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"]) - if path == "" or path == None or path == "()" or path == (): - return - ProgramSetting.defultBotton.setText(path) - - def Try(): - app.setStyle(QtWidgets.QStyleFactory.create(ProgramSetting.theme.currentText())) - - def Save(): - # 写入容器位数设置 - setting["Architecture"] = ProgramSetting.wineBottonA.currentText() - setting["Debug"] = ProgramSetting.wineDebug.isChecked() - setting["DefultWine"] = ProgramSetting.defultWine.currentText() - setting["DefultBotton"] = ProgramSetting.defultBotton.text() - setting["TerminalOpen"] = ProgramSetting.terminalOpen.isChecked() - setting["WineOption"] = ProgramSetting.wineOption.text() - setting["Theme"] = ProgramSetting.theme.currentText() - setting["MonoGeckoInstaller"] = ProgramSetting.monogeckoInstaller.isChecked() - setting["AutoWine"] = ProgramSetting.autoWine.isChecked() - setting["RuntimeCache"] = ProgramSetting.runtimeCache.isChecked() - setting["BuildByBottleName"] = ProgramSetting.buildByBottleName.isChecked() - setting["AutoPath"] = ProgramSetting.autoPath.isChecked() - setting["QemuUnMountHome"] = ProgramSetting.qemuUnmountHome.isChecked() - setting["Chinese"] = ProgramSetting.chineseLanguage.isChecked() - try: - write_txt(get_home() + "/.config/deepin-wine-runner/WineSetting.json", json.dumps(setting)) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(ProgramSetting.message, "错误", traceback.format_exc()) - return - QtWidgets.QMessageBox.information(ProgramSetting.message, "提示", "保存完毕!") - -class ValueCheck(): - def __init__(self): - pass - - def BASE64(self, filePath): - src = "" - with open(filePath, "rb") as f: - base64Byte = base64.b64encode(f.read()) - src += base64Byte.decode("utf-8") - return src - - def SHA1(self, filePath): - sha1 = hashlib.sha1() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - sha1.update(readByte) - if not readByte: - break - file.close() - return sha1.hexdigest() - - def MD5(self, filePath): - md5 = hashlib.md5() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - md5.update(readByte) - if not readByte: - break - file.close() - return md5.hexdigest() - - def SHA256(self, filePath): - value = hashlib.sha256() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - value.update(readByte) - if not readByte: - break - file.close() - return value.hexdigest() - - def SHA384(self, filePath): - value = hashlib.sha384() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - value.update(readByte) - if not readByte: - break - file.close() - return value.hexdigest() - - def SHA224(self, filePath): - value = hashlib.sha224() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - value.update(readByte) - if not readByte: - break - file.close() - return value.hexdigest() - - def SHA512(self, filePath): - value = hashlib.sha512() - file = open(filePath, "rb") - while True: - readByte = file.read(1024 * 1024) - value.update(readByte) - if not readByte: - break - file.close() - return value.hexdigest() - - link = { - "SHA1": SHA1, - "MD5": MD5, - "SHA256": SHA256, - "SHA512": SHA512, - "SHA224": SHA224, - "SHA384": SHA384, - "BASE64": BASE64 - } - - def Get(self, types): - QtWidgets.QMessageBox.information(window, "提示", "在计算过程中,程序可能会出现无响应的问题,请稍后\n请在接下来的打开对话框中选择要计算的文件") - file = QtWidgets.QFileDialog.getOpenFileName(window, "打开")[0] - if file == "": - return - try: - value = self.link[types](self, file) - if QtWidgets.QInputDialog.getText(window, "值", "下面是计算得到的值,是否要复制到剪切板?", QtWidgets.QLineEdit.Normal, value)[1]: - pyperclip.copy(value) - QtWidgets.QMessageBox.information(window, "提示", "复制成功!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - -def ChangePath(): - e1.setCurrentText(f'{setting["DefultBotton"]}/{os.path.splitext(os.path.basename(e2.currentText()))[0]}') - -def UploadLog(): - if QtWidgets.QMessageBox.question(window, "提示", "您确定要上传吗?上传内容将不会公开,将用于加强日志分析功能") == QtWidgets.QMessageBox.Yes: - text = QtWidgets.QInputDialog.getMultiLineText(window, "输入内容", "输入描述信息") - try: - returnList = requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUwL2xvZw==").decode("utf-8"), { - "Log": returnText.toPlainText(), - "Wine": wine[o1.currentText()], - "Tips": text - }).json() - if returnList["ExitCode"] == 0: - QtWidgets.QMessageBox.information(window, "提示", "上传成功!") - else: - print(returnList) - QtWidgets.QMessageBox.critical(window, "错误", "上传失败!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", "上传失败!") - - -def SaveLog(): - path = QtWidgets.QFileDialog.getSaveFileName(window, "保存日志", get_home(), "txt文件(*.txt);;html 文件(*.html);;所有文件(*.*))") - if not path[1]: - return - print(path) - try: - with open(path[0], "w") as file: - if path[1] == "html 文件(*.html)": - file.write(returnText.toHtml()) - else: - file.write(returnText.toPlainText()) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - -def GetNewInformation(): - try: - text = requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/information/index.html").text - except: - traceback.print_exc() - text = f"""无法连接到服务器
-你可以尝试:
-1. 判断是否能正常连接网络
-2. 作者的服务出问题了?(到这反馈:https://gitee.com/gfdgd-xi/deep-wine-runner/issues)
-3. 玩个游戏解闷下
""" - global webInformation - if bad: - webInformation = QtWidgets.QTextBrowser() - else: - webInformation = QtWebEngineWidgets.QWebEngineView() - webInformation.setHtml(text) - webInformation.setWindowTitle("获取程序公告") - webInformation.setWindowIcon(QtGui.QIcon(iconPath)) - webInformation.resize(int(webInformation.frameGeometry().width() * 1.3), int(webInformation.frameGeometry().height() * 1.1)) - webInformation.show() - -def getFileFolderSize(fileOrFolderPath): - """get size for file or folder""" - totalSize = 0 - try: - if not os.path.exists(fileOrFolderPath): - return totalSize - if os.path.isfile(fileOrFolderPath): - totalSize = os.path.getsize(fileOrFolderPath) # 5041481 - return totalSize - if os.path.isdir(fileOrFolderPath): - with os.scandir(fileOrFolderPath) as dirEntryList: - for curSubEntry in dirEntryList: - curSubEntryFullPath = os.path.join(fileOrFolderPath, curSubEntry.name) - if curSubEntry.is_dir(): - curSubFolderSize = getFileFolderSize(curSubEntryFullPath) # 5800007 - totalSize += curSubFolderSize - elif curSubEntry.is_file(): - curSubFileSize = os.path.getsize(curSubEntryFullPath) # 1891 - totalSize += curSubFileSize - return totalSize - except: - return totalSize - -# 获取当前语言 -def get_now_lang()->"获取当前语言": - return os.getenv('LANG') - -# 又需要修复多线程导致的控件问题 -def AddDockerMenu(): - global dockers - global openFileManager - global openTerminal - dockers = menu.addMenu("该 Docker 基础管理") - openFileManager = QtWidgets.QAction("打开默认文件管理器") - openTerminal = QtWidgets.QAction("打开默认终端") - openFileManager.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"xdg-open '{get_home()}'"]).start()) - openTerminal.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"x-terminal-emulator"]).start()) - dockers.addAction(openFileManager) - dockers.addAction(openTerminal) -newPackage = False -class GetVersionThread(QtCore.QThread): - signal = QtCore.pyqtSignal(str) - def __init__(self) -> None: - super().__init__() - - def run(self): - global about - global window - global newPackage - global programVersionType - # 目前分为几个版本(在 control 文件区分): - # 星火版本:~spark - # 商店版本:~uos - # 编译版本:无版本号 - # Gitee/Github……:正常版本 - # Docker 版本 - programVersionTypeLnk = { - "spark": "普通版本", - "uos": "普通版本" - } - # 直接判断是不是 Docker 版本 - if os.path.exists(f"{programPath}/docker.txt") or os.path.exists("/.dockerenv"): - programVersionType = "普通版本" - self.signal.emit("") - else: - programVersionType = "从源码运行的版本" - try: - if not os.path.exists("/var/lib/dpkg/status"): - print("无 dpkg,结束") - file = open("/var/lib/dpkg/status", "r") - fileName = file.read().splitlines() - package = False - for i in range(0, len(fileName)): - if fileName[i] == "Package: spark-deepin-wine-runner-docker": - programVersionType = "普通版本" - #AddDockerMenu() - self.signal.emit("") - break - if fileName[i] == "Package: spark-deepin-wine-runner-52": - programVersionType = "普通版本" - newPackage = False - break - if fileName[i] == "Package: spark-deepin-wine-runner": - package = True - newPackage = True - continue - if fileName[i] == "Package: wine-runner-linux": - package = True - continue - if not package: - continue - if fileName[i].replace(" ", "").replace("\n", "") == "": - # 空行,不再考虑 - break - # 搜索版本号 - try: - if fileName[i][:fileName[i].index(":")] == "Version": - version = fileName[i][fileName[i].index(":") + 1:].strip() - print(f"版本号为:{version}") - if not "-" in version: - programVersionType = "普通版本" - break - programVersionType = version[version.index("-") + 1:] - print(programVersionType) - if "-" in programVersionType: - # 考虑到如 2.1.0-2-spark 的情况 - programVersionType = programVersionType[programVersionType.index("-") + 1:] - try: - programVersionType = programVersionTypeLnk[programVersionType] - except: - programVersionType = "普通版本" - break - except: - traceback.print_exc() - continue - except: - print("无法读取,当没有处理") - print(programVersionType) - about = about.replace("@VersionForType@", programVersionType) - # 获取程序体积 - about = about.replace("@programSize@", str(int(getFileFolderSize(programPath) / 1024 / 1024))) - -def GetVersion(): - global runVersion - runVersion = GetVersionThread() - runVersion.signal.connect(AddDockerMenu) - runVersion.start() - -def UnPackage(): - QtWidgets.QMessageBox.information(window, "提示", "请在下面两个对话框中选择 deb 包所在路径和容器解压到的路径") - debPath = QtWidgets.QFileDialog.getOpenFileName(window, get_home(), "deb 文件(*.deb);;所有文件(*.*)") - if not debPath[1]: - return - path = QtWidgets.QFileDialog.getExistingDirectory(window, get_home()) - print(path) - if not path: - return - tempDebDir = f"/tmp/wine-runner-unpack-deb-{random.randint(0, 1000)}" - if os.system(f"dpkg -x '{debPath[0]}' '{tempDebDir}'"): - QtWidgets.QMessageBox.critical(window, "错误", "解压失败!") - return - zippath = FindFile(tempDebDir, "files.7z") - if zippath == None: - QtWidgets.QMessageBox.critical(window, "错误", "解压失败!") - return - print(path) - # 解压文件 - os.system(f"mkdir -p '{path}'") - os.system(f"7z x -y '{zippath}' -o'{path}'") - os.system(f"rm -rfv '{tempDebDir}'") - QtWidgets.QMessageBox.information(window, "提示", "解压完成!") - -def FindFile(file, name): - for i in os.listdir(file): - path = f"{file}/{i}" - if os.path.isdir(path): - returnPath = FindFile(path, name) - if returnPath != None: - return returnPath.replace("//", "/") - if os.path.isfile(path): - if i == name: - return path - return None - -def TransLog(): - oldText = returnText.toPlainText() - lineNumber = 0 - transText = "" - chooseText = "" - for i in oldText.splitlines(): - lineNumber += 1 - chooseText += f"{i}\n" - if lineNumber >= 50: - lineNumber = 0 - try: - data = { 'doctype': 'json', 'type': 'auto','i': chooseText.replace("\n\n", "\n")} - jsonReturn = requests.post("http://fanyi.youdao.com/translate", data=data).json()["translateResult"] - for i in jsonReturn: - print(i) - transText += f'{i[0]["tgt"]}\n' - chooseText = "" - except: - transText += f"{chooseText}\n" - chooseText = "" - if lineNumber != 0: - lineNumber = 0 - try: - data = { 'doctype': 'json', 'type': 'auto','i': chooseText.replace("\n\n", "\n")} - jsonReturn = requests.post("http://fanyi.youdao.com/translate", data=data).json()["translateResult"] - for i in jsonReturn: - print(i[0]) - transText += f'{i[0]["tgt"]}\n' - chooseText = "" - except: - transText += f"{chooseText}\n" - chooseText = "" - #return transText - returnText.setText(transText.replace("\n\n", "\n")) - -########################### -# 加载配置 -########################### -defultProgramList = { - "Architecture": "Auto", - "Debug": True, - "DefultWine": "deepin-wine6 stable", - "DefultBotton" : get_home() + "/.wine", - "TerminalOpen": False, - "WineOption": "", - "WineBottonDifferent": False, - "CenterWindow": False, - "Theme": "", - "MonoGeckoInstaller": False, - "AutoWine": True, - "RuntimeCache": True, - "MustRead": False, - "BuildByBottleName": False, - "AutoPath": False, - "QemuUnMountHome": False, - "Chinese": True -} -if not os.path.exists(get_home() + "/.config/"): # 如果没有配置文件夹 - os.mkdir(get_home() + "/.config/") # 创建配置文件夹 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner"): # 如果没有配置文件夹 - os.mkdir(get_home() + "/.config/deepin-wine-runner") # 创建配置文件夹 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/ShellHistory.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", json.dumps({})) # 创建配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", json.dumps({})) # 创建配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", json.dumps({})) # 创建配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/ISOPath.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/ISOPath.json", json.dumps({})) # 写入(创建)一个配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/ISOPathFound.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/ISOPathFound.json", json.dumps({})) # 写入(创建)一个配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindExe.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindISO.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/FindISO.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineBotton.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/WineBotton.json", json.dumps({"path": "~/.deepinwine"})) # 写入(创建)一个配置文件 -if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineSetting.json"): # 如果没有配置文件 - write_txt(get_home() + "/.config/deepin-wine-runner/WineSetting.json", json.dumps(defultProgramList)) # 写入(创建)一个配置文件 - -########################### -# 设置变量 -########################### -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -# 如果要添加其他 wine,请使用安装更多 Wine 功能 -############# -# 检测 Wine -############# -try: - wine = { - "基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ", - "基于 UOS exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ", - "使用 Flatpak 安装的 Wine": "flatpak run org.winehq.Wine", - "deepin-wine6 stable": "deepin-wine6-stable", - "deepin-wine5 stable": "deepin-wine5-stable", - "spark-wine7-devel": "spark-wine7-devel", - "spark-wine8": "spark-wine8", - "deepin-wine": "deepin-wine", - "deepin-wine5": "deepin-wine5", - "wine": "wine", - "wine64": "wine64", - "ukylin-wine": "ukylin-wine", - "mono(这不是 wine,但可以实现初步调用运行 .net 应用)": "mono", - "基于 linglong 的 deepin-wine6-stable(不推荐)": f"ll-cli run '' --exec '/bin/deepin-wine6-stable'" - } - untipsWine = ["使用 Flatpak 安装的 Wine", "基于 exagear 的 deepin-wine6-stable", "基于 UOS box86 的 deepin-wine6-stable", "基于 UOS exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable(不推荐)"] - canUseWine = [] - if os.path.exists("/opt/deepin-box86/box86") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"): - canUseWine.append("基于 UOS box86 的 deepin-wine6-stable") - if os.path.exists("/opt/exagear/bin/ubt_x64a64_al") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"): - canUseWine.append("基于 UOS exagear 的 deepin-wine6-stable") - if not os.system("which exagear") and os.path.exists("/opt/deepin-wine6-stable/bin/wine"): - canUseWine.append("基于 exagear 的 deepin-wine6-stable") - for i in wine.keys(): - if not os.system(f"which '{wine[i]}'"): - canUseWine.append(i) - if not os.system("which flatpak") and os.path.exists("/var/lib/flatpak/app/org.winehq.Wine"): - canUseWine.append("使用 Flatpak 安装的 Wine") - - if os.path.exists("/persistent/linglong/layers/"): # 判断是否使用 linglong - for i in os.listdir("/persistent/linglong/layers/"): - try: - dire = os.listdir(f"/persistent/linglong/layers/{i}")[-1] - arch = os.listdir(f"/persistent/linglong/layers/{i}/{dire}")[-1] - if os.path.exists(f"/persistent/linglong/layers/{i}/{dire}/{arch}/runtime/bin/deepin-wine6-stable"): - wine["基于 linglong 的 deepin-wine6-stable(不推荐)"] = f"ll-cli run {i} --exec '/bin/deepin-wine6-stable'" - canUseWine.append("基于 linglong 的 deepin-wine6-stable(不推荐)") - break - except: - pass - # 读取自定义安装的 Wine(需要解包的才能使用) - qemuBottleList = [] - qemuPath = f"{get_home()}/.deepin-wine-runner-ubuntu-images" - if not os.system("which qemu-i386-static"): - if os.path.exists(qemuPath): - for g in os.listdir(qemuPath): - archPath = f"{qemuPath}/{g}" - arch = g - if os.path.isdir(archPath): - for d in os.listdir(archPath): - bottlePath = f"{archPath}/{d}" - if os.path.isdir(bottlePath): - qemuBottleList.append([ - arch, - d, - bottlePath - ]) - shellHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json")).values()) - findExeHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json")).values()) - wineBottonHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json")).values()) - isoPath = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/ISOPath.json")).values()) - isoPathFound = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/ISOPathFound.json")).values()) - setting = json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineSetting.json")) - change = False - if not os.path.exists(get_home() + "/.config/deepin-wine-runner/mono-lock"): - os.mknod(f"{get_home()}/.config/deepin-wine-runner/mono-lock") - setting["MonoGeckoInstaller"] = False - change = True - for i in defultProgramList.keys(): - if not i in setting: - change = True - setting[i] = defultProgramList[i] - if change: - write_txt(get_home() + "/.config/deepin-wine-runner/WineSetting.json", json.dumps(setting)) - try: - # Read /opt Wine - for i in os.listdir("/opt"): - pass - # 不再从列表读取,直接读目录 - for i in os.listdir(f"{programPath}/wine/"): - #for i in json.loads(readtxt(f"{programPath}/wine/winelist.json")): - if os.path.exists(f"{programPath}/wine/{i}") and os.path.isdir(f"{programPath}/wine/{i}"): - name = "" - qemuInstall = False - nameValue = [["", ""]] - try: - if os.path.exists("/opt/deepin-box86/box86"): - nameValue.append( - [ - "基于 UOS box86 的 ", - f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 " - ] - ) - if os.system("which box86") == 0: - nameValue.append( - [ - "基于 box86 的 ", - f"box86 " - ] - ) - if os.system("which box64") == 0: - nameValue.append( - [ - "基于 box64 的 ", - f"box64 " - ] - ) - if os.system("which exagear") == 0: - nameValue.append( - [ - "基于 exagear 的 ", - f"exagear " - ] - ) - if os.path.exists("/opt/exagear/bin/ubt_x64a64_al"): - nameValue.append( - [ - "基于 UOS exagear 的 ", - f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- " - ] - ) - for g in qemuBottleList: - nameValue.append([ - f"使用qemu-{g[0]}-static 调用容器{g[1]}运行 ", - f"python3 '{programPath}/QemuRun.py' '{g[0]}/{g[1]}' {int(setting['QemuUnMountHome'])} " - ]) - except: - traceback.print_exc() - for k in nameValue: - print(k) - if "qemu" in k[0]: - chrootProgramPath = "/opt/apps/deepin-wine-runner" - else: - chrootProgramPath = programPath - if os.path.exists(f"{programPath}/wine/{i}/bin/wine"): - wine[f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine"] = f"{k[1]}{chrootProgramPath}/wine/{i}/bin/wine" - canUseWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine") - untipsWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine") - if os.path.exists(f"{programPath}/wine/{i}/bin/wine64"): - wine[f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine64"] = f"{k[1]}{chrootProgramPath}/wine/{i}/bin/wine64" - canUseWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine64") - untipsWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine64") - if os.path.exists(f"{programPath}/wine/{i}/bin/wine-i386"): - wine[f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-i386"] = f"{k[1]}{chrootProgramPath}/wine/{i}/bin/wine-i386" - canUseWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-i386") - untipsWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-i386") - if os.path.exists(f"{programPath}/wine/{i}/bin/wine-aarch64"): - wine[f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-aarch64"] = f"{k[1]}{chrootProgramPath}/wine/{i}/bin/wine-aarch64" - canUseWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-aarch64") - untipsWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-aarch64") - if os.path.exists(f"{programPath}/wine/{i}/bin/wine-x86_64"): - wine[f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64"] = f"{k[1]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64" - canUseWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64") - untipsWine.append(f"{k[0]}{chrootProgramPath}/wine/{i}/bin/wine-x86_64") - except: - pass - try: - for i in os.listdir(f"{get_home()}/.deepinwine/"): - if os.path.exists(f"{get_home()}/.deepinwine/{i}/bin/wine"): - wine[f"{get_home()}/.deepinwine/{i}/bin/wine"] = f"{get_home()}/.deepinwine/{i}/bin/wine" - canUseWine.append(f"{get_home()}/.deepinwine/{i}/bin/wine") - if os.path.exists(f"{get_home()}/.deepinwine/{i}/bin/wine64"): - wine[f"{get_home()}/.deepinwine/{i}/bin/wine64"] = f"{get_home()}/.deepinwine/{i}/bin/wine64" - canUseWine.append(f"{get_home()}/.deepinwine/{i}/bin/wine64") - except: - pass -except: - traceback.print_exc() - app = QtWidgets.QApplication(sys.argv) - QtWidgets.QMessageBox.critical(None, "错误", f"无法读取配置,无法继续\n{traceback.format_exc()}") - sys.exit(1) - -# transla.transe - -programVersionType = "" -print(wine) -########################### -# 程序信息 -########################### -# 语言载入 -if not "zh_CN".lower() in get_now_lang().lower() and not setting["Chinese"]: - transla = Trans("en_US", f"{programPath}/trans/deepin-wine-runner.json") -else: - transla = Trans("zh_CN") -iconPath = "{}/deepin-wine-runner.svg".format(programPath) -#iconPath = "{}/Icon/Program/wine运行器.png".format(programPath) -programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner\nhttps://github.com/gfdgd-xi/deep-wine-runner\nhttps://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner\nhttps://gfdgd-xi.github.io" -information = json.loads(readtxt(f"{programPath}/information.json")) -version = information["Version"] -goodRunSystem = transla.transe("U", "常见 Linux 发行版") -thankText = "" -tips = transla.transe("U", '''N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
''')
-updateThingsString = transla.transe("U", '''※1、Windows 虚拟机安装工具支持非 X86 架构;
-※2、应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine 包;
-※3、Windows 虚拟机安装工具支持调用 Qemu;
-※4、新增 Qemu User 运行 Wine 的帮助入口;
-※5、修复 Windows 虚拟机的自动配置镜像缺少 aria2c.exe 的故障;
-※6、支持在更新程序版本时自动关闭程序进程;
-7、运行器和打包器支持调用 spark-wine8;
-8、修改作者信息;
-9、新增安装包构建时间;
-10、优化 Wine 运行器更新策略。
-''')
-for i in information["Thank"]:
- thankText += f"{i}\n"
-updateTime = "2023年04月29日"
-aboutProgram = transla.transe("U", """Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序,内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。
-它同时还内置了基于VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作。
-- -一个图形化了如下命令的程序(最简单格式) --env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
-让你可以简易方便的使用 wine""") -about = f''' -关于
-{aboutProgram} - -版本:{version} -适用平台:{goodRunSystem}(@VersionForType@) -安装包构建时间:{information['Time']} -Qt 版本:{QtCore.qVersion()} -程序官网:{programUrl} -当前程序占用体积:@programSize@MB
本程序依照 GPLV3 协议开源
-{thankText}-
{updateThingsString} -更新时间:{updateTime}-
{tips} --
星火应用商店:https://spark-app.store/ -Deepin 官网:https://www.deepin.org -Deepin 论坛:https://bbs.deepin.org -gfdgd xi:https://gfdgd-xi.github.io -
-©2020~{time.strftime("%Y")} By gfdgd xi
''' -title = "Wine 运行器 {}".format(version) -#©2020~{time.strftime("%Y")} By gfdgd xi
''' -updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y")) -try: - threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9vcGVuL0luc3RhbGwucGhw").decode("utf-8")) + "?Version=" + version]).start() -except: - pass -iconListUnBuild = json.loads(readtxt(f"{programPath}/IconList.json"))[0] -iconList = json.loads(readtxt(f"{programPath}/IconList.json"))[1] -for i in iconListUnBuild: - iconList.append(i) -print(iconList) - -# Qemu Lock -try: - if os.path.exists("/tmp/deepin-wine-runner-lock.txt"): - print("lock") - with open(f"/tmp/deepin-wine-runner-lock.txt", "r") as file: - setting["QemuUnMountHome"] = bool(int(file.read())) - else: - print("unlock") - with open(f"/tmp/deepin-wine-runner-lock.txt", "w") as file: - # = bool(int(file.read())) - file.write(str(int(setting["QemuUnMountHome"]))) -except: - traceback.print_exc() - -########################### -# 窗口创建 -########################### -# 读取主题 -# Qt 窗口 -app = QtWidgets.QApplication(sys.argv) -window = QtWidgets.QMainWindow() -window.setWindowTitle(title) -widget = QtWidgets.QWidget() -window.setCentralWidget(widget) -mainLayout = QtWidgets.QGridLayout() -# 权重 -size = QtWidgets.QSizePolicy() -size.setHorizontalPolicy(0) -widgetSize = QtWidgets.QSizePolicy() -#size.setHorizontalPolicy(0) -widgetSize.setVerticalPolicy(0) -# -leftUp = QtWidgets.QWidget() -mainLayout.addWidget(leftUp, 0, 0, 1, 1) -leftUpLayout = QtWidgets.QGridLayout() -leftUp.setLayout(leftUpLayout) -fastLabel = QtWidgets.QLabel(transla.transe("U", "快速启动")) -fastLabel.setStyleSheet("font: 30px;") -leftUpLayout.addWidget(fastLabel, 0, 0, 1, 2) -leftUpLayout.addWidget(QtWidgets.QLabel("
"), 1, 0, 1, 2) -leftUpLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "请选择容器路径:")), 2, 0, 1, 1) -e1 = QtWidgets.QComboBox() -e1.setEditable(True) -leftUpLayout.addWidget(e1, 3, 0, 1, 1) -button1 = QtWidgets.QPushButton("浏览") -button1.clicked.connect(liulanbutton) -leftUpLayout.addWidget(button1, 3, 1, 1, 1) -leftUpLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "请选择要执行的程序(EXE、MSI或者命令):")), 4, 0, 1, 1) -e2 = QtWidgets.QComboBox() -if setting["AutoPath"]: - e2.editTextChanged.connect(ChangePath) -e2.setEditable(True) -leftUpLayout.addWidget(e2, 5, 0, 1, 1) -button2 = QtWidgets.QPushButton(transla.transe("U", "浏览")) -button2.clicked.connect(liulanexebutton) -leftUpLayout.addWidget(button2, 5, 1, 1, 1) -leftUpLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "请选择WINE版本:")), 6, 0, 1, 1) -o1 = QtWidgets.QComboBox() -leftUpLayout.addWidget(o1, 7, 0, 1, 1) -# 设置空间权重 -button1.setSizePolicy(size) -button2.setSizePolicy(size) - - -leftDown = QtWidgets.QWidget() -mainLayout.addWidget(leftDown, 1, 0, 1, 1) -leftDownLayout = QtWidgets.QVBoxLayout() -leftDown.setLayout(leftDownLayout) -highLabel = QtWidgets.QLabel(transla.transe("U", "高级功能")) -highLabel.setStyleSheet("font: 30px;") -leftDownLayout.addWidget(highLabel) -leftDownLayout.addWidget(QtWidgets.QLabel("
")) -leftDownLayout.addWidget(QtWidgets.QLabel(transla.transe("U", "创建快捷方式(Desktop文件):"))) -createDesktopLink = QtWidgets.QHBoxLayout() -label_r_2 = QtWidgets.QLabel(transla.transe("U", "名称:")) -createDesktopLink.addWidget(label_r_2) -combobox1 = QtWidgets.QComboBox() -combobox1.setEditable(True) -createDesktopLink.addWidget(combobox1) -button5 = QtWidgets.QPushButton(transla.transe("U", "创建到桌面")) -button5.clicked.connect(make_desktop_on_desktop) -createDesktopLink.addWidget(button5) -saveDesktopFileOnLauncher = QtWidgets.QPushButton(transla.transe("U", "创建到开始菜单")) -saveDesktopFileOnLauncher.clicked.connect(make_desktop_on_launcher) -createDesktopLink.addWidget(saveDesktopFileOnLauncher) -leftDownLayout.addLayout(createDesktopLink) -programManager = QtWidgets.QGridLayout() -leftDownLayout.addLayout(programManager) -programManager.addWidget(QtWidgets.QLabel(transla.transe("U", "程序管理:")), 0, 0, 1, 1) -getProgramIcon = QtWidgets.QPushButton(transla.transe("U", "提取图标")) -getProgramIcon.clicked.connect(lambda: RunWineProgram(f"{programPath}/BeCyIconGrabber.exe' '{e2.currentText()}" if e2.currentText()[:2].upper() == "C:" else f"{programPath}/BeCyIconGrabber.exe' 'z:/{e2.currentText()}")) -programManager.addWidget(getProgramIcon, 1, 0, 1, 1) -programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 1, 1, 1) -trasButton = QtWidgets.QPushButton(transla.transe("U", "窗口透明工具")) -trasButton.clicked.connect(lambda: RunWineProgram(f"{programPath}/窗体透明度设置工具.exe")) -programManager.addWidget(trasButton, 1, 2, 1, 1) -uninstallProgram = QtWidgets.QPushButton(transla.transe("U", "卸载程序")) -uninstallProgram.clicked.connect(lambda: RunWineProgram(f"{programPath}/geek.exe")) -programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 3, 1, 1) -programManager.addWidget(uninstallProgram, 1, 4, 1, 1) -miniAppStore = QtWidgets.QPushButton(transla.transe("U", "微型应用商店")) -miniAppStore.clicked.connect(lambda: threading.Thread(target=MiniAppStore).start()) -programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 5, 1, 1) -programManager.addWidget(miniAppStore, 1, 6, 1, 1) -programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 7, 1, 1) -getProgramStatus = QtWidgets.QPushButton(transla.transe("U", "获取该程序运行情况")) -getProgramStatus.clicked.connect(ProgramRunStatusShow.ShowWindow) -programManager.addWidget(getProgramStatus, 1, 8, 1, 1) -getLoseDll = QtWidgets.QPushButton(transla.transe("U", "检测静态下程序缺少DLL")) -getLoseDll.clicked.connect(GetLoseDll) -programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 9, 1, 1) -programManager.addWidget(getLoseDll, 1, 10, 1, 1) -programManager.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum), 1, 11, 1, 1) -programManager.addWidget(QtWidgets.QLabel(transla.transe("U", "WINE配置:")), 2, 0, 1, 1) -wineConfig = QtWidgets.QPushButton(transla.transe("U", "配置容器")) -wineConfig.clicked.connect(lambda: RunWineProgram("winecfg")) -programManager.addWidget(wineConfig, 3, 0, 1, 1) -fontAppStore = QtWidgets.QPushButton(transla.transe("U", "字体商店")) -fontAppStore.clicked.connect(FontAppStore) -programManager.addWidget(fontAppStore, 3, 2, 1, 1) -button_r_6 = QtWidgets.QPushButton(transla.transe("U", "RegShot")) -button_r_6.clicked.connect(lambda: RunWineProgram(f"{programPath}/RegShot/regshot.exe")) -programManager.addWidget(button_r_6, 3, 4, 1, 1) -sparkWineSetting = QtWidgets.QPushButton(transla.transe("U", "星火wine配置")) -sparkWineSetting.clicked.connect(lambda: threading.Thread(target=os.system, args=["/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"]).start()) -programManager.addWidget(sparkWineSetting, 3, 6, 1, 1) -wineAutoConfig = QtWidgets.QPushButton(transla.transe("U", "自动/手动配置 Wine 容器")) -wineAutoConfig.clicked.connect(WineBottonAutoConfig) -programManager.addWidget(wineAutoConfig, 3, 8, 1, 1) -# 权重 -button5.setSizePolicy(size) -saveDesktopFileOnLauncher.setSizePolicy(size) -label_r_2.setSizePolicy(size) -getProgramIcon.setSizePolicy(size) -#trasButton.setSizePolicy(size) -button_r_6.setSizePolicy(size) -wineConfig.setSizePolicy(size) - -returnText = QtWidgets.QTextBrowser() -returnText.setStyleSheet(""" -background-color: black; -color: white; -""") -returnText.setText(transla.transe("U", "在此可以看到wine安装应用时的终端输出内容")) -mainLayout.setRowStretch(0, 2) -mainLayout.setRowStretch(1, 1) -mainLayout.setColumnStretch(0, 2) -mainLayout.setColumnStretch(1, 1) -mainLayout.addWidget(returnText, 0, 1, 2, 1) - -# 版权 -copy = QtWidgets.QLabel(f"""\n程序版本:{version},提示:Wine 无法保证可以运行所有的 Windows 程序,如果想要运行更多 Windows 程序,可以考虑虚拟机和双系统
-©2020~{time.strftime("%Y")} gfdgd xi""") -mainLayout.addWidget(copy, 2, 0, 1, 1) - -# 程序运行 -programRun = QtWidgets.QWidget() -programRunLayout = QtWidgets.QHBoxLayout() -programRun.setLayout(programRunLayout) -programRunLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) -button3 = QtWidgets.QPushButton(transla.transe("U", "运行程序")) -button3.clicked.connect(runexebutton) -programRunLayout.addWidget(button3) -killProgram = QtWidgets.QPushButton(transla.transe("U", "终止程序")) -killProgram.clicked.connect(KillProgram) -programRunLayout.addWidget(killProgram) -killBottonProgram = QtWidgets.QPushButton(transla.transe("U", "终止指定容器的程序")) -killBottonProgram.clicked.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/kill.sh' '{os.path.basename(e1.currentText())}'"]).start()) -programRunLayout.addWidget(killBottonProgram) -mainLayout.addWidget(programRun, 2, 1, 1, 1) - -# 菜单栏 -menu = window.menuBar() -programmenu = menu.addMenu(transla.transe("U", "程序(&P)")) -p1 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "安装 wine(&I)")) -installWineOnDeepin23 = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23P.png"), transla.transe("U", "安装 wine(只限Deepin23 Preview)")) -installWineOnDeepin23Alpha = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine23A.png"), transla.transe("U", "安装 wine(只限Deepin23 Alpha)")) -installWineHQ = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/wine.png"), transla.transe("U", "安装 WineHQ")) -installMoreWine = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/more-wine.png"), transla.transe("U", "安装更多 Wine")) -downloadChrootBottle = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transla.transe("U", "下载 Chroot 容器")) -installBox86 = QtWidgets.QAction(QtGui.QIcon.fromTheme("box"), transla.transe("U", "安装 Box86")) -p2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("settings"), transla.transe("U", "设置程序(&S)")) -enabledAll = QtWidgets.QAction(transla.transe("U", "强制启用所有被禁用的组件(不推荐)")) -p3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transla.transe("U", "清空软件历史记录(&C)")) -cleanCache = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transla.transe("U", "清空软件缓存")) -cleanProgramUnuse = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(47), transla.transe("U", "删除程序组件")) -p4 = QtWidgets.QAction(QtGui.QIcon.fromTheme("exit"), transla.transe("U", "退出程序(&E)")) -programmenu.addAction(p1) -programmenu.addAction(installWineOnDeepin23) -programmenu.addAction(installWineOnDeepin23Alpha) -programmenu.addAction(installWineHQ) -programmenu.addAction(installMoreWine) -programmenu.addAction(downloadChrootBottle) -programmenu.addAction(installBox86) -programmenu.addSeparator() -programmenu.addAction(p2) -programmenu.addAction(enabledAll) -programmenu.addSeparator() -programmenu.addAction(p3) -programmenu.addAction(cleanCache) -programmenu.addAction(cleanProgramUnuse) -programmenu.addSeparator() -programmenu.addAction(p4) -p1.triggered.connect(InstallWine) -installWineOnDeepin23.triggered.connect(InstallWineOnDeepin23) -installWineOnDeepin23Alpha.triggered.connect(InstallWineOnDeepin23Alpha) -installWineHQ.triggered.connect(InstallWineHQ) -installMoreWine.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/wine/installwine'"]).start()) -downloadChrootBottle.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/QemuDownload.py'"]).start()) -p2.triggered.connect(ProgramSetting.ShowWindow) -enabledAll.triggered.connect(lambda: DisableButton(False)) -installBox86.triggered.connect(lambda: OpenTerminal(f"pkexec bash '{programPath}/InstallBox86.sh'")) -p3.triggered.connect(CleanProgramHistory) -cleanCache.triggered.connect(CleanProgramCache) -cleanProgramUnuse.triggered.connect(CleanProgram) -p4.triggered.connect(window.close) - -wineOption = menu.addMenu(transla.transe("U", "Wine(&W)")) -w1 = QtWidgets.QAction(transla.transe("U", "打开 Wine 容器目录")) -w2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transla.transe("U", "安装常见字体")) -w3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("font"), transla.transe("U", "安装自定义字体")) -w4 = QtWidgets.QAction(transla.transe("U", "删除选择的 Wine 容器")) -cleanBottonUOS = QtWidgets.QAction(transla.transe("U", "清理 Wine 容器(基于 Wine 适配活动脚本)")) -wineKeyboardLnk = QtWidgets.QAction(transla.transe("U", "Wine 快捷键映射")) -w5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transla.transe("U", "打包 wine 应用")) -w6 = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transla.transe("U", "使用官方 Wine 适配活动的脚本进行打包")) -easyPackager = QtWidgets.QAction(QtGui.QIcon.fromTheme("deb"), transla.transe("U", "使用简易打包器进行打包(小白且无特殊需求建议使用这个)")) -getDllOnInternet = QtWidgets.QAction(QtGui.QIcon.fromTheme("1CD8_rundll32.0"), transla.transe("U", "从互联网获取DLL")) -w7 = QtWidgets.QAction(transla.transe("U", "从镜像获取DLL(只支持官方安装镜像,DOS内核如 Windows 95 暂不支持)")) -updateGeek = QtWidgets.QAction(transla.transe("U", "从 Geek Uninstaller 官网升级程序")) -deletePartIcon = QtWidgets.QAction(transla.transe("U", "快捷方式管理工具")) -deleteDesktopIcon = QtWidgets.QAction(transla.transe("U", "删除所有 Wine 程序在启动器的快捷方式")) -wineOption.addAction(w1) -wineOption.addAction(w2) -wineOption.addAction(w3) -wineOption.addAction(w4) -wineOption.addAction(cleanBottonUOS) -wineOption.addSeparator() -wineOption.addAction(w5) -wineOption.addAction(w6) -wineOption.addAction(easyPackager) -wineOption.addAction(deletePartIcon) -wineOption.addSeparator() -wineOption.addAction(wineKeyboardLnk) -wineOption.addSeparator() -wineOption.addAction(getDllOnInternet) -wineOption.addAction(w7) -wineOption.addSeparator() -wineOption.addAction(updateGeek) -wineOption.addSeparator() -wm1 = wineOption.addMenu(transla.transe("U", "在指定 Wine、容器安装组件")) -wm1_1 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 .net framework")) -wm1_2 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual Studio C++")) -wm1_3 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 MSXML")) -wm1_4 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 gecko")) -wm1_5 = QtWidgets.QAction(QtGui.QIcon.fromTheme("mono"), transla.transe("U", "在指定wine、指定容器安装 mono")) -wm1_7 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装 Visual Basic Runtime")) -wm1_6 = QtWidgets.QAction(transla.transe("U", "在指定wine、指定容器安装其它运行库")) -wm1.addAction(wm1_1) -wm1.addAction(wm1_2) -wm1.addAction(wm1_3) -wm1.addAction(wm1_4) -wm1.addAction(wm1_5) -wm1.addAction(wm1_7) -wm1.addAction(wm1_6) -wm2 = wineOption.addMenu(transla.transe("U", "在指定 Wine、容器运行基础应用")) -wm2_1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("control-center2"), transla.transe("U", "打开指定wine、指定容器的控制面板")) -wm2_2 = QtWidgets.QAction(QtGui.QIcon.fromTheme("web-browser"), transla.transe("U", "打开指定wine、指定容器的浏览器")) -wm2_3 = QtWidgets.QAction(QtGui.QIcon.fromTheme("regedit"), transla.transe("U", "打开指定wine、指定容器的注册表")) -wm2_4 = QtWidgets.QAction(transla.transe("U", "打开指定wine、指定容器的任务管理器")) -wm2_5 = QtWidgets.QAction(transla.transe("U", "打开指定wine、指定容器的资源管理器")) -wm2_6 = QtWidgets.QAction(transla.transe("U", "打开指定wine、指定容器的关于 wine")) -wm2.addAction(wm2_1) -wm2.addAction(wm2_2) -wm2.addAction(wm2_3) -wm2.addAction(wm2_4) -wm2.addAction(wm2_5) -wm2.addAction(wm2_6) -wineOption.addSeparator() -settingRunV3Sh = wineOption.addMenu(transla.transe("U", "run_v3.sh 管理")) -w8 = QtWidgets.QAction(transla.transe("U", "设置 run_v3.sh 的文管为 Deepin 默认文管")) -w9 = QtWidgets.QAction(transla.transe("U", "设置 run_v3.sh 的文管为 Wine 默认文管")) -w10 = QtWidgets.QAction(transla.transe("U", "重新安装 deepin-wine-helper")) -w11 = QtWidgets.QAction(QtGui.QIcon.fromTheme("winetricks"), transla.transe("U", "使用winetricks打开指定容器")) -settingRunV3Sh.addAction(w8) -settingRunV3Sh.addAction(w9) -settingRunV3Sh.addAction(w10) -wineOption.addSeparator() -wineOption.addAction(w11) -wineOption.addSeparator() -optionCheckDemo = wineOption.addMenu(transla.transe("U", "组件功能测试")) -vbDemo = QtWidgets.QAction(transla.transe("U", "测试 Visual Basic 6 程序")) -netDemo = QtWidgets.QAction(transla.transe("U", "测试 .net framework 程序")) -netIEDemo = QtWidgets.QAction(transla.transe("U", "测试 .net framework + Internet Explorer 程序")) -optionCheckDemo.addAction(vbDemo) -optionCheckDemo.addAction(netDemo) -optionCheckDemo.addAction(netIEDemo) -wineOption.addSeparator() -wm3 = wineOption.addMenu(transla.transe("U", "启用/禁用功能")) -ed1 = wm3.addMenu(transla.transe("U", "启用/禁用 opengl")) -wm3_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "开启 opengl")) -wm3_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁用 opengl")) -ed1.addAction(wm3_1) -ed1.addAction(wm3_2) -ed2 = wm3.addMenu(transla.transe("U", "安装/卸载 winbind")) -wm4_1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "安装 winbind")) -wm4_2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "卸载 winbind")) -ed2.addAction(wm4_1) -ed2.addAction(wm4_2) -dxvkMenu = wm3.addMenu(transla.transe("U", "安装/卸载 DXVK")) -installDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "安装 DXVK")) -uninstallDxvk = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "卸载 DXVK")) -dxvkMenu.addAction(installDxvk) -dxvkMenu.addAction(uninstallDxvk) -vkd3dMenu = wm3.addMenu(transla.transe("U", "安装/卸载 Vkd3d")) -installvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "安装 Vkd3d")) -uninstallvkd3d = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "卸载 Vkd3d")) -vkd3dMenu.addAction(installvkd3d) -vkd3dMenu.addAction(uninstallvkd3d) -wineOption.addSeparator() -wineOption.addAction(deleteDesktopIcon) -wineOption.addSeparator() -settingWineBottleCreateLink = wm3.addMenu(transla.transe("U", "启用/禁止指定 wine 容器生成快捷方式")) -enabledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "允许指定 wine 容器生成快捷方式")) -disbledWineBottleCreateLink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁止指定 wine 容器生成快捷方式")) -settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink) -settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink) -settingWineCrashDialog = wm3.addMenu(transla.transe("U", "启用/禁用指定 wine 容器崩溃提示窗口")) -disbledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁用指定 wine 容器崩溃提示窗口")) -enabledWineCrashDialog = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "启用指定 wine 容器崩溃提示窗口")) -settingWineCrashDialog.addAction(enabledWineCrashDialog) -settingWineCrashDialog.addAction(disbledWineCrashDialog) -settingOpenProgram = wm3.addMenu(transla.transe("U", "启用/禁止指定 wine 容器创建文件关联")) -enabledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(45), transla.transe("U", "允许指定 wine 容器创建文件关联")) -disbledOpenProgram = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁止指定 wine 容器创建文件关联")) -settingOpenProgram.addAction(enabledOpenProgram) -settingOpenProgram.addAction(disbledOpenProgram) -settingHttpProxy = wineOption.addMenu(transla.transe("U", "设置指定 Wine 容器代理")) -enabledHttpProxy = QtWidgets.QAction(transla.transe("U", "设置指定 wine 容器的代理")) -disbledHttpProxy = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), transla.transe("U", "禁用指定 wine 容器的代理")) -settingHttpProxy.addAction(enabledHttpProxy) -settingHttpProxy.addAction(disbledHttpProxy) -dllOver = wineOption.addMenu(transla.transe("U", "函数顶替库列表")) -saveDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(43), transla.transe("U", "导出函数顶替列表")) -addDllOver = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "导入函数顶替列表")) -editDllOver = QtWidgets.QAction(transla.transe("U", "编辑函数顶替库列表")) -dllOver.addAction(saveDllOver) -dllOver.addAction(addDllOver) -dllOver.addAction(editDllOver) -w1.triggered.connect(OpenWineBotton) -w2.triggered.connect(InstallWineFont) -w3.triggered.connect(OpenWineFontPath) -w4.triggered.connect(DeleteWineBotton) -cleanBottonUOS.triggered.connect(CleanWineBottonByUOS) -w5.triggered.connect(BuildExeDeb) -w6.triggered.connect(UOSPackageScript) -easyPackager.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/deepin-wine-easy-packager.py' '{e2.currentText()}'"]).start()) -wineKeyboardLnk.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/key/key-add-gui.py'"]).start()) -getDllOnInternet.triggered.connect(GetDllFromInternet) -w7.triggered.connect(GetDllFromWindowsISO.ShowWindow) -updateGeek.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-terminal -C '\"{programPath}/UpdateGeek.sh\"' --keep-open")) -w8.triggered.connect(SetDeepinFileDialogDeepin) -w9.triggered.connect(SetDeepinFileDialogDefult) -w10.triggered.connect(SetDeepinFileDialogRecovery) -w11.triggered.connect(lambda: RunWinetricks()) -wm1_1.triggered.connect(lambda: threading.Thread(target=InstallNetFramework).start()) -wm1_2.triggered.connect(lambda: threading.Thread(target=InstallVisualStudioCPlusPlus).start()) -wm1_3.triggered.connect(lambda: threading.Thread(target=InstallMSXML).start()) -wm1_4.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=["gecko"]).start()) -wm1_5.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=["mono"]).start()) -wm1_7.triggered.connect(lambda: threading.Thread(target=InstallVB).start()) -wm1_6.triggered.connect(lambda: threading.Thread(target=InstallOther).start()) -wm2_1.triggered.connect(lambda: RunWineProgram("control")) -wm2_2.triggered.connect(lambda: RunWineProgram("iexplore' 'https://gfdgd-xi.github.io")) -wm2_3.triggered.connect(lambda: RunWineProgram("regedit")) -wm2_4.triggered.connect(lambda: RunWineProgram("taskmgr")) -wm2_5.triggered.connect(lambda: RunWineProgram("explorer")) -wm2_6.triggered.connect(lambda: RunWineProgram("winver")) -wm3_1.triggered.connect(lambda: RunWineProgram(f"regedit.exe' /s '{programPath}/EnabledOpengl.reg")) -wm3_2.triggered.connect(lambda: RunWineProgram(f"regedit.exe' /s '{programPath}/DisabledOpengl.reg")) -wm4_1.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-terminal -C 'pkexec apt install winbind -y' --keep-open")) -wm4_2.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-terminal -C 'pkexec apt purge winbind -y' --keep-open")) -installDxvk.triggered.connect(InstallDXVK) -uninstallDxvk.triggered.connect(UninstallDXVK) -installvkd3d.triggered.connect(InstallVkd3d) -uninstallvkd3d.triggered.connect(UninstallVkd3d) -deletePartIcon.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"python3 '{programPath}/BuildDesktop.py'"]).start()) -deleteDesktopIcon.triggered.connect(DeleteDesktopIcon) -enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) -disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) -disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000000 '/f")) -enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f")) -disbledOpenProgram.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\FileOpenAssociations' /v Enable /d N '/f")) -enabledOpenProgram.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\FileOpenAssociations' /v Enable /d Y '/f")) -enabledHttpProxy.triggered.connect(SetHttpProxy) -disbledHttpProxy.triggered.connect(DisbledHttpProxy) -saveDllOver.triggered.connect(SaveDllList) -addDllOver.triggered.connect(AddReg) -editDllOver.triggered.connect(lambda: RunWineProgram("winecfg")) -vbDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/vb.exe")) -netDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/net.exe")) -netIEDemo.triggered.connect(lambda: RunWineProgram(f"{programPath}/Test/netandie.exe")) - -virtualMachine = menu.addMenu(transla.transe("U", "虚拟机(&V)")) -v1 = QtWidgets.QAction(QtGui.QIcon.fromTheme("virtualbox"), transla.transe("U", "使用 Virtualbox 虚拟机运行 Windows 应用")) -virtualMachine.addAction(v1) -v1.triggered.connect(RunVM) - -checkValue = menu.addMenu(transla.transe("U", "校验值计算(&S)")) -md5Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "MD5(&M)")) -sha1Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "SHA1(&M)")) -base64Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "Base64(建议小文件)(&B)")) -sha256Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "SHA256(&S)")) -sha512Value = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "SHA512(&S)")) -md5Value.triggered.connect(lambda: ValueCheck().Get("MD5")) -sha1Value.triggered.connect(lambda: ValueCheck().Get("SHA1")) -base64Value.triggered.connect(lambda: ValueCheck().Get("BASE64")) -sha256Value.triggered.connect(lambda: ValueCheck().Get("SHA256")) -sha512Value.triggered.connect(lambda: ValueCheck().Get("SHA512")) -checkValue.addAction(md5Value) -checkValue.addAction(sha1Value) -checkValue.addAction(base64Value) -checkValue.addAction(sha256Value) -checkValue.addAction(sha512Value) - - -safeWebsize = menu.addMenu(transla.transe("U", "云沙箱(&C)")) -s1 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "360 沙箱云")) -s2 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "微步云沙箱")) -s3 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "VIRUSTOTAL")) -safeWebsize.addAction(s1) -safeWebsize.addAction(s2) -safeWebsize.addAction(s3) -s1.triggered.connect(lambda: webbrowser.open_new_tab("https://ata.360.net/")) -s2.triggered.connect(lambda: webbrowser.open_new_tab("https://s.threatbook.cn/")) -s3.triggered.connect(lambda: webbrowser.open_new_tab("https://www.virustotal.com/")) - -log = menu.addMenu(transla.transe("U", "日志(&L)")) -getDllInfo = QtWidgets.QAction(transla.transe("U", "查询 Dll")) -checkLogText = QtWidgets.QAction(transla.transe("U", "日志分析")) -saveLogText = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(16), transla.transe("U", "另存为日志")) -transLogText = QtWidgets.QAction(transla.transe("U", "翻译日志(翻译后日志分析功能会故障)")) -uploadLogText = QtWidgets.QAction(transla.transe("U", "上传日志")) -getDllInfo.triggered.connect(DllWindow.ShowWindow) -checkLogText.triggered.connect(LogChecking.ShowWindow) -saveLogText.triggered.connect(SaveLog) -transLogText.triggered.connect(TransLog) -uploadLogText.triggered.connect(UploadLog) -log.addAction(getDllInfo) -log.addAction(checkLogText) -log.addAction(saveLogText) -log.addAction(transLogText) -log.addAction(uploadLogText) - -actionList = [] -def AddLib(install: QtWidgets.QAction, uninstall, menu, info): - actionList.append(install) - actionList.append(uninstall) - install.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/InstallRuntime/{info}'")) - uninstall.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/InstallRuntime/remove/{info}'")) - menu.addAction(install) - menu.addAction(uninstall) - -if os.path.exists(f"{programPath}/InstallRuntime"): - installLib = menu.addMenu(transla.transe("U", "应用运行库(&R)")) - howtouseQemuUser = QtWidgets.QAction(transla.transe("U", "Qemu User 使用教程(配合运行库实现在非 X86 架构运行 X86 Wine)")) - howtouseQemuUser.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner/wikis/%E4%BD%BF%E7%94%A8%E5%B8%AE%E5%8A%A9/%E9%9D%9EX86%E6%9E%B6%E6%9E%84PC/%E4%BD%BF%E7%94%A8Qemu%20User%E8%BF%90%E8%A1%8CWine%EF%BC%88%E6%94%AF%E6%8C%81%E5%85%A8%E6%9E%B6%E6%9E%84%EF%BC%89")) - installLib.addAction(howtouseQemuUser) - installQemuMenu = installLib.addMenu(transla.transe("U", "安装 Qemu User")) - installQemu = QtWidgets.QAction(transla.transe("U", "安装 Qemu User")) - removeQemu = QtWidgets.QAction(transla.transe("U", "卸载 Qemu User")) - installQemuMenu.addAction(installQemu) - installQemuMenu.addAction(removeQemu) - installQemu.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/InstallQemuUser.sh'")) - removeQemu.triggered.connect(lambda: OpenTerminal(f"bash '{programPath}/RemoveQemuUser.sh'")) - actionList = [] - nameList = {} - for i in os.listdir(f"{programPath}/InstallRuntime"): - if i[-3:] == ".sh": - print(f"检测到库 {os.path.splitext(i)[0]}") - - AddLib(QtWidgets.QAction(transla.transe("U", f"安装 {os.path.splitext(i)[0]} 运行库")), QtWidgets.QAction(transla.transe("U", f"卸载 {os.path.splitext(i)[0]} 运行库")), installLib.addMenu(transla.transe("U", f"运行库 {os.path.splitext(i)[0]}")), i) - - - -qemuMenu = menu.addMenu(transla.transe("U", "容器(&C)")) -unpackDeb = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(32), transla.transe("U", "解包 deb 提取容器")) -qemuMenu.addAction(unpackDeb) -unpackDeb.triggered.connect(UnPackage) -if len(qemuBottleList) >= 1: - configMenu = QtWidgets.QAction(QtGui.QIcon(f"{programPath}/Icon/Function/CHROOT.png"), transla.transe("U", "配置指定 Chroot 容器")) - qemuMenu.addAction(configMenu) - configMenu.triggered.connect(ConfigQemu) - print(qemuBottleList) - -help = menu.addMenu(transla.transe("U", "帮助(&H)")) -runStatusWebSize = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "查询程序在 Wine 的运行情况")) -h1 = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序官网")) -h2 = QtWidgets.QAction(transla.transe("U", "小提示")) -wineRunnerHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用) By 鹤舞白沙")) -h3 = QtWidgets.QAction(transla.transe("U", "更新内容")) -h4 = QtWidgets.QAction(transla.transe("U", "鸣谢名单")) -h5 = QtWidgets.QAction(transla.transe("U", "更新这个程序")) -programInformation = QtWidgets.QAction(transla.transe("U", "获取程序公告(也可以在这里看程序安装/打开量)")) -h6 = QtWidgets.QAction(transla.transe("U", "反馈这个程序的建议和问题")) -fenUpload = QtWidgets.QAction(transla.transe("U", "程序评分")) -h7 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于这个程序")) -h8 = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(9), transla.transe("U", "关于 Qt")) -gfdgdxiio = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "作者个人站")) -gitee = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitee")) -github = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Github")) -gitlink = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitlink")) -gitlab = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "Gitlab")) -jihu = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "极狐")) -h1.addAction(gfdgdxiio) -h1.addAction(gitee) -h1.addAction(github) -h1.addAction(gitlink) -h1.addAction(gitlab) -h1.addAction(jihu) -help.addSeparator() -help.addAction(wineRunnerHelp) -help.addAction(runStatusWebSize) -help.addSeparator() -help.addAction(h2) -help.addAction(h3) -help.addAction(h4) -help.addSeparator() - -wikiHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "程序 Wiki")) -help.addAction(wikiHelp) -videoHelp = help.addMenu(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "视频教程")) -easyHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "简易使用教程")) -buildHelp = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "打包教程")) -videoHelp.addAction(easyHelp) -videoHelp.addAction(buildHelp) -help.addSeparator() -help.addAction(h5) -help.addAction(h6) -help.addAction(fenUpload) -help.addAction(programInformation) -help.addAction(h7) -help.addAction(h8) -help.addSeparator() -hm1 = help.addMenu(transla.transe("U", "更多生态适配应用")) -hm1_1 = QtWidgets.QAction(transla.transe("U", "运行 Android 应用:UEngine 运行器")) -hm1.addAction(hm1_1) -gfdgdxiio.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io")) -gitee.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner")) -github.triggered.connect(lambda: webbrowser.open_new_tab("https://github.com/gfdgd-xi/deep-wine-runner")) -gitlink.triggered.connect(lambda: webbrowser.open_new_tab("https://gitlink.org.cn/gfdgd_xi/deep-wine-runner")) -gitlab.triggered.connect(lambda: webbrowser.open_new_tab("https://gitlab.com/gfdgd-xi/deep-wine-runner")) -jihu.triggered.connect(lambda: webbrowser.open_new_tab("https://jihulab.com//gfdgd-xi/deep-wine-runner")) -runStatusWebSize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/wine-runner-info")) -h2.triggered.connect(helps) -h3.triggered.connect(UpdateThings) -wineRunnerHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://bbs.deepin.org/post/246837")) -h4.triggered.connect(ThankWindow) -wikiHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdgd-xi.github.io/wine-runner-wiki")) -easyHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/video/BV1ma411972Y")) -buildHelp.triggered.connect(lambda: webbrowser.open_new_tab("https://www.bilibili.com/video/BV1EU4y1k7zr")) -h5.triggered.connect(UpdateWindow.ShowWindow) -h6.triggered.connect(WineRunnerBugUpload) -fenUpload.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"python3 '{programPath}/ProgramFen.py'"]).start()) -h7.triggered.connect(about_this_program) -h8.triggered.connect(lambda: QtWidgets.QMessageBox.aboutQt(widget)) -hm1_1.triggered.connect(lambda: webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/uengine-runner")) -programInformation.triggered.connect(GetNewInformation) -# 异同步获取信息 -#threading.Thread(target=GetVersion).start() -GetVersion() -# 窗口设置 -window.resize(widget.frameGeometry().width() * 2, widget.frameGeometry().height()) -widget.setLayout(mainLayout) -window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) -widget.show() -window.show() - -# 控件设置 -app.setStyle(QtWidgets.QStyleFactory.create(setting["Theme"])) -e1.addItems(findExeHistory) -e2.addItems(wineBottonHistory) -combobox1.addItems(shellHistory) -if setting["AutoWine"]: - o1.addItems(canUseWine) -else: - o1.addItems(wine.keys()) -# 禁用被精简掉的控件 -for i in [ - [[p1, installWineOnDeepin23, installWineHQ, installMoreWine], f"{programPath}/InstallWineOnDeepin23.py"], - [[w5], f"{programPath}/deepin-wine-packager.py"], - [[w6], f"{programPath}/deepin-wine-packager-with-script.py"], - [[p1, v1], f"{programPath}/RunVM.sh"], - [[getProgramIcon, uninstallProgram, updateGeek, trasButton, miniAppStore, fontAppStore, wm1_1, wm1_2, wm1_3, wm1_6, w7, w2], f"{programPath}/geek.exe"], -]: - if not os.path.exists(i[1]): - for x in i[0]: - x.setDisabled(True) -# 有些功能是非 X86 不适用的,需要屏蔽 -if subprocess.getoutput("arch").lower() != "x86_64": - p1.setDisabled(True) - installWineOnDeepin23.setDisabled(True) - installMoreWine.setEnabled(True) - virtualMachine.setDisabled(True) - v1.setDisabled(True) - installWineHQ.setDisabled(True) - pass -o1.setCurrentText(setting["DefultWine"]) -e1.setEditText(setting["DefultBotton"]) -e2.setEditText("") -combobox1.setEditText("") -if len(sys.argv) > 1 and sys.argv[1]: - e2.setEditText(sys.argv[1]) -if not os.path.exists("/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"): - sparkWineSetting.setEnabled(False) -if o1.currentText() == "": - # 一个 Wine 都没有却用 Wine 的功能 - # 还是要处理的,至少不会闪退 - wine["没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用"] = "没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用" - canUseWine.append("没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用") - o1.addItem("没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用") - - -sys.exit(app.exec_()) diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-update-bug b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-update-bug deleted file mode 100755 index 1f36530..0000000 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner-update-bug +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys -import json -import base64 -import req as requests -import traceback -import webbrowser -import urllib.parse as parse -import PyQt5.QtGui as QtGui -import PyQt5.QtWidgets as QtWidgets - -# 读取文本文档 -def readtxt(path: "路径")->"读取文本文档": - f = open(path, "r") # 设置文件对象 - str = f.read() # 获取内容 - f.close() # 关闭文本对象 - return str # 返回结果 - -def Update(name, stars, contact, things, version): - # post 内容 - data = { - "Name": name, - "Starts": stars, - "Contact": contact, - "Things": things, - "Version": version - } - try: - QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9idWcvdXBsb2FkLnBocA==").decode("utf-8")), data=data).text) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(widget, "错误", f"服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{traceback.format_exc()}") - -def UpdateButtonClick(): - #判断是否为空 - if nameThings.text() == "" or starMenu.currentText() == "" or contactThings.text() == "" or updateThings.toPlainText().replace(" ", "").replace("\n", "") == "": - QtWidgets.QMessageBox.critical(widget, "错误", "反馈信息未填写完整!") - return - Update(name=nameThings.text(), stars=starMenu.currentText(), contact=contactThings.text(), things=updateThings.toPlainText(), version=version) - -def OpenGiteeIssues(): - webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/deep-wine-runner/issues") - -def OpenGithubIssues(): - webbrowser.open_new_tab("https://github.com/gfdgd-xi/deep-wine-runner/issues") - -def OpenGitlinkIssues(): - webbrowser.open_new_tab("https://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner/issues") - -# 获取用户主目录 -def get_home()->"获取用户主目录": - return os.path.expanduser('~') - -########################### -# 程序信息 -########################### -iconPath = "{}/deepin-wine-runner.svg".format(os.path.split(os.path.realpath(__file__))[0]) -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -information = json.loads(readtxt(programPath + "/information.json")) -version = information["Version"] - -########################### -# 窗口创建 -########################### -app = QtWidgets.QApplication(sys.argv) -window = QtWidgets.QMainWindow() -widget = QtWidgets.QWidget() -widgetLayout = QtWidgets.QGridLayout() -nameThings = QtWidgets.QLineEdit() -contactThings = QtWidgets.QLineEdit() -starMenu = QtWidgets.QComboBox() -updateThings = QtWidgets.QTextEdit() -updateButton = QtWidgets.QPushButton("提交") -otherUpload = QtWidgets.QHBoxLayout() -giteeButton = QtWidgets.QPushButton("Gitee Issues") -githubButton = QtWidgets.QPushButton("Github Issues") -gitlinkButton = QtWidgets.QPushButton("Gitlink Issues") -otherUpload.addWidget(QtWidgets.QLabel("如果无法正常反馈,可以用其他方式反馈:")) -otherUpload.addWidget(giteeButton) -otherUpload.addWidget(githubButton) -otherUpload.addWidget(gitlinkButton) -otherUpload.addSpacerItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) -starMenu.addItems(["5分", "4分", "3分", "2分", "1分"]) -widgetLayout.addWidget(QtWidgets.QLabel("你的昵称:"), 0, 0, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel("联系方式(电子邮箱):"), 0, 2, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel("评分:"), 0, 4, 1, 1) -widgetLayout.addWidget(QtWidgets.QLabel("反馈内容(支持 Markdown 格式):"), 1, 0, 1, 2) -widgetLayout.addWidget(nameThings, 0, 1, 1, 1) -widgetLayout.addWidget(contactThings, 0, 3, 1, 1) -widgetLayout.addWidget(starMenu, 0, 5, 1, 1) -widgetLayout.addWidget(updateThings, 2, 0, 1, 6) -widgetLayout.addLayout(otherUpload, 3, 0, 1, 5) -widgetLayout.addWidget(updateButton, 3, 5, 1, 1) -giteeButton.clicked.connect(OpenGiteeIssues) -githubButton.clicked.connect(OpenGithubIssues) -gitlinkButton.clicked.connect(OpenGitlinkIssues) -updateButton.clicked.connect(UpdateButtonClick) -widget.setLayout(widgetLayout) -window.setCentralWidget(widget) -window.setWindowTitle(f"Wine 运行器 {version} 问题/建议反馈") -window.setWindowIcon(QtGui.QIcon(iconPath)) -window.show() -sys.exit(app.exec_()) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner.svg b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner.svg deleted file mode 100755 index c404135..0000000 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-venturi-setter.py b/deb/opt/apps/deepin-wine-runner/deepin-wine-venturi-setter.py deleted file mode 100755 index f66bd7c..0000000 --- a/deb/opt/apps/deepin-wine-runner/deepin-wine-venturi-setter.py +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env python3 -# 使用系统默认的 python3 运行 -########################################################################################### -# 作者:gfdgd xi -# 版本:1.5.3 -# 更新时间:2022年07月07日 -# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序 -# 基于 Python3 的 tkinter 构建 -########################################################################################### -################# -# 引入所需的库 -################# -import os -import sys -import updatekiller - -################### -# 程序所需事件 -################### -# 读取文本文档 -def readtxt(path: "路径")->"读取文本文档": - f = open(path, "r") # 设置文件对象 - str = f.read() # 获取内容 - f.close() # 关闭文本对象 - return str # 返回结果 - - -def ChangeDeepinWineOpenFileDialogDefult()->"": - info = readtxt("/opt/deepinwine/tools/run_v3.sh") - all = "" - for line in info.split('\n'): - if "export ATTACH_FILE_DIALOG=" in line: - if "#" in line: - return False - line = "#" + line - all = all + line + "\n" - return all[0: -1] - -def ChangeDeepinWineOpenFileDialogDeepinDialog()->"": - info = readtxt("/opt/deepinwine/tools/run_v3.sh") - all = "" - for line in info.split('\n'): - if "export ATTACH_FILE_DIALOG=" in line: - if "#" not in line: - return False - line = line.replace("#", "") - all = all + line + "\n" - return all[0: -1] - -# 写入文本文档 -def write_txt(path: "路径", things: "内容")->"写入文本文档": - file = open(path, 'w', encoding='UTF-8') # 设置文件对象 - file.write(things) # 写入文本 - file.close() # 关闭文本对象 - -def Help(): - print("参数帮助:") - print("deepin\t使用 deepin 默认文管") - print("defult\t使用 wine 默认文管") - print("recovery\t恢复默认设置") - print("--help\t查看帮助") - -if len(sys.argv) <= 1: - print("参数错误!") - Help() - sys.exit(1) -if not sys.argv[1] == "deepin" and not sys.argv[1] == "defult" and not sys.argv[1] == "recovery" or sys.argv[1] == "--help": - Help() - sys.exit(1) -things = "" -if sys.argv[1] == "deepin": - things = ChangeDeepinWineOpenFileDialogDeepinDialog() -elif sys.argv[1] == "defult": - things = ChangeDeepinWineOpenFileDialogDefult() -elif sys.argv[1] == "recovery": - os.system("sudo apt reinstall deepin-wine-helper -y") - sys.exit(0) -else: - print("参数错误!") - Help() - sys.exit(1) -if things == False or things == "": - print("无法更新配置:配置不准重复更新") - sys.exit(1) -write_txt("/opt/deepinwine/tools/run_v3.sh", things) -sys.exit(0) diff --git a/deb/opt/apps/deepin-wine-runner/deepin.list b/deb/opt/apps/deepin-wine-runner/deepin.list deleted file mode 100755 index 624cada..0000000 --- a/deb/opt/apps/deepin-wine-runner/deepin.list +++ /dev/null @@ -1,4 +0,0 @@ -## Generated by deepin-installer -deb https://community-packages.deepin.com/deepin/ apricot main contrib non-free -# Written by deepin-home-appstore-client -deb https://com-store-packages.uniontech.com/appstore deepin appstore diff --git a/deb/opt/apps/deepin-wine-runner/dlls-arm.7z b/deb/opt/apps/deepin-wine-runner/dlls-arm.7z deleted file mode 100755 index 776fd35..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/dlls-arm.7z and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/dxvk.7z b/deb/opt/apps/deepin-wine-runner/dxvk.7z deleted file mode 100755 index 5c4a714..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/dxvk.7z and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-package-builder.desktop b/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-package-builder.desktop deleted file mode 100755 index cb4fe1a..0000000 --- a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-package-builder.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Type=Application -X-Categories=System;Wine; -Exec=/usr/bin/deepin-wine-package-builder "~/.wine" %F -Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg -Name=Wine Package Builder -Name[zh]=Wine 打包器 -Terminal=false -StartupNotify=true -NoDisplay=true -Keywords=exe;scr; -MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut; diff --git a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-packager-with-script.desktop b/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-packager-with-script.desktop deleted file mode 100755 index e67f51c..0000000 --- a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-packager-with-script.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -X-Categories=System;Wine; -Exec=/usr/bin/deepin-wine-packager-with-script -Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg -Name=Wine Package Builder For UOS -NoDisplay=true -Name[zh]=Wine 打包器(基于活动脚本) -Terminal=false -StartupNotify=true diff --git a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner-control-vm.desktop b/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner-control-vm.desktop deleted file mode 100755 index 35eacdc..0000000 --- a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner-control-vm.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -X-Categories=System;Wine; -Exec=/opt/apps/deepin-wine-runner/RunVM.sh %F -Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg -Name=Setting VirtualMachine -Name[zh]=设置 Windows 虚拟机 -NoDisplay=true -Terminal=false -StartupNotify=true diff --git a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner-start-vm.desktop b/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner-start-vm.desktop deleted file mode 100755 index 1271f09..0000000 --- a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner-start-vm.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -X-Categories=System; -Exec=/opt/apps/deepin-wine-runner/StartVM.sh %F -Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg -Name=Start Windows VirtualMachine -Name[zh]=开启 Windows 虚拟机 -Terminal=false -StartupNotify=true diff --git a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner.desktop b/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner.desktop deleted file mode 100755 index af220ee..0000000 --- a/deb/opt/apps/deepin-wine-runner/entries/applications/spark-deepin-wine-runner.desktop +++ /dev/null @@ -1,11 +0,0 @@ -[Desktop Entry] -Type=Application -X-Categories=System;Wine; -Exec=/usr/bin/deepin-wine-runner %F -Icon=/opt/apps/deepin-wine-runner/deepin-wine-runner.svg -Name=Wine Runner -Name[zh]=Wine 运行器 -Terminal=false -StartupNotify=true -Keywords=exe;scr; -MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut; diff --git a/deb/opt/apps/deepin-wine-runner/geek.exe b/deb/opt/apps/deepin-wine-runner/geek.exe deleted file mode 100755 index 72e206b..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/geek.exe and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/getxmlimg.py b/deb/opt/apps/deepin-wine-runner/getxmlimg.py deleted file mode 100755 index af59a70..0000000 --- a/deb/opt/apps/deepin-wine-runner/getxmlimg.py +++ /dev/null @@ -1,118 +0,0 @@ -import PIL.Image as Image -import PIL.ImageDraw as ImageDraw -import zipfile -import subprocess -import re - -class getsavexml(): - - def savexml(self,apkFilePath,xmlpath,iconSavePath): - cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath - print(cmddumpid) - xmltree = subprocess.getoutput(cmddumpid) - xmls = xmltree.splitlines() - # find strs ,print next line - def FindStrs(lines,strs): - i=0 - while i < len(lines): - if re.search(strs,lines[i]): - tmpstr = lines[i+1] - i += 1 - Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1] - return Resultstr - else: - i += 1 - #从apk的信息中获取前后景图片的ID号 - backimgid = FindStrs(xmls,"background") - foreimgid = FindStrs(xmls,"foreground") - print(backimgid) - print(foreimgid) - - # 直接从apk resource文件获取前后两层图片路径及ID字符串 - resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"") - resourcelines = resource.splitlines() - print(resourcelines) - - # 从过滤出的字符串中获取所有相同ID的图片路径 - def Findpicpath(lines,imgid): - i=0 - Resultstr = [] - while i < len(lines): - if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) : - print(lines[i+1]) - tmpstr = lines[i+1].replace("\"","") - i += 1 - Resultstr.append(tmpstr.split()[-1]) - else: - i += 1 - return Resultstr - - #获取所有带前后图片ID的图片路径(相同背景或者前景的图片ID但分辨率不一样) - backimgs = Findpicpath(resourcelines,backimgid) - foreimgs = Findpicpath(resourcelines,foreimgid) - print(backimgs) - print(foreimgs) - #获取分辨率最高的图片路径 - def getmaxsize(imgs): - j = 0 - size=(0,0) - zipapk = zipfile.ZipFile(apkFilePath) - imgpath = "" - while j < len(imgs): - print(imgs[j]) - img = Image.open(zipapk.open(imgs[j])) - print(imgs[j]) - print(img.size) - if size < img.size: - size = img.size - imgpath = imgs[j] - j += 1 - return imgpath - - # 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片 - iconbackpath = getmaxsize(backimgs) - iconforepath = getmaxsize(foreimgs) - print(iconbackpath + " " + iconforepath) - - #从APK文件获取最终图片 - zipapk = zipfile.ZipFile(apkFilePath) - iconback = zipapk.open(iconbackpath) - iconfore = zipapk.open(iconforepath) - - - # 叠加图片,mask 设置前景为蒙版 - iconbackimg = Image.open(iconback).convert("RGBA") - iconforeimg = Image.open(iconfore).convert("RGBA") - iconbackimg.paste(iconforeimg,mask=iconforeimg) - - - # 圆角图片函数,网上拷贝的 - def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266 - """ - 圆角处理 - :param img: 源图象。 - :param radii: 半径,如:30。 - :return: 返回一个圆角处理后的图象。 - """ - # 画圆(用于分离4个角) - circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布 - draw = ImageDraw.Draw(circle) - draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形 - # 原图 - img = img.convert("RGBA") - w, h = img.size - # 画4个角(将整圆分离为4个部分) - alpha = Image.new('L', img.size, 255) - alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角 - alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角 - alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角 - alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角 - # alpha.show() - img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见 - return img - - # 圆角半径1/8边长,保存icon图片 - w,h = iconbackimg.size - iconimg = circle_corner(iconbackimg,int(w/8)) - iconimg.save(iconSavePath) - diff --git a/deb/opt/apps/deepin-wine-runner/gtkGetFileNameDlg b/deb/opt/apps/deepin-wine-runner/gtkGetFileNameDlg deleted file mode 100755 index 2969141..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/gtkGetFileNameDlg and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter deleted file mode 100755 index 61865ed..0000000 --- a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys - -# 读取文本文档 -def readtxt(path: "路径")->"读取文本文档": - f = open(path, "r") # 设置文件对象 - str = f.read() # 获取内容 - f.close() # 关闭文本对象 - return str # 返回结果 - - -def ChangeDeepinWineOpenFileDialogDefult()->"": - info = readtxt("/opt/deepinwine/tools/run_v3.sh") - all = "" - for line in info.split('\n'): - if "export ATTACH_FILE_DIALOG=" in line: - if "#" in line: - return False - line = "#" + line - all = all + line + "\n" - return all[0: -1] - -def ChangeDeepinWineOpenFileDialogDeepinDialog()->"": - info = readtxt("/opt/deepinwine/tools/run_v3.sh") - all = "" - for line in info.split('\n'): - if "export ATTACH_FILE_DIALOG=" in line: - if "#" not in line: - return False - line = line.replace("#", "") - all = all + line + "\n" - return all[0: -1] - -# 写入文本文档 -def write_txt(path: "路径", things: "内容")->"写入文本文档": - file = open(path, 'w', encoding='UTF-8') # 设置文件对象 - file.write(things) # 写入文本 - file.close() # 关闭文本对象 - -def Help(): - print("参数帮助:") - print("deepin\t使用 deepin 默认文管") - print("defult\t使用 wine 默认文管") - print("recovery\t恢复默认设置") - print("--help\t查看帮助") - -if len(sys.argv) <= 1: - print("参数错误!") - Help() - sys.exit(1) -if not sys.argv[1] == "deepin" and not sys.argv[1] == "defult" and not sys.argv[1] == "recovery" or sys.argv[1] == "--help": - Help() - sys.exit(1) -things = "" -if sys.argv[1] == "deepin": - things = ChangeDeepinWineOpenFileDialogDeepinDialog() -elif sys.argv[1] == "defult": - things = ChangeDeepinWineOpenFileDialogDefult() -elif sys.argv[1] == "recovery": - os.system("sudo apt reinstall deepin-wine-helper:i386") - sys.exit(0) -else: - print("参数错误!") - Help() - sys.exit(1) -if things == False or things == "": - print("无法更新配置:配置不准重复更新") - sys.exit(1) -write_txt("/opt/deepinwine/tools/run_v3.sh", things) -sys.exit(0) diff --git a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk deleted file mode 100755 index 6462df2..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk.desktop b/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk.desktop deleted file mode 100755 index bfd16c8..0000000 --- a/deb/opt/apps/deepin-wine-runner/helperset/deepin-wine-venturi-setter-dtk.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Categories=System -Exec=deepin-wine-venturi-setter-dtk -Icon=/opt/apps/deepin-wine-venturi-setter/logo.png -Name=deepin wine 文管设置器 -StartupNotify=true -Terminal=false -Type=Application \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/helperset/logo.png b/deb/opt/apps/deepin-wine-runner/helperset/logo.png deleted file mode 100755 index b164d46..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/helperset/logo.png and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/information.json b/deb/opt/apps/deepin-wine-runner/information.json deleted file mode 100755 index 004ebd1..0000000 --- a/deb/opt/apps/deepin-wine-runner/information.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "Version": "3.2.1", - "Time": "2023-04-29 21:32:03 Linux-5.15.77-amd64-desktop-x86_64-with-Deepin-20.9-apricot", - "Thank": [ - "感谢 RacoonGX 的付出与贡献", - "感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》:https://bbs.deepin.org/post/247720", - "感谢 @豪 提供程序图标", - "感谢 @鹤舞白沙 对程序文案进行优化以及编写《Wine运行器和Wine打包器傻瓜式使用教程(小白专用) 》:https://bbs.deepin.org/post/246837", - "感谢 @璀璨星空 提供的彩蛋图标", - "感谢 @Bail 反馈的更新策略问题", - "感谢 @白水 反馈的安装 exagear 后无法识别和调用 box86 的问题", - "感谢 @汐光. 提供的翻译接口", - "感谢 @鹤舞白沙 专门为小白用户编写的使用 Wine 运行器非基于生态适配脚本的程序打包教程", - "感谢 @牦牛儿苗 进行了龙芯 3a5000 平台的测试与移植", - "感谢 @鹤舞白沙 优化了程序文案", - "感谢 @豪 的程序测试和制作的论坛 https://gfdgdxi.flarum.cloud/", - "感谢 @185******67 反馈的 2.4.0 无法打开 Visual Basic 组件安装工具的问题", - "感谢 @shenmo 提供的 在打包器的 postrm 脚本添加 kill.sh、追加参数改为 --uri xxxxxxx、独立生成容器 7z 文件的功能", - "感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301", - "感谢 @zhangs https://bbs.deepin.org/post/227948", - "感谢 @gtjmaster https://bbs.deepin.org/post/225509", - "感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw", - "感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址", - "感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议", - "感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题", - "感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议", - "感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码", - "感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议", - "感谢 @PossibleVing 提供的新版应用图标", - "感谢 @zhengjl 反馈的 1.7.0 中 .net framrwork 3.5 非离线版安装包的问题以及 1.8.0 重复路径一直自动重复增加的问题", - "感谢 @国川 @刘岐 提供的非 i386、amd64 运行 wine 使用 i386/amd64 可执行文件的教程和脚本", - "感谢 @王俊文 @189******09 @tfhyl 提供在非 X86 平台的国产 PC 进行测试", - "感谢 @cuisirwork 提供的提供视频教程的建议", - "感谢 @办公助手 提供的非 X86 平台 Wine 运行自定义 exe 应用教程和 deb 包", - "感谢 @季星火 反馈的无法使用该程序删除生成的 .desktop 的问题", - "感谢 @ZYH 提供的敏感词列表", - "感谢 @五行缺钱 反馈的 2.0.0 在 Deepin 23 缺失依赖 toilet 的问题", - "感谢 @云的眼泪 @zhengjl 反馈的 2.0.0 发布忘记把安装包传蓝奏云的问题", - "感谢 @虚幻的早晨 提出的添加 DXVK、VKD3D 的功能(VKD3D 暂未实现)", - "感谢 @以勒 修改 Dll 提取工具提示文本的建议", - "感谢 @历山居士 反馈的获取自动配置容器脚本工具无法正常加载数据的问题", - "感谢 @Nick @奋斗ing 反馈的 2.1.0-2 的快捷方式故障", - "感谢 @俊生鹏程 反馈的 2.1.0-2 及以前版本在鲲鹏运行 wine 错误的问题并积极测试,以及组件安装工具在 arm 架构的异常", - "感谢 @云的眼泪 反馈的 2.1.0-2 更新死循环的问题,可见:https://bbs.deepin.org/post/243241,以及感谢 @神末shenmo @忘记、过去 和 @历山居士 的讨论", - "感谢 @186******75 反馈的 2.2.0 基于生态适配脚本打包器对话框异常的问题", - "感谢微信用户 @华为 @办公助手 @白水 @北冥没有鱼 @俊生鹏程 @^♀莫離♪^ @姚洪安 @гυи @杨飞 在 arm(飞腾/鲲鹏)架构上提供提供测试与帮助", - "感谢 @办公助手 提供的 2.4.0 打包器支持生成的 arm 架构 deb 包同时支持 UOS box86+exagear 的建议", - "", - "感谢统信在 Wine 生态适配活动中提供的打包脚本", - "也感谢 Deepin Wine 团体制作的 Deepin Wine 和对应的 Deepin Wine Tools,对本程序有很大的帮助", - "也感谢 DXVK 的开发者开发了 DXVK 这个程序,项目链接:https://github.com/doitsujin/dxvk", - "也感谢 WineHQ 开发团队开发的 WineHQ,项目网址:https://dl.winehq.org/", - "也感谢来自 Vek 的灵感和 Vek 开发者的支持,项目链接:https://jihulab.com/vk", - "最后也感谢支持本程序的用户和上传相关软件运行情况数据的用户,有你们的支持和使用,使这个程序变得更好", - "", - "可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的感谢!", - "如果上面有遗漏,请向我反馈补充" - ] -} \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/desktop/deepin-wine-runner-keyboard.desktop b/deb/opt/apps/deepin-wine-runner/key/desktop/deepin-wine-runner-keyboard.desktop deleted file mode 100755 index 1aba0c6..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/desktop/deepin-wine-runner-keyboard.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -X-Categories=System;Wine; -Exec=@programPath@/key-get.py -Icon=@programPath@/../deepin-wine-runner.svg -Name=Wine Runner -Name[zh]=Wine 运行器快捷键服务 -Terminal=false -StartupNotify=true -Keywords=exe;scr; diff --git a/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py b/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py deleted file mode 100755 index 13fe039..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys -import traceback -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -sys.path.append(f"{programPath}/..") - -import os -import sys -import json -import dbus -import threading -from UI.KeyAddGui import * -import PyQt5.QtWidgets as QtWidgets - -keyListDebianMap = [[], ["shift"], ["ctrl"], ["alt"], ["ctrl", "alt"], ["ctrl", "shift"], ["alt", "shift"]] -keyList = ["无快捷键", "shift", "ctrl", "alt", "ctrl+alt", "ctrl+shift", "alt+shift"] - -class Check: - def VersionCheck(): - try: - bus = dbus.SessionBus() - bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List() - #int("a") - return True - except: - print("无法检测到 Deepin/UOS 快捷键服务") - return False - def CheckThreading(): - if Check.VersionCheck(): - ui.startServer.setDisabled(True) - ui.stopServer.setDisabled(True) - ui.setAutoStart.setDisabled(True) - ui.setUnautoStart.setDisabled(True) - ui.editButton.setDisabled(True) - ui.keyBoardList.setDisabled(True) - ui.delectButton.setDisabled(True) - -def Clear(): - #ui.keyBoardList.model().removeRows(0, ui.keyBoardList.model().rowCount()) - - model = QtCore.QStringListModel(window) - try: - with open(f"{programPath}/list/KeyList.json", "r") as file: - lists = [] - for i in json.loads(file.read()): - #lists.append(f"{i[0]}({'+'.join(i[0: -1])}),{i[-1]}") - choice = i - #ui.localKeyboardChoose.setCurrentIndex(keyListDebianMap.index(choice[:-2])) - newList = [] - newList.append([keyListDebianMap.index(choice[:-2]), choice[-2]]) - # 解析命令 - command = choice[-1] - # 筛掉路径 - command = command[command[1:].index("'") + 2:].strip() - # 筛出其中一个快捷键 - newList.append([command[command.index(" ") - 1]]) - command = command[command.index(" ") + 2:] - # 读 exe - newList.insert(0, command[:command.index("'")]) - command = command[command.index("'") + 1: ].strip() - # 读最后的快捷键 - newList[2].insert(0, int(command)) - print(newList) - lists.append(f"{newList[0]}({'+'.join(keyListDebianMap[newList[1][0]])}+{newList[1][1]})=>({'+'.join(keyListDebianMap[newList[2][0]])}+{newList[2][1]})") - model.setStringList(lists) - ui.keyBoardList.setModel(model) - except: - traceback.print_exc() - -class Click: - def AddButton(): - os.system(f"'{programPath}/keyboard-add-gui.py'") - Clear() - - def EditButton(): - os.system(f"'{programPath}/keyboard-add-gui.py' {ui.keyBoardList.currentIndex().row()}") - Clear() - - def DeleteButton(): - try: - with open(f"{programPath}/list/KeyList.json", "r") as file: - lists = json.loads(file.read()) - del lists[ui.keyBoardList.currentIndex().row()] - with open(f"{programPath}/list/KeyList.json", "w") as file: - file.write(json.dumps(lists)) - Clear() - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - - -if __name__ == "__main__": - app = QtWidgets.QApplication(sys.argv) - window = QtWidgets.QMainWindow() - ui = Ui_MainWindow() - ui.setupUi(window) - # 连接槽 - ui.addButton.clicked.connect(Click.AddButton) - ui.editButton.clicked.connect(Click.EditButton) - ui.delectButton.clicked.connect(Click.DeleteButton) - ui.startServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"nohup '{programPath}/key-get.py' &"]).start()) - ui.stopServer.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop.sh'"]).start()) - ui.setAutoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/start-auto-server.sh'"]).start()) - ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"pkexec '{programPath}/stop-auto-server.sh'"]).start()) - window.show() - threading.Thread(target=Check.CheckThreading).start() - Clear() - sys.exit(app.exec_()) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/key-get.py b/deb/opt/apps/deepin-wine-runner/key/key-get.py deleted file mode 100755 index 7a0ecbb..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/key-get.py +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env python3 -######################### -# 版本:1.0.0 -# Python -######################### -import os -import sys -import time -import json -import threading -import traceback -import pynput.keyboard as keyboard -keyList = [] -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -keyChangeMap = [ - ["ctrl", keyboard.Key.ctrl], - ["alt", keyboard.Key.alt], - ["esc", keyboard.Key.esc], - ["enter", keyboard.Key.enter] -] -keyMap = [] -for i in os.listdir(f"{programPath}/list"): - print(i) - try: - file = open(f"{programPath}/list/{i}", "r") - keyMapTemp = json.loads(file.read()) - except: - print(f"{programPath}/list/{i} 读取失败!") - continue - for i in keyMapTemp: - keyMap.append(i) -for i in range(len(keyMap)): - for k in range(len(keyMap[i])): - for j in keyChangeMap: - if keyMap[i][k] == j[0]: - keyMap[i][k] = j[1] - continue - try: - keyMap[i][k] = keyMap[i][k].replace("{programPath}", programPath) - except: - pass - -print(keyList) -def on_press(key): - try: - if key.char in keyList: - # 重复的值就不认了,摊牌了 - return - keyList.append(key.char) - print(f'alphanumeric key {key.char} pressed') - except AttributeError: - keyList.append(key) - print(f'special key {key} pressed') - -def on_release(key): - print(f'{key} released') - try: - del keyList[keyList.index(key.char)] - except AttributeError: - del keyList[keyList.index(key)] - except: - traceback.print_exc() - -def ReadKey(): - next = False - for i in keyMap: - for k in range(0, len(i) - 1): - k = i[k] - if not k in keyList: - next = True - break - if not next: - # 执行命令 - os.system(i[-1]) - # 必须等待按键全部松开才行 - while len(keyList) != 0: - time.sleep(0.01) - - -def Read(): - while True: - ReadKey() - if os.path.exists("/tmp/deepin-wine-runner-keyboard-exit"): - # 移除文件 - try: - os.remove("/tmp/deepin-wine-runner-keyboard-exit") - except: - traceback.print_exc() - listener.stop() - break - time.sleep(0.01) - -# Lock 锁防止多次调用 -#if os.path.exists("/tmp/deepin-wine-runner-keyboard-lock"): -# print("不可多次调用") -# print("锁 /tmp/deepin-wine-runner-keyboard-lock 已存在") -# sys.exit(1) -#os.mknod("/tmp/deepin-wine-runner-keyboard-lock") -threading.Thread(target=Read).start() -with keyboard.Listener( - on_press=on_press, - on_release=on_release) as listener: - listener.join() -os.remove("/tmp/deepin-wine-runner-keyboard-lock") diff --git a/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py b/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py deleted file mode 100755 index a530cf0..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -sys.path.append(f"{programPath}/..") - -import os -import sys -import dbus -import json -import threading -import traceback -from UI.KeyAddKeyboardGui import * -import PyQt5.QtWidgets as QtWidgets - -keyList = ["无快捷键", "shift", "ctrl", "alt", "ctrl+alt", "ctrl+shift", "alt+shift"] -keyListDeepinMap = ["", "", " ", " ", " ", " ", " "] -keyListDebianMap = [[], ["shift"], ["ctrl"], ["alt"], ["ctrl", "alt"], ["ctrl", "shift"], ["alt", "shift"]] - -class Check: - def VersionCheck(): - try: - bus = dbus.SessionBus() - bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List() - #int("a") - return True - except: - print("无法检测到 Deepin/UOS 快捷键服务") - return False - -class Click: - def LocalValueChange(): - ui.wineKeyboardChoose.setCurrentIndex(ui.localKeyboardChoose.currentIndex()) - - def LocalKeyChange(): - ui.wineKey.setText(ui.localKey.text()) - - def AddButton(): - # 完整性检测 - if ui.exeName.text() == "" or ui.localKey.text() == "" or ui.wineKey.text() == "": - QtWidgets.QMessageBox.critical(window, "错误", "您的信息暂未填写完整") - return - if ui.localKey.text()[0] == " " or ui.wineKey.text()[0] == " ": - QtWidgets.QMessageBox.critical(window, "错误", "映射快捷键的第一位不能为空格") - return - # Deepin/UOS 的情况 - if Check.VersionCheck(): - # 接入 dbus - try: - bus = dbus.SessionBus() - bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").Add( - ui.exeName.text(), - f"'{programPath}/sendkeys.sh' {ui.wineKey.text()[0]} '{ui.exeName.text()}' {ui.wineKeyboardChoose.currentIndex()}", - f"{keyListDeepinMap[ui.localKeyboardChoose.currentIndex()]}{ui.localKey.text()[0]}" - ) - QtWidgets.QMessageBox.information(window, "提示", "添加成功!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - return - keyboardList = [] - if os.path.exists(f"{programPath}/list/KeyList.json"): - try: - with open(f"{programPath}/list/KeyList.json") as file: - keyboardList = json.loads(file.read()) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - return - print(keyboardList) - addList = [] - addList = keyListDebianMap[ui.localKeyboardChoose.currentIndex()][:] - print(keyListDebianMap) - print(addList) - addList.append(ui.localKey.text()[0]) - print(1, addList) - addList.append(f"'{programPath}/sendkeys.sh' {ui.wineKey.text()[0]} '{ui.exeName.text()}' {ui.wineKeyboardChoose.currentIndex()}") - print(2, addList) - print(addList) - try: - keyboardList[int(sys.argv[1])] = addList - except: - keyboardList.append(addList) - try: - with open(f"{programPath}/list/KeyList.json", "w") as file: - file.write(json.dumps(keyboardList)) - QtWidgets.QMessageBox.information(window, "提示", "添加成功!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - - -if __name__ == "__main__": - app = QtWidgets.QApplication(sys.argv) - window = QtWidgets.QMainWindow() - ui = Ui_MainWindow() - ui.setupUi(window) - # 添加选项 - ui.localKeyboardChoose.addItems(keyList) - ui.wineKeyboardChoose.addItems(keyList) - # 读取程序参数 - try: - with open(f"{programPath}/list/KeyList.json") as file: - keyboardList = json.loads(file.read()) - choice = keyboardList[int(sys.argv[1])] - ui.localKeyboardChoose.setCurrentIndex(keyListDebianMap.index(choice[:-2])) - ui.localKey.setText(choice[-2]) - # 解析命令 - command = choice[-1] - # 筛掉路径 - command = command[command[1:].index("'") + 2:].strip() - # 筛出其中一个快捷键 - ui.wineKey.setText(command[command.index(" ") - 1]) - command = command[command.index(" ") + 2:] - # 读 exe - ui.exeName.setText(command[:command.index("'")]) - command = command[command.index("'") + 1: ].strip() - # 读最后的快捷键 - ui.wineKeyboardChoose.setCurrentIndex(int(command)) - except: - pass - # 连接槽 - ui.addButton.clicked.connect(Click.AddButton) - ui.localKeyboardChoose.currentIndexChanged.connect(Click.LocalValueChange) - ui.localKey.textChanged.connect(Click.LocalKeyChange) - window.show() - #threading.Thread(target=Check.CheckThreading).start() - sys.exit(app.exec_()) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/list/KeyList.json b/deb/opt/apps/deepin-wine-runner/key/list/KeyList.json deleted file mode 100755 index fe51488..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/list/KeyList.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/deb/opt/apps/deepin-wine-runner/key/replace.py b/deb/opt/apps/deepin-wine-runner/key/replace.py deleted file mode 100755 index 9a11ac1..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/replace.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/python3 -import os -import sys -file = open(sys.argv[1], "r") -things = file.read().replace(sys.argv[2], sys.argv[3]) -file.close() -file = open(sys.argv[1], "w") -file.write(things) -file.close() \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/sendkeys.exe b/deb/opt/apps/deepin-wine-runner/key/sendkeys.exe deleted file mode 100755 index cf6d9de..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/key/sendkeys.exe and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/key/sendkeys.sh b/deb/opt/apps/deepin-wine-runner/key/sendkeys.sh deleted file mode 100755 index e45511c..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/sendkeys.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash - -# $1 key value -# $2 process name , default QQ|TIM -# $3 control mode , default ctrl+alt -# 0 no control key -# 1 shift+ -# 2 ctrl+ -# 3 alt+ -# 4 ctrl+alt+ -# 5 ctrl+shift+ -# 6 alt+shift+ - -SHELL_DIR=$(dirname $0) -SHELL_DIR=$(realpath "$SHELL_DIR") -if [ $SPECIFY_SHELL_DIR ]; then - SHELL_DIR=$SPECIFY_SHELL_DIR -fi - -get_wine_by_pid() -{ - cat /proc/$1/maps | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1 | awk '{print $6}' -} - -is_wine_process() -{ - wine_module=$(get_wine_by_pid $1) - if [ -z "$wine_module" ];then - wine_module=$(cat /proc/$1/maps | grep -E "\/wineserver$" | head -1) - fi - echo $wine_module -} - -get_prefix_by_pid() -{ - WINE_PREFIX=$(xargs -0 printf '%s\n' < /proc/$1/environ | grep WINEPREFIX) - WINE_PREFIX=${WINE_PREFIX##*=} - if [ -z "$WINE_PREFIX" ] && [ -n "$(is_wine_process $1)" ]; then - #不指定容器的情况用默认容器目录 - WINE_PREFIX="$HOME/.wine" - fi - WINE_PREFIX=$(realpath $WINE_PREFIX) - echo $WINE_PREFIX -} - -get_bottle_path_by_process_id() -{ - PID_LIST="$1" - PREFIX_LIST="" - - for pid_var in $PID_LIST ; do - WINE_PREFIX=$(get_prefix_by_pid $pid_var) - for path in $(echo -e $PREFIX_LIST) ; do - prefix=${path#*=} - if [ "$prefix" == "$WINE_PREFIX" ]; then - WINE_PREFIX="" - fi - done - if [ -n "$WINE_PREFIX" ];then - PREFIX_LIST+="\n$pid_var=$WINE_PREFIX" - fi - done - echo -e $PREFIX_LIST -} - -get_bottle_path_by_process_name() -{ - PID_LIST="" - for pid_var in $(ps -ef | grep -E -i "$1" | grep -v grep | awk '{print $2}');do - #通过判断是否加载wine来判断是不是wine进程 - if [ -n "$(is_wine_process $pid_var)" ];then - PID_LIST+=" $pid_var" - fi - done - get_bottle_path_by_process_id "$PID_LIST" -} - -send_to_process() -{ - if [ -z "$2" ]; then - return 0 - fi - - for path in $(get_bottle_path_by_process_name $2); do - proc_pid=${path%=*} - prefix=${path#*=} - wine_cmd=$(get_wine_by_pid $proc_pid) - wine_name=$(echo $wine_cmd | awk -F / '{print $(NF-2)}') - if command -v $wine_name > /dev/null 2>&1; then - wine_cmd="$wine_name" - fi - echo "send to $path by $wine_cmd" - - env WINEPREFIX="$prefix" "$wine_cmd" "$SHELL_DIR/sendkeys.exe" $1 $3 - done -} - -if [ -z "$1" ]; then - echo "Please input a key [a-zA-Z]" - exit 0 -fi - -if [ -n "$2" ]; then - send_to_process $1 $2 $3 -else - send_to_process $1 "QQ|TIM" -fi diff --git a/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh b/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh deleted file mode 100755 index 0e73207..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# 使用系统默认的 Bash -################################################################################################################# -# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢 -# 版本:2.4.0 -# 更新时间:2022年10月11日 -# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 -# 基于 Bash 制作 -################################################################################################################# -cd `dirname $0` -programPath=$(cd "$(dirname "$0")";pwd) -echo $programPath -if [[ -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then - # 判断是否自启动,已经自启动就不再考虑 - echo "文件已存在,取消" - exit 1 -fi -sudo cp -rv desktop/deepin-wine-runner-keyboard.desktop /etc/xdg/autostart/deepin-wine-runner-keyboard.desktop -sudo ./replace.py /etc/xdg/autostart/deepin-wine-runner-keyboard.desktop @programPath@ "$programPath" \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh b/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh deleted file mode 100755 index 5226cec..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# 使用系统默认的 Bash -################################################################################################################# -# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢 -# 版本:2.4.0 -# 更新时间:2022年10月11日 -# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 -# 基于 Bash 制作 -################################################################################################################# -programPath=$(cd "$(dirname "$0")";pwd) -cd `dirname $0` -echo $programPath -if [[ ! -f "/etc/xdg/autostart/deepin-wine-runner-keyboard.desktop" ]]; then - # 判断是否自启动,已经自启动就不再考虑 - echo "文件已存在,取消" - exit 1 -fi -sudo rm -rfv /etc/xdg/autostart/deepin-wine-runner-keyboard.desktop \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/stop.sh b/deb/opt/apps/deepin-wine-runner/key/stop.sh deleted file mode 100755 index 0397809..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/stop.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -touch /tmp/deepin-wine-runner-keyboard-exit \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/key/unlock.sh b/deb/opt/apps/deepin-wine-runner/key/unlock.sh deleted file mode 100755 index 85b1e54..0000000 --- a/deb/opt/apps/deepin-wine-runner/key/unlock.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -rm /tmp/deepin-wine-runner-keyboard-lock \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/kill.sh b/deb/opt/apps/deepin-wine-runner/kill.sh deleted file mode 100755 index bf729ff..0000000 --- a/deb/opt/apps/deepin-wine-runner/kill.sh +++ /dev/null @@ -1,278 +0,0 @@ -#!/bin/bash - -APP_NAME="QQ" -LOG_FILE=$0 -SHELL_DIR=$(dirname $0) -SHELL_DIR=$(realpath "$SHELL_DIR") -if [ $SPECIFY_SHELL_DIR ]; then - SHELL_DIR=$SPECIFY_SHELL_DIR -fi - -PUBLIC_DIR="/var/public" - -UsePublicDir() -{ - if [ -z "$USE_PUBLIC_DIR" ]; then - echo "Don't use public dir" - return 1 - fi - if [ ! -d "$PUBLIC_DIR" ];then - echo "Not found $PUBLIC_DIR" - return 1 - fi - if [ ! -r "$PUBLIC_DIR" ];then - echo "Can't read for $PUBLIC_DIR" - return 1 - fi - if [ ! -w "$PUBLIC_DIR" ];then - echo "Can't write for $PUBLIC_DIR" - return 1 - fi - if [ ! -x "$PUBLIC_DIR" ];then - echo "Can't excute for $PUBLIC_DIR" - return 1 - fi - - return 0 -} - -WINE_BOTTLE="$HOME/.deepinwine" - -if UsePublicDir;then - WINE_BOTTLE="$PUBLIC_DIR" -fi - -get_wine_by_pid() -{ - wine_path=$(cat /proc/$1/maps | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1 | awk '{print $6}') - if [ -z "$wine_path" ];then - cat /proc/$1/cmdline| xargs -0 -L1 -I{} echo {} | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1 - else - echo $wine_path - fi -} - -is_wine_process() -{ - wine_module=$(get_wine_by_pid $1) - if [ -z "$wine_module" ];then - wine_module=$(cat /proc/$1/maps | grep -E "\/wineserver$" | head -1) - fi - echo $wine_module -} - -get_prefix_by_pid() -{ - WINE_PREFIX=$(xargs -0 printf '%s\n' < /proc/$1/environ | grep WINEPREFIX) - WINE_PREFIX=${WINE_PREFIX##*=} - if [ -z "$WINE_PREFIX" ] && [ -n "$(is_wine_process $1)" ]; then - #不指定容器的情况用默认容器目录 - WINE_PREFIX="$HOME/.wine" - fi - if [ -n "$WINE_PREFIX" ];then - WINE_PREFIX=$(realpath $WINE_PREFIX) - echo $WINE_PREFIX - fi -} - -get_wineserver() -{ - if [ -z "$1" ];then - return - fi - targ_prefix=$(realpath $1) - ps -ef | grep wineserver | while read server_info ;do - debug_log_to_file "get server info: $server_info" - server_pid=$(echo $server_info | awk '{print $2}') - server_prefix=$(get_prefix_by_pid $server_pid) - debug_log_to_file "get server pid $server_pid, prefix: $server_prefix" - - if [ "$targ_prefix" = "$server_prefix" ];then - server=$(echo $server_info | awk '{print $NF}') - if [ "-p0" = "$server" ];then - server=$(echo $server_info | awk '{print $(NF-1)}') - fi - debug_log_to_file "get server $server" - echo $server - return - fi - done -} - -init_log_file() -{ - if [ -d "$DEBUG_LOG" ];then - LOG_DIR=$(realpath $DEBUG_LOG) - if [ -d "$LOG_DIR" ];then - LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log" - echo "" > "$LOG_FILE" - debug_log "LOG_FILE=$LOG_FILE" - fi - fi -} - -debug_log_to_file() -{ - if [ -d "$DEBUG_LOG" ];then - strDate=$(date) - echo -e "${strDate}:${1}" >> "$LOG_FILE" - fi -} - -debug_log() -{ - strDate=$(date) - echo "${strDate}:${1}" -} - -init_log_file - -get_bottle_path_by_process_id() -{ - PID_LIST="$1" - PREFIX_LIST="" - - for pid_var in $PID_LIST ; do - WINE_PREFIX=$(get_prefix_by_pid $pid_var) - #去掉重复项 - for path in $(echo -e $PREFIX_LIST) ; do - if [[ $path == "$WINE_PREFIX" ]]; then - WINE_PREFIX="" - fi - done - if [ -d "$WINE_PREFIX" ]; then - debug_log_to_file "found $pid_var : $WINE_PREFIX" - PREFIX_LIST+="\n$WINE_PREFIX" - fi - done - echo -e $PREFIX_LIST -} - -get_pid_by_process_name() -{ - PID_LIST="" - for pid_var in $(ps -ef | grep -E -i "$1" | grep -v grep | awk '{print $2}');do - #通过判断是否加载wine来判断是不是wine进程 - if [ -n "$(is_wine_process $pid_var)" ];then - PID_LIST+=" $pid_var" - fi - done - echo "$PID_LIST" -} - -get_bottle_path_by_process_name() -{ - PID_LIST=$(get_pid_by_process_name $1) - debug_log_to_file "get pid list: $PID_LIST" - get_bottle_path_by_process_id "$PID_LIST" -} - -get_bottle_path() -{ - if [ -z "$1" ];then - return 0 - fi - - if [ -f "$1/user.reg" ]; then - realpath "$1" - return 0 - fi - - if [ -f "$WINE_BOTTLE/$1/user.reg" ]; then - realpath "$WINE_BOTTLE/$1" - return 0 - fi - get_bottle_path_by_process_name "$1" -} - -kill_app() -{ - debug_log "try to kill $1" - for path in $(get_bottle_path $1); do - if [ -n "$path" ];then - WINESERVER=$(get_wineserver "$path") - - if [ -f "$WINESERVER" ];then - debug_log "kill $path by $WINESERVER" - env WINEPREFIX="$path" "$WINESERVER" -k - fi - - PID_LIST=$(get_pid_by_process_name "exe|wine") - for tag_pid in $PID_LIST; do - bottle=$(get_bottle_path_by_process_id "$tag_pid") - bottle=${bottle:1} - if [ "$path" = "$bottle" ];then - echo "kill $tag_pid for $bottle" - kill -9 $tag_pid - fi - done - fi - done - - #Kill defunct process - ps -ef | grep -E "$USER.*exe.* " - ps -ef | grep -E "$USER.*exe.* " | grep -v grep | awk '{print $2}' | xargs -i kill -9 {} -} - -get_tray_window() -{ - $SHELL_DIR/get_tray_window | grep window_id: | awk -F: '{print $2}' -} - -get_stacking_window() -{ - xprop -root _NET_CLIENT_LIST_STACKING | awk -F# '{print $2}' | sed -e 's/, / /g' -} - -get_window_pid() -{ - for winid in $(echo "$1" | sed -e 's/ /\n/g') ; - do - xprop -id $winid _NET_WM_PID | awk -F= '{print $2}' - done -} - -get_window_bottle() -{ - debug_log_to_file "get_window_bottle $1" - PID_LIST=$(get_window_pid "$1") - debug_log_to_file "get_window_bottle pid list: $PID_LIST" - get_bottle_path_by_process_id "$PID_LIST" -} - -get_active_bottles() -{ - TRAYWINDOWS=$(get_tray_window) - STACKINGWINDOWS=$(get_stacking_window) - debug_log_to_file "tray window id: $TRAYWINDOWS" - debug_log_to_file "stacking window id: $STACKINGWINDOWS" - PID_LIST="$TRAYWINDOWS $STACKINGWINDOWS" - get_window_bottle "$PID_LIST" -} - -kill_exit_block_app() -{ - TAGBOTTLE=$(get_bottle_path $1) - debug_log "tag bottle: $TAGBOTTLE" - ACTIVEBOTTLES=$(get_active_bottles) - debug_log "active bottles: $ACTIVEBOTTLES" - - if [[ "$ACTIVEBOTTLES" != *"$TAGBOTTLE"* ]]; then - kill_app "$TAGBOTTLE" - fi -} - -#get_active_bottles -#exit - -debug_log "kill $1 $2" - -if [ -n "$1" ]; then - APP_NAME="$1" -fi - -if [ "$2" = "block" ]; then - kill_exit_block_app $APP_NAME $3 -else - kill_app $APP_NAME -fi diff --git a/deb/opt/apps/deepin-wine-runner/launch.sh b/deb/opt/apps/deepin-wine-runner/launch.sh deleted file mode 100755 index 674905e..0000000 --- a/deb/opt/apps/deepin-wine-runner/launch.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -XDG_CURRENT_DESKTOP="Deepin" -$1 -platformtheme deepin "$@" diff --git a/deb/opt/apps/deepin-wine-runner/package-script.zip b/deb/opt/apps/deepin-wine-runner/package-script.zip deleted file mode 100755 index 7e0b555..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/package-script.zip and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/pardus-chroot b/deb/opt/apps/deepin-wine-runner/pardus-chroot deleted file mode 100755 index 7ae43f6..0000000 --- a/deb/opt/apps/deepin-wine-runner/pardus-chroot +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -set +e -DESTDIR="$1" -if [[ $UID -ne 0 ]] ; then - echo "You must be root!" - exit 1 -fi -if [[ -b "$1" ]] ; then - DESTDIR=$(mktemp -d) - mount "$1" "$DESTDIR" -fi -shift -if [[ "$DESTDIR" == "" || ! -f "$DESTDIR/etc/os-release" ]] ; then - echo "Target filesystem is invalid: $DESTDIR" - exit 1 -fi -mount --bind /dev "$DESTDIR/dev" -mount --bind /run "$DESTDIR/run" -mount --bind /media "$DESTDIR/media" -mount -t devpts devpts "$DESTDIR/dev/pts" -mount -t sysfs sysfs "$DESTDIR/sys" -mount -t proc proc "$DESTDIR/proc" -mount -t tmpfs tmpfs "$DESTDIR/dev/shm" -mount --bind /tmp "$DESTDIR/tmp" -if [[ -d /sys/firmware/efi/ ]] ; then - mount -t efivarfs efivarfs "$DESTDIR/sys/firmware/efi/efivars" -fi -#cat /etc/resolv.conf > $DESTDIR/etc/resolv.conf -#SHELL=/bin/bash unshare --fork --pid chroot "$DESTDIR" "$@" -#exit -# 下面的因为有问题,不使用 -#if [[ -d /sys/firmware/efi/ ]] ; then -# while umount "$DESTDIR/sys/firmware/efi/efivars" 2>/dev/null ; do : ;done -#fi -#for dir in dev/pts dev/shm dev sys proc run media ; do -# while umount "$DESTDIR/$dir" 2>/dev/null; do : ;done -#done -#umount -lf "$DESTDIR" 2>/dev/null diff --git a/deb/opt/apps/deepin-wine-runner/req/__init__.py b/deb/opt/apps/deepin-wine-runner/req/__init__.py deleted file mode 100755 index 935bb7c..0000000 --- a/deb/opt/apps/deepin-wine-runner/req/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# 此库用于实现 52 版不连接程序服务器(不再区分) -import requests - -unConnect = False -# 不再区分吾爱版 -#with open("/var/lib/dpkg/status", "r") as i: -# unConnect = "Package: spark-deepin-wine-runner-52" in open("/var/lib/dpkg/status", "r").read() -#if unConnect: -# print("52专版,将会无法连接服务器") - -class Respon: - text = "" - -def get(url, timeout=None): # -> requests.Response: - #if unConnect: - # 全部 Url 都拦截 - #raise Exception("52专版不支持连接服务器") - if timeout == None: - return requests.get(url) - return requests.get(url, timeout=timeout) - -def post(url, data, timeout=None): - #if unConnect: - # 全部 Url 都拦截 - # raise Exception("52专版不支持连接服务器") - if timeout == None: - return requests.post(url, data) - return requests.post(url, data, timeout=timeout) \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/sparkstore.list b/deb/opt/apps/deepin-wine-runner/sparkstore.list deleted file mode 100755 index 0563772..0000000 --- a/deb/opt/apps/deepin-wine-runner/sparkstore.list +++ /dev/null @@ -1 +0,0 @@ -deb [by-hash=force] https://d.store.deepinos.org.cn / diff --git a/deb/opt/apps/deepin-wine-runner/trans/__init__.py b/deb/opt/apps/deepin-wine-runner/trans/__init__.py deleted file mode 100644 index d86e5b8..0000000 --- a/deb/opt/apps/deepin-wine-runner/trans/__init__.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python3 -import os -import json -import requests -import traceback - -typeList = [ - "Auto", - "ZH_CN2JA", - "ZH_CN2KR", - "ZH_CN2EN" -] - -class Trans(): - isTrans = False - unCloudTrans = False - word = {} - fileName = "" - - def __init__(self, lang="zh_CN", fileName=f"trans.json") -> None: - self.fileName = fileName - self.isTrans = (lang != "zh_CN") - if self.isTrans: - try: - if not os.path.exists(fileName): - with open(fileName, "w") as file: - file.write("{}") - with open(fileName, "r") as file: - self.word = json.loads(file.read()) - except: - traceback.print_exc() - self.isTrans = False - - def transe(self, temp, text) -> str: - if not self.isTrans: - return text - try: - return self.word[text].replace("(", "(").replace(")", ")") - except: - if self.unCloudTrans: - return text - # 机翻 - data = { 'doctype': 'json', 'type': 'auto','i': text} - jsonReturn = requests.post("http://fanyi.youdao.com/translate", data=data).json()["translateResult"] - transText = "" - for i in jsonReturn: - print(i[0]) - transText += f'{i[0]["tgt"]}\n' - if "\n" in text: - transText = transText.replace("\n\n", "\n")[:-1] - else: - transText = transText[:-1] - self.word[text] = transText.replace("(", "(").replace(")", ")") - try: - with open(self.fileName, "w") as file: - file.write(json.dumps(self.word, ensure_ascii=False)) - except: - traceback.print_exc() - print(f"{text}=>{transText}") - return transText diff --git a/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-packager.json b/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-packager.json deleted file mode 100644 index 38a18e2..0000000 --- a/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-packager.json +++ /dev/null @@ -1 +0,0 @@ -{"浏览……": "Browse...", "打包……": "Packaging...", "安装打包完成的 deb……": "Install complete packaging deb...", "根据填写内容打包模板": "According to fill in the content packaging template", "打包容器 7z 包": "Packing container 7 z packages", "设置卸载该 deb 后自动删除该容器": "Set automatically deleted the container after unloading the deb", "使用统信 Wine 生态适配活动容器清理脚本": "Used series Wine container cleaning the ecological adaptation activities", "使用星火wine helper\n(如不勾选默认为deepin-wine-helper)": "Using the spark wine helper\n(if you don't check the default deepin - wine - helper)", "要打包的 deb 包的包名(※必填):": "To pack deb package package name (does required) :", "deb 包的版本号(※必填):": "Deb package version number (does required) :", "deb 包的说明(※必填):": "Deb package instructions (does required) :", "deb 包的维护者(※必填):": "Deb package maintainer (does required) :", "要解压的 wine 容器的名称(※必填):": "To extract the name of the wine containers (does required) :", "要打包的 wine 容器路径(※必填):": "To the wine packaging container path (does required) :", "wine 容器里需要运行的可执行文件路径(※必填):": "Wine containers need to run the executable file path (does required) :", "要显示的 .desktop 文件的分类(※必填):": "To display the desktop file classification (does required) :", "wine 容器里需要运行的可执行文件的参数:": "Wine containers need to run the executable file parameters:", "要显示的 .desktop 文件的名称(※必填):": "To display the desktop file name (does required) :", "要显示的 .desktop 文件的图标:": "The icon to display the desktop file:", "选择打包的 wine 版本(※必选):": "Choose the wine packaging version (does will choose) :", "打包 deb 的保存路径(※必填):": "Packaging deb save path (does required) :", "高级设置": "Advanced Settings", "deb 包的依赖(如无特殊需求默认即可)": "Deb package dependency (if there is no special requirements for the default)", "deb 包的推荐依赖(非强制,一般默认即可)": "Recommend relying on deb package (optional, generally the default)", "Wine 位数(只限本地需要打包集成的Wine):\n提示:32位的Wine不能使用64位容器": "Wine digits (only for local Wine packaging integration) :\nTip: 32-bit Wine 64 containers cannot be used", "deb 包选项:": "Deb package options:", "deb 的依赖(强制,如无特殊需求默认即可):": "Deb dependent (mandatory, such as no special requirements for the default) :", "deb 的推荐依赖(非强制,一般默认即可):": "Deb recommend relying on (optional, generally the default) :", "要显示的 .desktop 文件的 MimeType:": "To display the desktop MimeType file:", "打包 deb 架构:": "Packaging deb architecture:", "程序": "The program", "deb 包": "Deb package", "投稿到星火应用商店": "Contribute to spark the app store", "帮助": "help", "退出程序": "Exit the program", "只读取 Control 信息": "Only reads the Control information", "读取所有(需解包,时间较久)": "Read all (need to unpack, for a long time)", "从网页端投稿": "From the web", "使用投稿器投稿(推荐)": "Use contribute contributes (recommended)", "小提示": "tip", "Wine 运行器和 Wine 打包器傻瓜式使用教程(小白专用)\nBy @雁舞白沙": "Run Wine and Wine packaging machine fool tutorial (white)\nBy @ white goose dance", "提示:\n1、deb 打包软件包名要求:\n软件包名只能含有小写字母(a-z)、数字(0-9)、加号(+)和减号(-)、以及点号(.),软件包名最短长度两个字符;它必须以字母开头\n2、如果要填写路径,有“浏览……”按钮的是要填本计算机对应文件的路径,否则就是填写安装到其他计算机使用的路径\n3、输入 wine 的容器路径时最后面请不要输入“/”\n4、输入可执行文件的运行路径时是以“C:/XXX/XXX.exe”的格式进行输入,默认是以 C: 为开头,不用“\\”做命令的分隔,而是用“/”\n5、.desktop 的图标只支持 PNG 格式和 SVG 格式,其他格式无法显示图标\n6、路径建议不要带空格,容易出问题": "Tip:\nRequirements: 1, deb package package name\nPackage name can only contain lowercase letters (a-z), Numbers (0-9), plus sign (+) and minus (-) and dot (.), the package of the shortest length two characters;\n2, if you want to fill in the path, have \"browse...\n3, input the wine container path behind the please don't input \"/\"\n4, input the operation of the executable file path is \"C: / / XXX XXX. Exe format for input, the default is C: as the beginning, instead of a\" \\ \"do command space, with a\"/\"\n. 5, the desktop icon only supports the PNG format and SVG format, other format can not display icon\n6, the path with the blank space is not recommended, easy to a problem", "支持 png 和 svg 格式,不支持 ico 格式": "Support PNG or SVG format, the ico format is not supported", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用)\nBy @雁舞白沙": "Run Wine and Wine packaging machine fool tutorial (white)\nBy @ white goose dance", "6.5.50(随便填写或填写该软件的windows版本的版本号,6.5.50只是示例)。": "6.5.50 (literally fill out or fill in the Windows version of the software version number, 6.5.50 just sample).", "随便填写或使用该软件的windows版本的软件简介。": "Fill in or use the software freely introduction to the Windows version of the software.", "填写自己的网名,若是自用软件,不上架至应用商店,不进行后续维护,可随便填写。": "Fill in his name, if self-use software, not application stores to shop, not for the follow-up maintenance, can literally fill in.", "要打包的容器所在路径,也可以选择已经好打包的 7z 文件,一般自动带出": "To packaging containers in the path, also can choose the 7 z file has good packaging, general out automatically", "选择生成 deb 包所对应的架构": "Select generate deb package of the architecture", "清理容器无用内容,一般建议勾选,最新版本默认勾选,如果有特殊需求(如容器内有 mono、gecko 等)建议取消勾选": "Clean container useless content, general advice to check, check the latest version of the default, if you have special requirements, such as container with mono, gecko, etc.) suggest cancel the check", "生成 deb 包所需的依赖,一般情况下默认即可": "Generate deb package needed to rely on, normally the default", "生成 deb 包的推荐依赖,一般情况下为空即可": "Rely on the recommendation of generated deb package, usually is empty", "使用星火 dwine helper 替换 Deepin Wine Helper,投稿星火应用商店的话建议勾选,最新版本默认勾选(如果打包 arm 包将不会提供选择)": "Using the spark dwine helper to replace Deepin Wine helper, contribute the spark app store that if checked, the latest version of the default check (if packaging arm package will not provide choice)", "填写该软件的中文或英文名称。": "Fill in Chinese or English name of this software.", "图标只支持PNG格式和SVG格式,其他格式无法显示。": "Icon only supports the PNG format and SVG format, other format cannot be displayed.", "快捷方式的 MimeType 项,一般为空即可": "The MimeType, shortcut, as a general rule, be empty", "打包的 Wine 版本,根据实际情况选择(如果打包 arm 包将不会提供选择)": "Packaging Wine version, choose according to actual situation (if packaging arm package will not provide choice)", "打包出的 deb 生成的位置,一般自动生成": "Packaging deb generation of location, general automatically generated", "程序参数,如%u,一般不需要": "Process parameters, such as % u, generally do not need", "只打包容器生成 7z 包,不做其它操作": "Packaging containers generated 7 z package only, no other operation", "构建 deb 包目录,但不打包成 deb": "Build deb package directory, but it's not packaged into deb", "查看打包过程中命令返回内容": "Check the command returns the content in the process of packaging", "点击该按钮打包生成 deb": "Click this button to generate deb package", "调用默认的 deb 安装工具安装生成的 deb": "Calls the default installed deb tools generated deb", "禁用 Mono 和 Gecko 安装器": "Disable the Mono and Gecko installer"} \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-runner-qemu-download.json b/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-runner-qemu-download.json deleted file mode 100644 index 7b8b389..0000000 --- a/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-runner-qemu-download.json +++ /dev/null @@ -1 +0,0 @@ -{"更换源": "Change the source", "Gitlink 源(推荐)": "Gitlink source (recommended)", "备用源(只支持 IPv6 用户)": "The alternate source (only support IPv6 users)", "本地测试源(127.0.0.1)": "Local test source (127.0.0.1)", "使用前须知:\n1、Qemu 跨架构效率较低,如果有条件建议优先使用 box86、exagear 等效率较高的转换层;\n2、使用此方案需要使用到 Root 权限(需开启管理员模式)并安装 qemu-user-static;\n3、chroot 时候可能会出现问题导致程序闪退或异常,出现该问题重启电脑即可;\n4、在此环境使用 Wine 时,只能读取到您用户目录或本程序文件夹下的文件,其它路径无法读取;\n5、移除容器时请保证在这次打开电脑时没有调用过需要删除容器,如果有调用过建议重启电脑后再移除;\n6、暂时属于测试功能;": "Instructions before use:\n1, Qemu across architecture efficiency is low, if there is condition is preferred to use box86, exagear high efficiency transformation layer;\n2, use this program to need to use the Root administrator mode (open) and install qemu - user - static;\n3, when chroot flash back problems may cause the program or abnormal, the problems to restart the computer;\n4, in this environment using Wine, can only read your user directory or folder of the program files, other path cannot read;\n5, remove the container please make sure that no calls while in the open a computer need to delete the container, if there is a call after advice to restart the computer to remove;\n6, a temporary belong to test functionality;"} \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-runner.json b/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-runner.json deleted file mode 100644 index 112d2a6..0000000 --- a/deb/opt/apps/deepin-wine-runner/trans/deepin-wine-runner.json +++ /dev/null @@ -1 +0,0 @@ -{"快速启动": "Quick start", "请选择容器路径:": "Please select a container path:", "请选择要执行的程序(EXE、MSI或者命令):": "Please select the application that performs (EXE, MSI or command) :", "浏览": "browse", "请选择WINE版本:": "Please select a WINE version:", "高级功能": "Advanced features", "创建快捷方式(Desktop文件):": "Create a shortcut (Desktop file) :", "名称:": "Name:", "创建到桌面": "Create to the desktop", "创建到开始菜单": "Create to the start menu", "程序管理:": "Program management:", "提取图标": "Extract the icon", "窗口透明工具": "Transparent Windows tool", "卸载程序": "Uninstall program", "微型应用商店": "The micro app store", "获取该程序运行情况": "To get the program running situation", "检测静态下程序缺少DLL": "Test under static program lacks the DLL", "WINE配置:": "WINE configuration:", "配置容器": "Configuration of the container", "字体商店": "Font store", "RegShot": "RegShot", "星火wine配置": "The spark wine configuration", "自动/手动配置 Wine 容器": "Automatic/manual configuration Wine containers", "在此可以看到wine安装应用时的终端输出内容": "Here you can see the terminal output content of wine installation application", "运行程序": "To run the program", "终止程序": "To terminate the program", "终止指定容器的程序": "The designated container program", "程序(&P)": "Program (& P)", "安装 wine(&I)": "Install wine (& I)", "安装 wine(只限Deepin23 Preview)": "Install wine (only Deepin23 Preview)", "安装 wine(只限Deepin23 Alpha)": "Install wine (only Deepin23 Alpha)", "安装 WineHQ": "Install the WineHQ", "安装更多 Wine": "Install more Wine", "下载 Chroot 容器": "Download the Chroot container", "设置程序(&S)": "Setup (& S)", "清空软件历史记录(&C)": "Empty the software history (& C)", "清空软件缓存": "Empty the software cache", "删除程序组件": "Delete the component", "退出程序(&E)": "Exit the program (& E)", "Wine(&W)": "酒(易名)", "打开 Wine 容器目录": "Open the Wine container directory", "安装常见字体": "Common fonts installed", "安装自定义字体": "Install custom fonts", "删除选择的 Wine 容器": "Delete selected Wine vessel", "清理 Wine 容器(基于 Wine 适配活动脚本)": "Clean up the Wine containers (script) based on Wine adaptation activity", "Wine 快捷键映射": "Wine shortcut key mapping", "打包 wine 应用": "Wine packaging application", "使用官方 Wine 适配活动的脚本进行打包": "Using official script package Wine adaptation activities", "使用简易打包器进行打包(小白且无特殊需求建议使用这个)": "Using simple packaging machine for packaging (white and no special requirements for recommended this)", "从互联网获取DLL": "Get the DLL from the Internet", "从镜像获取DLL(只支持官方安装镜像,DOS内核如 Windows 95 暂不支持)": "Official from image acquisition DLL (only support the installation image, DOS kernel, such as Windows 95 temporary does not support)", "从 Geek Uninstaller 官网升级程序": "From the Geek Uninstaller website update", "删除部分 Wine 程序在启动器的快捷方式": "Delete some Wine program in a shortcut to the starter", "删除所有 Wine 程序在启动器的快捷方式": "Delete all Wine program in a shortcut to the starter", "在指定 Wine、容器安装组件": "In the designated Wine, container installation components", "在指定wine、指定容器安装 .net framework": "Container specified in the designated wine, install the.net framework", "在指定wine、指定容器安装 Visual Studio C++": "Specified in the designated wine, container install Visual Studio c + +", "在指定wine、指定容器安装 MSXML": "Install MSXML in designated wine, designated container", "在指定wine、指定容器安装 gecko": "In the designated wine, designated container installation gecko", "在指定wine、指定容器安装 mono": "Specified in the designated wine, container install mono", "在指定wine、指定容器安装 Visual Basic Runtime": "Container installation specified in the designated wine, Visual Basic Runtime", "在指定wine、指定容器安装其它运行库": "In the designated wine, designated container install other runtime", "在指定 Wine、容器运行基础应用": "In the designated Wine, container operation based applications", "打开指定wine、指定容器的控制面板": "Open the specified wine, the control panel of the specified container", "打开指定wine、指定容器的浏览器": "Open the specified wine, browser of the specified container", "打开指定wine、指定容器的注册表": "Open the specified wine, specify the registry of the vessel", "打开指定wine、指定容器的任务管理器": "Open the specified wine, specify the task manager of the vessel", "打开指定wine、指定容器的资源管理器": "Open the specified wine, specify the container resource manager", "打开指定wine、指定容器的关于 wine": "Open the specified wine, specify the vessel about wine", "设置 run_v3.sh 的文管为 Deepin 默认文管": "Set run_v3. Sh tube for Deepin tube by default", "设置 run_v3.sh 的文管为 Wine 默认文管": "Set run_v3. Sh tube for Wine tube by default", "重新安装 deepin-wine-helper": "Reinstall the deepin - wine - a helper", "使用winetricks打开指定容器": "Using winetricks open the specified container", "组件功能测试": "Component function test", "测试 Visual Basic 6 程序": "Test the Visual Basic 6 program", "测试 .net framework 程序": "Test the.net framework application", "测试 .net framework + Internet Explorer 程序": "Test the.net framework + Internet Explorer program", "启用/禁用功能": "Enable/disable function", "启用/禁用 opengl": "Enable/disable opengl", "开启 opengl": "Open the opengl", "禁用 opengl": "Disable the opengl", "安装/卸载 winbind": "Install/uninstall the winbind", "安装 winbind": "Install the winbind", "卸载 winbind": "Uninstall the winbind", "安装/卸载 DXVK": "Install/uninstall DXVK", "安装 DXVK": "Install DXVK", "卸载 DXVK": "Uninstall DXVK", "允许/禁止指定 wine 容器生成快捷方式": "Allowed/prohibited specified wine containers generated shortcuts", "允许指定 wine 容器生成快捷方式": "Allows you to specify wine containers generated shortcuts", "禁止指定 wine 容器生成快捷方式": "Designated wine containers generated shortcut is prohibited", "启用/禁用指定 wine 容器崩溃提示窗口": "Enable/disable specified wine containers collapse prompt window", "禁用指定 wine 容器崩溃提示窗口": "Disable specified wine containers collapse prompt window", "启用指定 wine 容器崩溃提示窗口": "Enable the specified wine containers collapse prompt window", "设置指定 Wine 容器代理": "Set the specified Wine vessel agent", "设置指定 wine 容器的代理": "Set the specified wine vessel agent", "禁用指定 wine 容器的代理": "Disable specified wine vessel agent", "函数顶替库列表": "Function library list", "导出函数顶替列表": "Export function list", "导入函数顶替列表": "The import function list", "编辑函数顶替库列表": "Edit function library list", "虚拟机(&V)": "The virtual machine (& V)", "使用 Virtualbox 虚拟机运行 Windows 应用": "Using Virtualbox virtual machine run Windows applications", "校验值计算(&S)": "Check value calculation (& S)", "MD5(&M)": "MD5(&M)", "SHA1(&M)": "SHA1(&M)", "Base64(建议小文件)(&B)": "Base64 (small files) proposed (& B)", "SHA256(&S)": "SHA256(谨此告知)", "SHA512(&S)": "SHA512(&S)", "云沙箱(&C)": "Cloud sandbox (& C)", "360 沙箱云": "360 the sandbox cloud", "微步云沙箱": "Micro step cloud sandbox", "VIRUSTOTAL": "VIRUSTOTAL", "日志(&L)": "Log (& L)", "查询 Dll": "Query the Dll", "日志分析": "Log analysis", "另存为日志": "Save as logs", "翻译日志(翻译后日志分析功能会故障)": "Translation log (translated will log analysis function failure)", "上传日志": "Upload the log", "容器(&C)": "The container (& C)", "解包 deb 提取容器": "Unpack the deb extraction container", "配置指定 Chroot 容器": "Configure Chroot container specified", "帮助(&H)": "Help (& H)", "查询程序在 Wine 的运行情况": "The operation of the query in the Wine", "程序官网": "The program's website", "小提示": "tip", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用) By 鹤舞白沙": "Run Wine and Wine packaging machine fool (white) By using the tutorial crane dancing baisha", "更新内容": "Update the content", "谢明名单": "Iv list", "更新这个程序": "Update the program", "反馈这个程序的建议和问题": "Suggestions and feedback on this procedure", "关于这个程序": "About this program", "关于 Qt": "On Qt", "作者个人站": "The author stood", "程序论坛": "BBS program", "Gitee": "Gitee", "Github": "Github", "Gitlink": "Gitlink", "Gitlab": "Gitlab", "极狐": "A fox", "程序 Wiki": "Program the Wiki", "视频教程": "Video tutorial", "更多生态适配应用": "More ecological adaptation", "运行 Android 应用:UEngine 运行器": "Run Android applications: UEngine runner", "选择 Wine 容器版本:": "Choose the Wine container version:", "wine DEBUG 信息输出:": "Wine the DEBUG information output:", "默认 Wine:": "The default Wine:", "默认 Wine 容器:": "The default Wine container:", "使用终端打开:": "Use terminal to open:", "自定义 wine 参数:": "Custom wine parameters:", "程序主题:": "Program topics:", "Wine 默认 Mono 和 Gecko 安装器:": "Wine default Mono and Gecko installer:", "忽略未安装的 Wine:": "Ignore the Wine not installed:", "下载缓存:": "Download cache:", "图标生成:": "Icon to generate:", "自动根据EXE名称生成路径:": "Automatically generated path according to EXE name:", "开启 DEBUG 输出": "Open the DEBUG output", "保存": "save", "测试(重启后变回设置的主题)": "The theme of the test (back after restart set)", "使用终端打开(deepin 终端)": "Use terminal open (deepin terminal)", "屏蔽 Wine 默认 Mono 和 Gecko 安装器": "Shielding Wine default Mono and Gecko installer", "不显示未检测到的 Wine": "Don't show the Wine not detected", "开启下载缓存": "Open the download cache", "本软件构建的图标后面添加容器名": "Add container name behind the software build icon", "自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启后生效)": "Automatic container path was generated according to the file name (open must by modifying the default after wine container path to specify other paths, to take effect after a restart)", "ISO镜像:": "ISO image:", "读取/挂载ISO镜像": "Read/mount the ISO image", "关闭/卸载ISO镜像": "Close/uninstall ISO image", "查找": "To find the", "保存到 wine 容器中": "Save the wine containers", "设置 wine 容器": "Set up the wine containers", "查找DLL\n(为空则代表不查找,\n将显示全部内容):": "Find the DLL\n(null represents not find,\nWill show all content) :", "提示:\n 目前本提取功能暂只支持 NT 内核系统的官方安装镜像,不支持读取 ghost 等第三方封装方式的安装镜像\n 以及不要拷贝/替换太多的 dll,否则可能会导致 wine 容器异常,以及不要替换 Wine 的核心 dll\n 最后,拷贝/替换 dll 后,建议点击下面“设置 wine 容器”按钮==》函数库 进行设置\n当前选择的 Wine 容器:/home/gfdgd_xi/.wine": "Tip:\nCurrently used to extract features of this temporary support only official installation image, NT kernel system does not support read ghost third party packaging approaches such as the installation image\nAnd don't copy/replace the DLL too much, otherwise it may cause the wine vessel abnormalities, and not to replace the wine at the core of the DLL\nFinally, after copy/replace the DLL, it is recommended that the click \"Settings\" wine containers below button = = \"function library to set\nThe currently selected Wine container: / home/gfdgd_xi /. Wine", "常见 Linux 发行版": "Common Linux distributions", " 提示:
\n1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错;\n2、wine 32 位和 64 位的容器互不兼容;\n3、所有的 wine 和 winetricks 均需要自行安装(可以从 菜单栏=>程序 里面进行安装);\n4、本程序支持带参数运行 wine 程序(之前版本也可以),只需要按以下格式即可:\nexe路径' 参数 '\n即可(单引号需要输入);\n5、wine 容器如果没有指定,则会默认为 ~/.wine;\n6、如果可执行文件比较大的话,会出现点击“获取该程序运行情况”出现假死的情况,因为正在后台读取 SHA1,只需要等一下即可(读取速度依照您电脑处理速度、读写速度、可执行文件大小等有关);\n7、对于非 X86 的用户来说,请不要使用本程序自带的 Wine 安装程序和 Windows 虚拟机安装功能(检测到为非 X86 架构会自动禁用);\n8、如果非 X86 的用户的 UOS 专业版用户想要使用的话,只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序;\n9、在使用 linglong 包的 Wine 应用时,必须安装至少一个 linglong 的使用 Wine 软件包才会出现该选项,\n而程序识别到的 Wine 是按 linglong 的使用 Wine 软件包名的字母排序第一个的 Wine,且生成的容器不在用户目录下,而是在容器的用户目录下(~/.deepinwine、/tmp、桌面、下载、文档等被映射的目录除外),\n同理需要运行的 EXE 也必须在被映射的目录内;\n10、如果是使用 Deepin 23 的 Wine 安装脚本,请切记——安装过程会临时添加 Deepin 20 的 apt 源,不要中断安装以及\n千万不要中断后不删除源的情况下 apt upgrade !!!中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可\n以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示;\nN: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。
": "< h4 > tip: < / h4 >\n1, use terminal run the program, you can see wine as well as the program itself hints and error;\n2, wine containers of 32-bit and 64 - bit incompatible;\n3, need to install in all types of wine and winetricks (available from the menu bar = > application for installation);\n4, a parameter with this program run wine program (previous version), you just need to in the following format:\nExe path 'parameters'\n(single quotes need to input);\n5, wine containers if not specified, will default to ~ /. Wine;\n6, if the executable file is large, there will be a click on the \"get the program running situation\" suspended animation, because reading SHA1 backstage, you just need to wait (read speed according to your computer processing speed, to read and write speed and the executable file size, etc).\n7, for non-x86 user, please do not use this program with the Wine of the installer and install Windows virtual machine function (detected for the X86 architecture will be automatically disabled);\n8, if users of non-x86 UOS pro users want to use, only need to install a Wine in the app store version WeChat can choose the right Wine in the this program to run the program;\nSeptember and, when it is applied in Wine of linglong package must be installed at least one linglong using this option, Wine package will start\nAnd procedures to identify the Wine is according to the use of linglong Wine package name alphabetical order the first Wine, and generate the container is not in the user directory, but the user directory in the container (~ /. Deepinwine, / TMP, desktop, download, and document except mapped directory).\nSimilarly need to run the EXE also must be mapped directory;\n10, if is to use Deepin 23 Wine install script, please bear in mind - the installation process will temporarily add Deepin 20 apt source, installation and don't interrupt\nDon't delete after < b > don't interrupt source under the condition of apt upgrade!!!!!!\nAnd 100% can use this script installed Wine cannot be guaranteed, and the side effect is prompt;\n< code > N: since the warehouse 'https://community-packages.deepin.com/beige beige InRelease' does not support 'i386 architecture, skip the configuration file' main/binary - i386 / Packages' acquisition.", "※1、支持使用 Qemu + Chroot 跨运行 Wine 以及指定程序的功能;\n※2、提供了简易打包器以用于打包简易 deb;\n※3、支持下载配置过的 Qemu + Chroot 容器;\n※4、支持解压指定 deb 的内打包好的容器;\n5、优化 Wine 列表显示;\n6、优化非基于生态适配脚本的打包器内容自动填充功能;\n7、新增程序论坛和教程入口;\n8、优化程序文案\n": "※ 1 support using Qemu + Chroot run across the Wine and the function of the designated procedures;\n※ 2 provides a simple packaging machine for packaging simple deb;\n※ 3 support download Qemu + Chroot container configuration before;\n※ 4 support decompression specified deb packed in containers;\n5, optimization of Wine list;\n6, an optimization based on the ecological adaptation that pack the script content automatically filled function;\n7, new procedures BBS and tutorial entry;\n8, optimization of procedure document", "确定": "determine", "Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序,内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。
\n它同时还内置了基于VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作。
\n\n\n一个图形化了如下命令的程序(最简单格式)\nenv WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
\n让你可以简易方便的使用 wine": "< p > Wine runner is a could make Linux users more convenient to run Windows application program, with built-in support for Wine graphical, all kinds of Wine packaging tools, homemade Wine program and runtime installation tools, etc.\n< p > it also has a built-in based on VirtualBox, meant for use by small white Windows virtual machine installation tools, can simply download the system image and click install, do not need to consider the installation of the virtual machine, such as creating, partition operation.\n\nA graphical the program of the following commands (the simplest format)\n< code > env WINEPREFIX = wine container path (path) of wine executable file path < / code >\nLet the wine you can easy to use", "简易使用教程": "Simple to use the tutorial", "打包教程": "Packaging tutorial", "※1、支持使用 Qemu + Chroot 跨运行 Wine 以及指定程序的功能;\n※2、提供了简易打包器以用于打包简易 deb;\n※3、支持下载配置过的 Qemu + Chroot 容器;\n※4、支持解压指定 deb 的内打包好的容器;\n5、优化 Wine 列表显示;\n6、优化非基于生态适配脚本的打包器内容自动填充功能;\n7、新增程序论坛和教程入口;\n8、优化程序文案;\n9、新增日志翻译功能;\n10、程序进一步完善英语翻译(机翻);\n11、优化程序更新策略;\n": "※ 1 support using Qemu + Chroot run across the Wine and the function of the designated procedures;\n※ 2 provides a simple packaging machine for packaging simple deb;\n※ 3 support download Qemu + Chroot container configuration before;\n※ 4 support decompression specified deb packed in containers;\n5, optimization of Wine list;\n6, an optimization based on the ecological adaptation that pack the script content automatically filled function;\n7, new procedures BBS and tutorial entry;\n8, optimization copywriting program;\n9, new log function;\n10, program, we will further improve the English translation (machine);\n11, optimization program update strategy;", "更新(更新后需要自行手动重启程序)": "Need to manually restart the program after update (update)", "检查更新": "Check the update", "※1、支持使用 Qemu + Chroot 跨运行 Wine 以及指定程序的功能;\n※2、提供了简易打包器以用于打包简易 deb;\n※3、支持下载配置过的 Qemu + Chroot 容器;\n※4、支持解压指定 deb 的内打包好的容器;\n※5、优化 Wine 列表显示;\n※6、新增程序论坛和教程入口;\n7、优化非基于生态适配脚本的打包器内容自动填充功能;\n8、优化程序文案;\n9、新增日志翻译功能;\n10、程序进一步完善英语翻译(机翻);\n11、优化程序更新策略;\n12、新增程序评分功能。\n": "※ 1 support using Qemu + Chroot run across the Wine and the function of the designated procedures;\n※ 2 provides a simple packaging machine for packaging simple deb;\n※ 3 support download Qemu + Chroot container configuration before;\n※ 4 support decompression specified deb packed in containers;\n※ 5 optimize Wine list;\n※ 6 new BBS and tutorial entrance program;\n7, an optimization based on ecological adaptation that pack the script content automatically filled function;\n8, optimization copywriting program;\n9, new log function;\n10, program, we will further improve the English translation (machine);\n11, optimization program update strategy;\n12, new scoring function.", "程序评分": "Program ratings", "※1、支持使用 Qemu + Chroot 跨运行 Wine 以及指定程序的功能;\n※2、提供了简易打包器以用于打包简易 deb;\n※3、支持下载配置过的 Qemu + Chroot 容器;\n※4、支持解压指定 deb 的内打包好的容器;\n※5、优化 Wine 列表显示;\n※6、新增程序论坛和教程入口;\n7、优化非基于生态适配脚本的打包器内容自动填充功能;\n8、优化程序文案;\n9、新增日志翻译功能;\n10、程序进一步完善英语翻译(机翻);\n11、优化程序更新策略;\n12、优化日志分析功能;\n13、新增程序评分功能。\n": "※ 1 support using Qemu + Chroot run across the Wine and the function of the designated procedures;\n※ 2 provides a simple packaging machine for packaging simple deb;\n※ 3 support download Qemu + Chroot container configuration before;\n※ 4 support decompression specified deb packed in containers;\n※ 5 optimize Wine list;\n※ 6 new BBS and tutorial entrance program;\n7, an optimization based on ecological adaptation that pack the script content automatically filled function;\n8, optimization copywriting program;\n9, new log function;\n10, program, we will further improve the English translation (machine);\n11, optimization program update strategy;\n12, optimization of log analysis function;\n13, the new scoring function.", "获取程序公告": "Access to program announcement", "※1、支持使用 Qemu + Chroot 跨运行 Wine 以及指定程序的功能;\n※2、提供了简易打包器以用于打包简易 deb;\n※3、支持下载配置过的 Qemu + Chroot 容器;\n※4、支持在隔离的 Chroot 容器内运行 Wine;\n※5、支持解压指定 deb 的内打包好的容器;\n※6、优化 Wine 列表显示;\n※7、新增程序论坛和教程入口;\n※8、程序公告功能;\n※9、新增程序评分功能;\n※10、新增解包 deb 内 Wine 容器功能;\n※11、新增 Vkd3d Proton 安装功能,更新 dxvk 版本至 2.0.0;\n※12、新增程序菜单栏部分栏目图标;\n13、优化非基于生态适配脚本的打包器内容自动填充功能;\n14、优化程序文案;\n15、新增日志翻译功能;\n16、程序进一步完善英语翻译(机翻);\n17、优化程序更新策略;\n18、优化日志分析功能;\n19、优化程序 UI。": "※ 1 support using Qemu + Chroot run across the Wine and the function of the designated procedures;\n※ 2 provides a simple packaging machine for packaging simple deb;\n※ 3 support download Qemu + Chroot container configuration before;\n※ 4 support running in isolated Chroot container Wine;\n※ 5 support decompression specified deb packed in containers;\n※ 6 optimize Wine list;\n※ 7 new BBS and tutorial entrance program;\n※ 8 program announcement function;\n※ 9 new program grading function;\n※ 10 new unpacking deb Wine containers within the function;\n※ 11 new Vkd3d Proton installation function, update DXVK version to 2.0.0;\n※ 12 new program menu bar section column icon;\n13, an optimization based on the ecological adaptation that pack the script content automatically filled function;\n14, optimization copywriting program;\n15, new log function;\n16, program, we will further improve the English translation (machine);\n17, optimization program update strategy;\n18, optimization of log analysis function;\n19, optimization program UI.", "快捷方式管理工具": "Shortcut management tools", "run_v3.sh 管理": "Run_v3. Sh management", "安装/卸载 Vkd3d": "Install/uninstall Vkd3d", "安装 Vkd3d": "Install Vkd3d", "卸载 Vkd3d": "Uninstall Vkd3d", "启用/禁止指定 wine 容器生成快捷方式": "Enable/designated wine containers generated shortcut is prohibited", "启用/禁止指定 wine 容器创建文件关联": "Enable/designated wine containers to create file associations is prohibited", "允许指定 wine 容器创建文件关联": "Allows you to specify wine containers to create file associations", "禁止指定 wine 容器创建文件关联": "Designated wine containers to create file associations is prohibited", "※1、不基于生态适配脚本打包器支持禁用 Mono/Gecko 打包器;\n※2、自动容器配置脚本新增命令 decompressionbottle、programforum、installmsi 以及上述命令的帮助;\n※3、自动容器配置脚本新增评论功能;\n※4、自动容器配置脚本新增许多应用安装脚本;\n※5、安装 Windows 虚拟机功能更换应答镜像图标并添加常用 Windows 组件安装功能;\n※6、安装 Windows 虚拟机功能提供镜像下载的网盘链接;\n※7、简易打包器支持自动添加宋体;\n8、修复 installfont 命令下载的字体目录错误问题;\n9、修复提交日志功能在提交成功时依旧提示提交失败问题;\n10、支持强制启用所有被禁用的组件(不推荐)。\n": "※ 1 is not based on the ecological adaptation that packaging script support disabled Mono/Gecko packaging;\n※ 2 automatic container configuration script command new decompressionbottle, programforum, installmsi and the help of the above command;\n※ 3 container configuration script automatically add comments;\n※ 4 automatic container configuration script increased many application installation script;\n※ may install Windows virtual machine function change response mirror icon and add commonly used Windows component installation function;\n※ 6 install Windows virtual machine provides network backup image download links;\n※ 7 simple packaging machine support automatically add song typeface.\n8, repair installfont command to download the font directory error problem;\n9, repair the commit log function in submit success still prompt submit failure problem;\n10, support force enable all disabled components (not recommended).", "强制启用所有被禁用的组件(不推荐)": "Forced to enable all disabled components (not recommended)", "鸣谢名单": "Thanks to the list", "此为最新版本,无需更新": "This is the latest version, do not need to update", "※1、Windows 应用适配工具新增系统资源显示;\n※2、修复打包器(基于官方生态适配脚本)无法打开的问题;\n※3、新增运行库功能安装,以实现使用 Qemu User 跨架构运行 Wine 的功能;\n※4、修复 Chroot 容器的一些问题;\n※5、修复在 Debian11 安装时缺失依赖 rar 的问题;\n※6、新增安装 box86、box64 的功能;\n7、修改程序内的部分网址;\n8、作者信息变更;\n": "※ 1 new system resources display Windows application adapter tools;\n※ 2 repair packaging machine (official script) ecological adaptation based unable to open the problem;\n※ 3 new runtime features installed, in order to realize the use Qemu User across architecture operation function of Wine;\nDoes 4 problems, repair the Chroot containers.\n※ 5 repair when Debian11 installed on missing rar problem;\n※ 6, new installation box86 box64 function;\nPart of the site within seven, modify the program;\n8, the author information changes;", "运行库": "The runtime", "安装 Qemu User": "Install Qemu User", "运行库 s390x": "The runtime s390x", "运行库 amd64": "The runtime amd64", "运行库 arm64": "The runtime arm64", "运行库 armhf": "The runtime armhf", "运行库 ppc64el": "The runtime ppc64el", "运行库 i386": "The runtime i386", "运行库 riscv64": "The runtime riscv64", "运行库 mips64el": "The runtime mips64el", "※1、Windows 应用适配工具新增系统资源显示;\n※2、修复打包器(基于官方生态适配脚本)无法打开的问题;\n※3、新增运行库功能安装,以实现使用 Qemu User 跨架构运行 Wine 的功能;\n※4、修复 Chroot 容器的一些问题;\n※5、修复在 Debian11 安装时缺失依赖 rar 的问题;\n※6、新增安装 box86、box64 的功能;\n7、修改程序内的部分网址;\n8、作者信息变更;\n9、支持禁用程序的多语言支持(默认禁用,因为是机翻的);\n10、支持在程序本地翻译缺失的情况下自动机翻缺失语句;\n": "※ 1 new system resources display Windows application adapter tools;\n※ 2 repair packaging machine (official script) ecological adaptation based unable to open the problem;\n※ 3 new runtime features installed, in order to realize the use Qemu User across architecture operation function of Wine;\nDoes 4 problems, repair the Chroot containers.\n※ 5 repair when Debian11 installed on missing rar problem;\n※ 6, new installation box86 box64 function;\nPart of the site within seven, modify the program;\n8, the author information changes;\n9, support multiple language support to disable the program (disabled by default, because it is a machine);\n10, lack of support in the application of local translation of automata over missing statement;", "※1、Windows 应用适配工具新增系统资源显示;\n※2、修复打包器(基于官方生态适配脚本)无法打开的问题;\n※3、新增运行库功能安装,以实现使用 Qemu User 跨架构运行 Wine 的功能;\n※4、修复 Chroot 容器的一些问题;\n※5、修复在 Debian11 安装时缺失依赖 rar 的问题;\n※6、新增安装 box86、box64 的功能;\n7、修改程序内的部分网址;\n8、作者信息变更;\n9、支持禁用程序的多语言支持(默认禁用,因为是机翻的);\n10、支持在程序本地翻译缺失的情况下自动机翻缺失语句;\n11、从此版本开始不再区分吾爱版、Spark 版和 UOS 版\n": "※ 1 new system resources display Windows application adapter tools;\n※ 2 repair packaging machine (official script) ecological adaptation based unable to open the problem;\n※ 3 new runtime features installed, in order to realize the use Qemu User across architecture operation function of Wine;\nDoes 4 problems, repair the Chroot containers.\n※ 5 repair when Debian11 installed on missing rar problem;\n※ 6, new installation box86 box64 function;\nPart of the site within seven, modify the program;\n8, the author information changes;\n9, support multiple language support to disable the program (disabled by default, because it is a machine);\n10, lack of support in the application of local translation of automata over missing statement;\n11, the beginning of a version no longer distinguish between my love edition version, Spark and UOS edition", "安装 Box86": "Install Box86", "安装 s390x 运行库": "Install s390x runtime", "卸载 s390x 运行库": "Uninstall s390x runtime", "安装 amd64 运行库": "Install the amd64 runtime", "卸载 amd64 运行库": "Uninstall amd64 runtime", "安装 arm64 运行库": "Install arm64 runtime", "卸载 arm64 运行库": "Uninstall arm64 runtime", "安装 armhf 运行库": "Install armhf runtime", "卸载 armhf 运行库": "Uninstall armhf runtime", "安装 ppc64el 运行库": "Install ppc64el runtime", "卸载 ppc64el 运行库": "Uninstall ppc64el runtime", "安装 i386 运行库": "Install i386 runtime", "卸载 i386 运行库": "Uninstall i386 runtime", "安装 riscv64 运行库": "Install riscv64 runtime", "卸载 riscv64 运行库": "Uninstall riscv64 runtime", "安装 mips64el 运行库": "Install mips64el runtime", "卸载 mips64el 运行库": "Uninstall mips64el runtime", "Qemu + Chroot 挂载用户目录:": "Qemu + Chroot mount user directory:", "程序翻译:": "Program translation:", "自动根据文件名生成容器路径(开启后必须通过修改默认wine容器路径才可指定其它路径,重启程序后生效)": "Automatic container path was generated according to the file name (open must by modifying the default after wine container path to specify other paths, to take effect after a restart the program)", "使用 Qemu + Chroot 时不挂载用户目录并与系统隔离(修改后重启操作系统生效)": "Don't mount when using Qemu + Chroot user directory and from the system (modified restart your operating system)", "禁用程序界面翻译": "To disable the program interface translation"} \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/updatekiller.py b/deb/opt/apps/deepin-wine-runner/updatekiller.py deleted file mode 100755 index 0b280c0..0000000 --- a/deb/opt/apps/deepin-wine-runner/updatekiller.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python3 -import sys -import os -import atexit - -PIDFILE = '/tmp/deepin-wine-runner.pid' - -#程序结束时清理pid -@atexit.register -def remove_pid(): - with open(PIDFILE) as pidfile: - pidlst = pidfile.readlines() - pidlst.remove(str(PID)+'\n') - with open(PIDFILE,'w') as pidfile: - pidfile.writelines(pidlst) - -#更新时结束进程 -def main(): - for i in open(PIDFILE): - try: - os.kill(int(i),15) - except ProcessLookupError: - pass - os.remove(PIDFILE) - -#当该程序被直接执行时,执行结束进程操作。如果是导入的形式,则只是记录pid -if __name__ == '__main__': - sys.exit(main()) -else: - #获取进程pid,用于更新时结束进程 - PID = os.getpid() - with open(PIDFILE,'a') as pidfile: - print(PID,file=pidfile) #使用print可以在行末输出换行符,而且可以省去类型转换 diff --git a/deb/opt/apps/deepin-wine-runner/vkd3d-proton.7z b/deb/opt/apps/deepin-wine-runner/vkd3d-proton.7z deleted file mode 100644 index a9cde62..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/vkd3d-proton.7z and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/wine install b/deb/opt/apps/deepin-wine-runner/wine install deleted file mode 100755 index 0043f9a..0000000 --- a/deb/opt/apps/deepin-wine-runner/wine install +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python3 -# 使用系统默认的 python3 运行 -########################################################################################### -# 作者:gfdgd xi -# 版本:2.0.1 -# 更新时间:2022年07月08日 -# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序 -# 基于 Python3 的 tkinter 构建 -########################################################################################### -################# -# 引入所需的库 -################# -import os - -################### -# 程序功能 -################### -print(''' -m m " -# # # mmm m mm mmm -" #"# # # #" # #" # - ## ##" # # # #"""" - # # mm#mm # # "#mm" - - -''') -print("请保证你能有 root 权限以便安装") -print("如果有请按回车,否则按 [Ctrl+C] 退出", end=' ') -input() -os.system("sudo apt update") -print("请问是否要更新操作系统?[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - os.system("sudo apt upgrade -y") -print("请问是否要安装原版 wine(wine64)?[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - os.system("sudo apt install wine -y") -print("请问是否要安装 deepin-wine?[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - os.system("sudo apt install deepin-wine -y") -print("请问是否要安装 deepin-wine5(需要添加星火应用商店的源)?[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - if os.path.exists("/etc/apt/sources.list.d/sparkstore.list"): - os.system("sudo apt install deepin-wine5 -y") - os.system("sudo touch /etc/apt/sources.list.d/sparkstore.list") - os.system("echo 'deb [by-hash=force] https://d.store.deepinos.org.cn/ /' | sudo tee '/etc/apt/sources.list.d/sparkstore.list'") - os.system("mkdir -p /tmp/spark-store-install") - os.system("wget -O /tmp/spark-store-install/spark-store.asc https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc") - os.system("cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg") - os.system("apt update -o Dir::Etc::sourcelist=\"sources.list.d/sparkstore.list\" -o Dir::Etc::sourceparts=\"-\" -o APT::Get::List-Cleanup=\"0\"") - os.system("sudo apt update") - os.system("sudo apt install deepin-wine5 -y") -print("请问是否要安装 deepin-wine5-stable?[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - os.system("sudo apt install deepin-wine5-stable -y") -print("请问是否要安装 deepin-wine6-stable?[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - os.system("sudo apt install deepin-wine6-stable -y") -print("请问是否要安装 spark-wine7-devel?(需要添加星火应用商店的源)[Y/N]", end=' ') -choose = input().upper() -if not choose == "N": - if os.path.exists("/etc/apt/sources.list.d/sparkstore.list"): - os.system("sudo apt install spark-wine7-devel -y") - os.system("sudo touch /etc/apt/sources.list.d/sparkstore.list") - os.system("echo 'deb [by-hash=force] https://d.store.deepinos.org.cn/ /' | sudo tee '/etc/apt/sources.list.d/sparkstore.list'") - os.system("mkdir -p /tmp/spark-store-install") - os.system("wget -O /tmp/spark-store-install/spark-store.asc https://d.store.deepinos.org.cn/dcs-repo.gpg-key.asc") - os.system("cp -f /tmp/spark-store-install/spark-store.asc.gpg /etc/apt/trusted.gpg.d/spark-store.gpg") - os.system("apt update -o Dir::Etc::sourcelist=\"sources.list.d/sparkstore.list\" -o Dir::Etc::sourceparts=\"-\" -o APT::Get::List-Cleanup=\"0\"") - os.system("sudo apt update") - os.system("sudo apt install spark-wine7-devel -y") -print("全部完成!") \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/wine/.qmake.stash b/deb/opt/apps/deepin-wine-runner/wine/.qmake.stash deleted file mode 100755 index 6cab99c..0000000 --- a/deb/opt/apps/deepin-wine-runner/wine/.qmake.stash +++ /dev/null @@ -1,24 +0,0 @@ -QMAKE_CXX.QT_COMPILER_STDCXX = 201402L -QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 8 -QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3 -QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0 -QMAKE_CXX.COMPILER_MACROS = \ - QT_COMPILER_STDCXX \ - QMAKE_GCC_MAJOR_VERSION \ - QMAKE_GCC_MINOR_VERSION \ - QMAKE_GCC_PATCH_VERSION -QMAKE_CXX.INCDIRS = \ - /usr/include/c++/8 \ - /usr/include/x86_64-linux-gnu/c++/8 \ - /usr/include/c++/8/backward \ - /usr/lib/gcc/x86_64-linux-gnu/8/include \ - /usr/local/include \ - /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed \ - /usr/include/x86_64-linux-gnu \ - /usr/include -QMAKE_CXX.LIBDIRS = \ - /usr/lib/gcc/x86_64-linux-gnu/8 \ - /usr/lib/x86_64-linux-gnu \ - /usr/lib \ - /lib/x86_64-linux-gnu \ - /lib diff --git a/deb/opt/apps/deepin-wine-runner/wine/Makefile b/deb/opt/apps/deepin-wine-runner/wine/Makefile deleted file mode 100755 index fa2bc21..0000000 --- a/deb/opt/apps/deepin-wine-runner/wine/Makefile +++ /dev/null @@ -1,505 +0,0 @@ -############################################################################# -# Makefile for building: installwine -# Generated by qmake (3.1) (Qt 5.15.3) -# Project: ../wine-source/wineinstall.pro -# Template: app -# Command: /usr/lib/qt5/bin/qmake -o Makefile ../wine-source/wineinstall.pro -############################################################################# - -MAKEFILE = Makefile - -EQ = = - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -CFLAGS = -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES) -CXXFLAGS = -pipe -O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC $(DEFINES) -INCPATH = -I../wine-source -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -QMAKE = /usr/lib/qt5/bin/qmake -DEL_FILE = rm -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p -COPY = cp -f -COPY_FILE = cp -f -COPY_DIR = cp -f -R -INSTALL_FILE = install -m 644 -p -INSTALL_PROGRAM = install -m 755 -p -INSTALL_DIR = cp -f -R -QINSTALL = /usr/lib/qt5/bin/qmake -install qinstall -QINSTALL_PROGRAM = /usr/lib/qt5/bin/qmake -install qinstall -exe -DEL_FILE = rm -f -SYMLINK = ln -f -s -DEL_DIR = rmdir -MOVE = mv -f -TAR = tar -cf -COMPRESS = gzip -9f -DISTNAME = installwine1.0.0 -DISTDIR = /home/gfdgd_xi/Desktop/deep-wine-runner/wine/.tmp/installwine1.0.0 -LINK = g++ -LFLAGS = -Wl,-O1 -LIBS = $(SUBLIBS) /usr/lib/x86_64-linux-gnu/libQt5Widgets.so /usr/lib/x86_64-linux-gnu/libQt5Gui.so /usr/lib/x86_64-linux-gnu/libQt5Network.so /usr/lib/x86_64-linux-gnu/libQt5Core.so -lGL -lpthread -AR = ar cqs -RANLIB = -SED = sed -STRIP = strip - -####### Output directory - -OBJECTS_DIR = ./ - -####### Files - -SOURCES = ../wine-source/main.cpp \ - ../wine-source/mainwindow.cpp \ - ../wine-source/downloadthread.cpp moc_mainwindow.cpp \ - moc_downloadthread.cpp -OBJECTS = main.o \ - mainwindow.o \ - downloadthread.o \ - moc_mainwindow.o \ - moc_downloadthread.o -DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkit.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \ - ../wine-source/.qmake.stash \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \ - ../wine-source/wineinstall.pro ../wine-source/mainwindow.h \ - ../wine-source/downloadthread.h ../wine-source/main.cpp \ - ../wine-source/mainwindow.cpp \ - ../wine-source/downloadthread.cpp -QMAKE_TARGET = installwine -DESTDIR = -TARGET = installwine - - -first: all -####### Build rules - -installwine: ui_mainwindow.h $(OBJECTS) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) - -Makefile: ../wine-source/wineinstall.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkit.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf \ - .qmake.stash \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf \ - /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf \ - ../wine-source/wineinstall.pro - $(QMAKE) -o Makefile ../wine-source/wineinstall.pro -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/unix.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/linux.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/sanitize.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/gcc-base-unix.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-base.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/g++-unix.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KSyntaxHighlighting.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_accessibility_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_concurrent_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_core_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dbus_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_designer.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_egl_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfs_kms_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eglfsdeviceintegration_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_eventdispatcher_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fb_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_fontdatabase_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_glx_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_gui_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_help.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_input_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_kms_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_linuxaccessibility_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimedia.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_multimediawidgets.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_network_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_opengl_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_platformcompositor_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_printsupport_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qml.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlmodels.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmltest.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_qmlworkerscript.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quick.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_quickwidgets.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_service_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_sql_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_svg.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_testlib_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_theme_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkit.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_widgets_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_x11extras.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xcb_qpa_lib_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xkbcommon_support_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xml_private.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_xmlpatterns.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_functions.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt_config.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qmake.conf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_post.prf: -.qmake.stash: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exclusive_builds.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/toolchain.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_pre.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resolve_config.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/default_post.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/warn_on.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qt.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources_functions.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/resources.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/moc.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/opengl.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/uic.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/unix/thread.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/qmake_use.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/file_copies.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/testcase_targets.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/exceptions.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/yacc.prf: -/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/lex.prf: -../wine-source/wineinstall.pro: -qmake: FORCE - @$(QMAKE) -o Makefile ../wine-source/wineinstall.pro - -qmake_all: FORCE - - -all: Makefile installwine - -dist: distdir FORCE - (cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR) - -distdir: FORCE - @test -d $(DISTDIR) || mkdir -p $(DISTDIR) - $(COPY_FILE) --parents $(DIST) $(DISTDIR)/ - $(COPY_FILE) --parents /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp $(DISTDIR)/ - $(COPY_FILE) --parents ../wine-source/mainwindow.h ../wine-source/downloadthread.h $(DISTDIR)/ - $(COPY_FILE) --parents ../wine-source/main.cpp ../wine-source/mainwindow.cpp ../wine-source/downloadthread.cpp $(DISTDIR)/ - $(COPY_FILE) --parents ../wine-source/mainwindow.ui $(DISTDIR)/ - - -clean: compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) *~ core *.core - - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) .qmake.stash - -$(DEL_FILE) Makefile - - -####### Sub-libraries - -mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all - -check: first - -benchmark: first - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_moc_predefs_make_all: moc_predefs.h -compiler_moc_predefs_clean: - -$(DEL_FILE) moc_predefs.h -moc_predefs.h: /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp - g++ -pipe -O2 -std=gnu++11 -Wall -Wextra -dM -E -o moc_predefs.h /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/dummy.cpp - -compiler_moc_header_make_all: moc_mainwindow.cpp moc_downloadthread.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc_mainwindow.cpp moc_downloadthread.cpp -moc_mainwindow.cpp: ../wine-source/mainwindow.h \ - moc_predefs.h \ - /usr/lib/qt5/bin/moc - /usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/wine/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/wine-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../wine-source/mainwindow.h -o moc_mainwindow.cpp - -moc_downloadthread.cpp: ../wine-source/downloadthread.h \ - moc_predefs.h \ - /usr/lib/qt5/bin/moc - /usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/wine/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/wine-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../wine-source/downloadthread.h -o moc_downloadthread.cpp - -compiler_moc_objc_header_make_all: -compiler_moc_objc_header_clean: -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: ui_mainwindow.h -compiler_uic_clean: - -$(DEL_FILE) ui_mainwindow.h -ui_mainwindow.h: ../wine-source/mainwindow.ui \ - /usr/lib/qt5/bin/uic - /usr/lib/qt5/bin/uic ../wine-source/mainwindow.ui -o ui_mainwindow.h - -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_predefs_clean compiler_moc_header_clean compiler_uic_clean - -####### Compile - -main.o: ../wine-source/main.cpp ../wine-source/mainwindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o ../wine-source/main.cpp - -mainwindow.o: ../wine-source/mainwindow.cpp ../wine-source/mainwindow.h \ - ui_mainwindow.h \ - ../wine-source/downloadthread.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o ../wine-source/mainwindow.cpp - -downloadthread.o: ../wine-source/downloadthread.cpp ../wine-source/downloadthread.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o downloadthread.o ../wine-source/downloadthread.cpp - -moc_mainwindow.o: moc_mainwindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp - -moc_downloadthread.o: moc_downloadthread.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_downloadthread.o moc_downloadthread.cpp - -####### Install - -install_target: first FORCE - @test -d $(INSTALL_ROOT)/opt/installwine/bin || mkdir -p $(INSTALL_ROOT)/opt/installwine/bin - $(QINSTALL_PROGRAM) $(QMAKE_TARGET) $(INSTALL_ROOT)/opt/installwine/bin/$(QMAKE_TARGET) - -$(STRIP) $(INSTALL_ROOT)/opt/installwine/bin/$(QMAKE_TARGET) - -uninstall_target: FORCE - -$(DEL_FILE) $(INSTALL_ROOT)/opt/installwine/bin/$(QMAKE_TARGET) - -$(DEL_DIR) $(INSTALL_ROOT)/opt/installwine/bin/ - - -install: install_target FORCE - -uninstall: uninstall_target FORCE - -FORCE: - diff --git a/deb/opt/apps/deepin-wine-runner/wine/installwine b/deb/opt/apps/deepin-wine-runner/wine/installwine deleted file mode 100755 index 5025205..0000000 --- a/deb/opt/apps/deepin-wine-runner/wine/installwine +++ /dev/null @@ -1,394 +0,0 @@ -#!/usr/bin/env python3 -# 本来是用C++写的,但在非deepin/UOS编译/运行就是下载不了https文件,只能用python重写 -######################################################################### -# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布 -# 版本:2.4.0 -# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序 -# 基于 Python3 的 PyQt5 构建 -######################################################################### -################# -# 引入所需的库 -################# -import os -import shutil -import random -import sys -import json -import traceback -import requests -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -sys.path.append(f"{programPath}/../") -from Model import * -from PyQt5 import QtCore, QtGui, QtWidgets -programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string -# UI 布局(自动生成) -class Ui_MainWindow(object): - def setupUi(self, MainWindow): - MainWindow.setObjectName("MainWindow") - MainWindow.resize(693, 404) - self.centralWidget = QtWidgets.QWidget(MainWindow) - self.centralWidget.setObjectName("centralWidget") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralWidget) - self.verticalLayout_2.setContentsMargins(11, 11, 11, 11) - self.verticalLayout_2.setSpacing(6) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.horizontalLayout_2 = QtWidgets.QHBoxLayout() - self.horizontalLayout_2.setSpacing(6) - self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.localWineList = QtWidgets.QListView(self.centralWidget) - self.localWineList.setObjectName("localWineList") - self.horizontalLayout_2.addWidget(self.localWineList) - self.verticalLayout = QtWidgets.QVBoxLayout() - self.verticalLayout.setSpacing(6) - self.verticalLayout.setObjectName("verticalLayout") - spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout.addItem(spacerItem) - self.addButton = QtWidgets.QPushButton(self.centralWidget) - self.addButton.setObjectName("addButton") - self.verticalLayout.addWidget(self.addButton) - self.delButton = QtWidgets.QPushButton(self.centralWidget) - self.delButton.setObjectName("delButton") - self.verticalLayout.addWidget(self.delButton) - spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) - self.verticalLayout.addItem(spacerItem1) - self.horizontalLayout_2.addLayout(self.verticalLayout) - self.internetWineList = QtWidgets.QListView(self.centralWidget) - self.internetWineList.setObjectName("internetWineList") - self.horizontalLayout_2.addWidget(self.internetWineList) - self.verticalLayout_2.addLayout(self.horizontalLayout_2) - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setSpacing(6) - self.horizontalLayout.setObjectName("horizontalLayout") - self.unzip = QtWidgets.QCheckBox(self.centralWidget) - self.unzip.setObjectName("unzip") - self.horizontalLayout.addWidget(self.unzip) - self.deleteZip = QtWidgets.QCheckBox(self.centralWidget) - self.deleteZip.setChecked(True) - self.deleteZip.setTristate(False) - self.deleteZip.setObjectName("deleteZip") - self.horizontalLayout.addWidget(self.deleteZip) - self.addOtherWine = QtWidgets.QPushButton(self.centralWidget) - self.horizontalLayout.addWidget(self.addOtherWine) - spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem2) - self.verticalLayout_2.addLayout(self.horizontalLayout) - MainWindow.setCentralWidget(self.centralWidget) - # 菜单栏 - _translate = QtCore.QCoreApplication.translate - self.menu = MainWindow.menuBar() - self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源")) - self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)")) - self.kgithubAction = QtWidgets.QAction(_translate("MainWindow", "KGithub 源")) - self.ipv6Action = QtWidgets.QAction(_translate("MainWindow", "Github 源1(国内访问不稳定)")) - self.githubAction = QtWidgets.QAction(_translate("MainWindow", "Github 源2(国内访问不稳定)")) - - self.localAction = QtWidgets.QAction(_translate("MainWindow", "本地测试源(127.0.0.1)")) - self.changeSources.addAction(self.gitlinkAction) - self.changeSources.addAction(self.kgithubAction) - self.changeSources.addAction(self.ipv6Action) - self.changeSources.addAction(self.githubAction) - self.changeSources.addAction(self.localAction) - for i in [self.gitlinkAction, self.ipv6Action, self.localAction, self.kgithubAction, self.githubAction]: - i.setCheckable(True) - self.gitlinkAction.setChecked(True) - self.changeSourcesGroup = QtWidgets.QActionGroup(MainWindow) - self.changeSourcesGroup.addAction(self.gitlinkAction) - self.changeSourcesGroup.addAction(self.kgithubAction) - self.changeSourcesGroup.addAction(self.ipv6Action) - self.changeSourcesGroup.addAction(self.githubAction) - self.changeSourcesGroup.addAction(self.localAction) - - self.retranslateUi(MainWindow) - QtCore.QMetaObject.connectSlotsByName(MainWindow) - - def retranslateUi(self, MainWindow): - _translate = QtCore.QCoreApplication.translate - MainWindow.setWindowTitle(_translate("MainWindow", "下载 Wine")) - self.addButton.setText(_translate("MainWindow", "<<")) - self.delButton.setText(_translate("MainWindow", ">>")) - self.unzip.setText(_translate("MainWindow", "不解压Wine资源文件")) - self.deleteZip.setText(_translate("MainWindow", "删除下载的资源包,只解压保留(两个选项都选相互抵消)")) - self.addOtherWine.setText(_translate("MainWindow", "导入自己的Wine")) - -def ReadLocalInformation(): - try: - global localJsonList - file = open(f"{programPath}/winelist.json", "r") - localJsonList = json.loads(file.read()) - nmodel = QtGui.QStandardItemModel(window) - for i in localJsonList: - item = QtGui.QStandardItem(i) - nmodel.appendRow(item) - ui.localWineList.setModel(nmodel) - file.close() - except: - print("新建空列表") - try: - with open(f"{programPath}/winelist.json", "w") as file: - file.write("[]") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - -def InstallOtherWine(): - path = QtWidgets.QFileDialog.getOpenFileName(window, "选择 Wine", os.getenv("~"), "wine(wine);;wine64(wine64);;全部文件(*.*)") - if path[0] == "" or not path[1]: - return - try: - # 写入配置文件 - rfile = open(f"{programPath}/winelist.json", "r") - list = json.loads(rfile.read()) - rfile.close() - # 创建映射 - name = os.path.basename(os.path.dirname(os.path.dirname(path[0]))) - if name == "" or name == None: - name = f"useradd-wine-{random.randint(0, 99999)}" - #binPath = os.path.dirname(os.path.dirname(path[0])) - os.makedirs(f"{programPath}/{name}/bin") - if os.system(f"ln -s '{path[0]}' '{programPath}/{name}/bin/wine'") != 0: - QtWidgets.QMessageBox.critical(window, "新建wine映射失败") - # C++ 版注释:不直接用 readwrite 是因为不能覆盖写入 - file = open(f"{programPath}/winelist.json", "w") - list.append(name) - file.write(json.dumps(list)) - file.close() - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - ReadLocalInformation() - -def ChangeSources(): - global urlSources - global internetWineSource - sources = [ui.gitlinkAction, ui.kgithubAction, ui.ipv6Action, ui.githubAction, ui.localAction] - for i in range(0, len(sources)): - if sources[i].isChecked(): - urlSources = internetWineSourceList[i] - internetWineSource = internetWineSourceList[i] - # 读取信息 - ReadLocalInformation() - ReadInternetInformation() - break - print(urlSources) - -# 下面内容均翻译自 C++ 版本 -def ReadInternetInformation(): - global internetJsonList - # C++ 版本是用 curl 的,考虑到 Python 用 requests 反而方便,于是不用 curl - try: - internetJsonList = json.loads(requests.get(f"{internetWineSource}/information.json").text) - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", "无法连接服务器!") - return - nmodel = QtGui.QStandardItemModel(window) - for i in internetJsonList: - item = QtGui.QStandardItem(i[0]) - nmodel.appendRow(item) - ui.internetWineList.setModel(nmodel) - -class DownloadThread(QtCore.QThread): - MessageBoxInfo = QtCore.pyqtSignal(str) - MessageBoxError = QtCore.pyqtSignal(str) - ChangeDialog = QtCore.pyqtSignal(QtWidgets.QProgressDialog, int, int, int) - Finish = QtCore.pyqtSignal() - def __init__(self, progressDialog: QtWidgets.QProgressDialog, - url: str, savePath: str, fileName: str, view: QtWidgets.QListView, deleteZip: bool, - unzip: bool, localList) -> None: - self.dialog = progressDialog - self.fileUrl = url - self.fileSavePath = savePath - self.fileSaveName = fileName - self.localView = view - self.downloadDeleteZip = deleteZip - self.downloadUnzip = unzip - self.localJsonList = localList - super().__init__() - - def ReadLocalInformation(self): - global localJsonList - try: - file = open(f"{programPath}/winelist.json", "r"); - nmodel = QtGui.QStandardItemModel() - localJsonList = json.loads(file.read()) - for i in localJsonList: - nmodel.appendRow(QtGui.QStandardItem(i)) - self.localView.setModel(nmodel) - file.close() - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - - def run(self): - try: - # 创建文件夹 - dir = QtCore.QDir() - savePath = f"{programPath}/{self.fileSaveName}" - # 文件下载 - timeout = 0 - f = requests.get(self.fileUrl, stream=True) - allSize = int(f.headers["content-length"]) # 文件总大小 - bytesRead = 0 - with open(savePath, "wb") as filePart: - for chunk in f.iter_content(chunk_size=1024): - if chunk: - #progressbar.update(int(part / show)) - filePart.write(chunk) - bytesRead += 1024 - self.ChangeDialog.emit(self.dialog, int(bytesRead / allSize * 100), int(bytesRead / 1024 / 1024), int(allSize / 1024 / 1024)) - # 写入配置文件 - rfile = open(f"{programPath}/winelist.json", "r") - list = json.loads(rfile.read()) - rfile.close() - # C++ 版注释:不直接用 readwrite 是因为不能覆盖写入 - file = open(f"{programPath}/winelist.json", "w") - list.append(self.fileSaveName.replace(".7z", "")) - file.write(json.dumps(list)) - file.close() - # 读取配置文件 - self.ReadLocalInformation() - self.localJsonList = list - # 解压文件 - shellCommand = "" - if self.downloadUnzip: - path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}" - shellCommand += f"""mkdir -p \"{path}\" -7z x -y \"{savePath}\" -o\"{path}\" -""" - if self.downloadDeleteZip: - shellCommand += f"rm -rf \"{savePath}\"\n" - shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w") - shellFile.write(shellCommand) - shellFile.close() - #process = QtCore.QProcess() - #command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"] - #process.start(f"{programPath}/../launch.sh", command) - #process.waitForFinished() - OpenTerminal("bash /tmp/depein-wine-runner-wine-install.sh") - self.Finish.emit() - except: - traceback.print_exc() - self.MessageBoxError.emit(traceback.format_exc()) - -def MessageBoxInfo(info): - QtWidgets.QMessageBox.information(window, "提示", info) - -def MessageBoxError(info): - QtWidgets.QMessageBox.critical(window, "错误", info) - -def ChangeDialog(dialog: QtWidgets.QProgressDialog, value, downloadBytes, totalBytes): - dialog.setValue(value) - dialog.setLabelText(f"{downloadBytes}MB/{totalBytes}MB") - -def DownloadFinish(): - ui.centralWidget.setEnabled(True) - -class QT: - thread = None - -def on_addButton_clicked(): - choose = ui.internetWineList.currentIndex().row() - if choose < 0: - QtWidgets.QMessageBox.information(window, "提示", "您未选中任何项,无法继续") - return - downloadName = internetJsonList[choose][1] - ReadLocalInformation() - for i in localJsonList: - if i == internetJsonList[choose][0]: - QtWidgets.QMessageBox.information(window, "提示", "您已经安装了这个Wine了!无需重复安装!") - return - if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2): - ui.deleteZip.setChecked(False) - ui.unzip.setChecked(False) - #downloadUrl = internetWineSource + downloadName - if "://" in downloadName: - downloadUrl = downloadName - else: - downloadUrl = internetWineSource + downloadName - dialog = QtWidgets.QProgressDialog() - cancel = QtWidgets.QPushButton("取消") - cancel.setDisabled(True) - dialog.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg")) - dialog.setCancelButton(cancel) - dialog.setWindowTitle(f"正在下载“{internetJsonList[choose][0]}”") - QT.thread = DownloadThread( - dialog, - downloadUrl, - "", - internetJsonList[choose][1], - ui.localWineList, - ui.deleteZip.isChecked(), - not ui.unzip.isChecked(), - localJsonList - ) - QT.thread.MessageBoxInfo.connect(MessageBoxInfo) - QT.thread.MessageBoxError.connect(MessageBoxError) - QT.thread.ChangeDialog.connect(ChangeDialog) - QT.thread.Finish.connect(DownloadFinish) - ui.centralWidget.setDisabled(True) - QT.thread.start() - -def on_delButton_clicked(): - if QtWidgets.QMessageBox.question(window, "提示", "你确定要删除吗?") == QtWidgets.QMessageBox.No: - return - if ui.localWineList.currentIndex().row() < 0: - QtWidgets.QMessageBox.information(window, "提示", "您未选择任何项") - return - try: - name = f"{programPath}/{localJsonList[ui.localWineList.currentIndex().row()]}" - dir = QtCore.QDir(name) - dir.removeRecursively() - QtCore.QFile.remove(name + ".7z") - del localJsonList[ui.localWineList.currentIndex().row()] - file = open(f"{programPath}/winelist.json", "w") - file.write(json.dumps(localJsonList)) - file.close() - ReadLocalInformation() - QtWidgets.QMessageBox.information(window, "提示", "删除成功!") - except: - traceback.print_exc() - QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) - -# 获取当前语言 -def get_now_lang()->"获取当前语言": - return os.getenv('LANG') - -if __name__ == "__main__": - localJsonList = [] - internetJsonList = [] - internetWineSourceList = [ - "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/", - "https://kgithub.com/gfdgd-xi/wine-mirrors-websize/raw/master/", - "http://wine.wine-runner.gfdgdxi.top/", - "https://github.com/gfdgd-xi/wine-mirrors-websize/raw/master/", - "http://127.0.0.1/wine-mirrors/" # 本地测试源 - ] - internetWineSource = internetWineSourceList[0] - app = QtWidgets.QApplication(sys.argv) - # 读取翻译 - if not get_now_lang() == "zh_CN.UTF-8": - trans = QtCore.QTranslator() - trans.load(f"{programPath}/../LANG/installwine-en_US.qm") - app.installTranslator(trans) - # 窗口构建 - window = QtWidgets.QMainWindow() - ui = Ui_MainWindow() - window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg")) - ui.setupUi(window) - window.show() - # 连接信号 - ui.addButton.clicked.connect(on_addButton_clicked) - ui.delButton.clicked.connect(on_delButton_clicked) - ui.addOtherWine.clicked.connect(InstallOtherWine) - ui.changeSourcesGroup.triggered.connect(ChangeSources) - ## 加载内容 - # 设置列表双击不会编辑 - ui.localWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - ui.internetWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) - # 读取信息 - ReadLocalInformation() - ReadInternetInformation() - # 图标 - ui.centralWidget.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg")) - - app.exec_() \ No newline at end of file diff --git a/deb/opt/apps/deepin-wine-runner/wrestool b/deb/opt/apps/deepin-wine-runner/wrestool deleted file mode 100755 index 9838510..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/wrestool and /dev/null differ diff --git a/deb/opt/apps/deepin-wine-runner/窗体透明度设置工具.exe b/deb/opt/apps/deepin-wine-runner/窗体透明度设置工具.exe deleted file mode 100755 index b5c4756..0000000 Binary files a/deb/opt/apps/deepin-wine-runner/窗体透明度设置工具.exe and /dev/null differ diff --git a/package-script.zip b/package-script.zip deleted file mode 100644 index 7e0b555..0000000 Binary files a/package-script.zip and /dev/null differ diff --git a/package-script/information.json b/package-script/information.json index 612eea6..761e71d 100755 --- a/package-script/information.json +++ b/package-script/information.json @@ -1,5 +1,5 @@ { - "Version": "3.2.1", + "Version": "3.2.2", "Time": "未知", "Thank": [ "感谢 RacoonGX 的付出与贡献",