mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-05-23 08:29:50 +08:00
快捷键功能GUI初步
This commit is contained in:
parent
7a56a66f6c
commit
6d7cfc87bd
Makefilepackage-script.zip
__pycache__
deb
DEBIAN
opt/apps/deepin-wine-runner
API
AutoConfig.pyAutoShell/command
ConfigLanguareRunner-help.jsonConfigLanguareRunner.pyModel/__pycache__
UI
deepin-wine-packager.pydeepin-wine-runnerpackage-script.zipusr/lib/python3/dist-packages
key
UI
AutoConfig.pyAutoConfig.uiKeyAddGui.pyKeyAddGui.uiKeyAddKeyboardGui.pyKeyAddKeyboardGui.ui
__pycache__
desktop
key-add-gui.pykey-get.pykeyboard-add-gui.pylist
replace.pystart-auto-server.shstop-auto-server.sh
2
Makefile
2
Makefile
@ -63,6 +63,8 @@ build:
|
||||
cp -rv UI/*.py deb/opt/apps/deepin-wine-runner/UI
|
||||
cp -rv InstallDll.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Model deb/opt/apps/deepin-wine-runner
|
||||
cp -rv API deb/opt/apps/deepin-wine-runner
|
||||
cp -rv key
|
||||
dpkg -b deb spark-deepin-wine-runner.deb
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
Package: spark-deepin-wine-runner-52
|
||||
Version: 2.3.0
|
||||
Package: spark-deepin-wine-runner
|
||||
Version: 2.4.0
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢
|
||||
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner, https://github.com/gfdgd-xi/deep-wine-runner, https://gitlink.org.cn/gfdgd_xi/deep-wine-runner
|
||||
Architecture: all
|
||||
|
54
deb/opt/apps/deepin-wine-runner/API/Python/__init__.py
Normal file
54
deb/opt/apps/deepin-wine-runner/API/Python/__init__.py
Normal file
@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.4.0
|
||||
# 更新时间:2022年10月15日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 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 ConfigLanguareRunner
|
||||
class Old:
|
||||
wine = ""
|
||||
wineprefix = ""
|
||||
def __init__(self, wine = "", wineprefix = "") -> None:
|
||||
self.wine = os.getenv("WINE") if wine == "" else wine
|
||||
self.wineprefix = os.getenv("WINEPREFIX") if wine == "" else wineprefix
|
||||
|
||||
def runCommand(self, command: str) -> None:
|
||||
com = ConfigLanguareRunner.Command(command)
|
||||
print(com.GetCommandList())
|
||||
return com.Run(com.GetCommandList(), self.wineprefix, self.wine)
|
||||
|
||||
def runList(self, command: list) -> None:
|
||||
return ConfigLanguareRunner.Command("").Run(command, self.wineprefix, self.wine)
|
||||
|
||||
class Bash:
|
||||
wine = ""
|
||||
wineprefix = ""
|
||||
def __init__(self, wine = "", wineprefix = "") -> None:
|
||||
self.wine = os.getenv("WINE") if wine == "" else wine
|
||||
self.wineprefix = os.getenv("WINEPREFIX") if wine == "" else wineprefix
|
||||
|
||||
def runCommand(self, command: str) -> int:
|
||||
return os.system(f"'{programPath}/../../AutoShell/main.py' -c \"{command}\"")
|
||||
|
||||
def runList(self, command: list) -> int:
|
||||
commandStr = ""
|
||||
for k in command:
|
||||
for i in k:
|
||||
commandStr += f"'{i}' "
|
||||
commandStr += ";"
|
||||
return os.system(f"'{programPath}/../../AutoShell/main.py' -c \"{commandStr}\"")
|
Binary file not shown.
3
deb/opt/apps/deepin-wine-runner/API/demo/a.py
Normal file
3
deb/opt/apps/deepin-wine-runner/API/demo/a.py
Normal file
@ -0,0 +1,3 @@
|
||||
import WineRunner
|
||||
WineRunner.Bash("a").runList([["thank"], ["version"]])
|
||||
#WineRunner.Bash("a").runCommand("thank")
|
@ -33,7 +33,7 @@ class Connect:
|
||||
return
|
||||
for i in lists:
|
||||
# 显示筛选的内容
|
||||
if ui.searchThings.text() in i[0]:
|
||||
if ui.searchThings.text().upper() in i[0].upper():
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
|
||||
|
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/installvb
Executable file
13
deb/opt/apps/deepin-wine-runner/AutoShell/command/installvb
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
# 加入路径
|
||||
import os
|
||||
import sys
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
sys.path.append(f"{programPath}/../../")
|
||||
import ConfigLanguareRunner
|
||||
# 符号转移
|
||||
argv = []
|
||||
for i in sys.argv[1:]:
|
||||
argv.append(i.replace(" ", "\\ "))
|
||||
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
@ -37,5 +37,6 @@
|
||||
"killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名",
|
||||
"control": "打开控制面板\n参数数量:0\n参数介绍:无",
|
||||
"taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无",
|
||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无"
|
||||
"killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无",
|
||||
"installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6"
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
@ -109,7 +109,8 @@ class Command():
|
||||
"enabledwinecrashdialog",
|
||||
"disbledwinecrashdialog",
|
||||
"disbledWinebottlecreatelink",
|
||||
"enabledWinebottlecreatelink"
|
||||
"enabledWinebottlecreatelink",
|
||||
"installvb"
|
||||
]
|
||||
|
||||
def __init__(self, commandString: str) -> None:
|
||||
@ -391,6 +392,10 @@ class Command():
|
||||
self.command = ["bat", "reg", "add", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "/v", "ProxyEnable", "/t", "REG_DWORD", "/d", "00000000", "/f"]
|
||||
self.Bat()
|
||||
|
||||
def InstallVB(self):
|
||||
import InstallVisualBasicRuntime
|
||||
return InstallVisualBasicRuntime.Download(self.wineBottonPath, int(self.command[1]), self.wine)
|
||||
|
||||
# 可以运行的命令的映射关系
|
||||
# 可以被使用的命令的映射
|
||||
commandList = {
|
||||
@ -431,7 +436,8 @@ class Command():
|
||||
"enabledwinecrashdialog": EnabledWineCrashDialog,
|
||||
"disbledwinecrashdialog": DisbledWineCrashDialog,
|
||||
"disbledWinebottlecreatelink": DisbledWineBottleCreateLink,
|
||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink
|
||||
"enabledWinebottlecreatelink": EnabledWineBottleCreateLink,
|
||||
"installvb": InstallVB
|
||||
}
|
||||
|
||||
# 参数数列表
|
||||
@ -474,7 +480,8 @@ class Command():
|
||||
"enabledwinecrashdialog": [0],
|
||||
"disbledwinecrashdialog": [0],
|
||||
"disbledWinebottlecreatelink": [0],
|
||||
"enabledWinebottlecreatelink": [0]
|
||||
"enabledWinebottlecreatelink": [0],
|
||||
"installvb": [1]
|
||||
}
|
||||
windowsUnrun = [
|
||||
"createbotton",
|
||||
|
Binary file not shown.
85
deb/opt/apps/deepin-wine-runner/UI/KeyAddGui.py
Normal file
85
deb/opt/apps/deepin-wine-runner/UI/KeyAddGui.py
Normal file
@ -0,0 +1,85 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'KeyAddGui.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(692, 314)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.tips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.tips.setObjectName("tips")
|
||||
self.verticalLayout.addWidget(self.tips)
|
||||
self.keyBoardList = QtWidgets.QListView(self.centralwidget)
|
||||
self.keyBoardList.setObjectName("keyBoardList")
|
||||
self.verticalLayout.addWidget(self.keyBoardList)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem)
|
||||
self.addButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.addButton.setObjectName("addButton")
|
||||
self.horizontalLayout.addWidget(self.addButton)
|
||||
self.editButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.editButton.setObjectName("editButton")
|
||||
self.horizontalLayout.addWidget(self.editButton)
|
||||
self.saveButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.saveButton.setObjectName("saveButton")
|
||||
self.horizontalLayout.addWidget(self.saveButton)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menuBar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menuBar.setGeometry(QtCore.QRect(0, 0, 692, 33))
|
||||
self.menuBar.setObjectName("menuBar")
|
||||
self.menu = QtWidgets.QMenu(self.menuBar)
|
||||
self.menu.setObjectName("menu")
|
||||
MainWindow.setMenuBar(self.menuBar)
|
||||
self.action = QtWidgets.QAction(MainWindow)
|
||||
self.action.setObjectName("action")
|
||||
self.serverTips = QtWidgets.QAction(MainWindow)
|
||||
self.serverTips.setEnabled(False)
|
||||
self.serverTips.setObjectName("serverTips")
|
||||
self.startServer = QtWidgets.QAction(MainWindow)
|
||||
self.startServer.setObjectName("startServer")
|
||||
self.stopServer = QtWidgets.QAction(MainWindow)
|
||||
self.stopServer.setObjectName("stopServer")
|
||||
self.setAutoStart = QtWidgets.QAction(MainWindow)
|
||||
self.setAutoStart.setObjectName("setAutoStart")
|
||||
self.setUnautoStart = QtWidgets.QAction(MainWindow)
|
||||
self.setUnautoStart.setObjectName("setUnautoStart")
|
||||
self.menu.addAction(self.serverTips)
|
||||
self.menu.addSeparator()
|
||||
self.menu.addAction(self.startServer)
|
||||
self.menu.addAction(self.stopServer)
|
||||
self.menu.addSeparator()
|
||||
self.menu.addAction(self.setAutoStart)
|
||||
self.menu.addAction(self.setUnautoStart)
|
||||
self.menuBar.addAction(self.menu.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "编辑快捷键"))
|
||||
self.tips.setText(_translate("MainWindow", "<html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理</p></body></html>"))
|
||||
self.addButton.setText(_translate("MainWindow", "添加"))
|
||||
self.editButton.setText(_translate("MainWindow", "编辑"))
|
||||
self.saveButton.setText(_translate("MainWindow", "保存"))
|
||||
self.menu.setTitle(_translate("MainWindow", "设置快捷键服务"))
|
||||
self.action.setText(_translate("MainWindow", "关于"))
|
||||
self.serverTips.setText(_translate("MainWindow", "此内容只支持非Deepin/UOS发行版"))
|
||||
self.startServer.setText(_translate("MainWindow", "启动服务"))
|
||||
self.stopServer.setText(_translate("MainWindow", "停止服务"))
|
||||
self.setAutoStart.setText(_translate("MainWindow", "设置开机自启"))
|
||||
self.setUnautoStart.setText(_translate("MainWindow", "关闭开机自启动"))
|
||||
|
86
deb/opt/apps/deepin-wine-runner/UI/KeyAddKeyboardGui.py
Normal file
86
deb/opt/apps/deepin-wine-runner/UI/KeyAddKeyboardGui.py
Normal file
@ -0,0 +1,86 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'KeyAddKeyboardGui.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(800, 195)
|
||||
icon = QtGui.QIcon.fromTheme("..")
|
||||
MainWindow.setWindowIcon(icon)
|
||||
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.addTips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.addTips.setObjectName("addTips")
|
||||
self.verticalLayout.addWidget(self.addTips)
|
||||
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||
self.exeNameTips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.exeNameTips.setObjectName("exeNameTips")
|
||||
self.horizontalLayout_3.addWidget(self.exeNameTips)
|
||||
self.exeName = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.exeName.setObjectName("exeName")
|
||||
self.horizontalLayout_3.addWidget(self.exeName)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.localTips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.localTips.setObjectName("localTips")
|
||||
self.horizontalLayout.addWidget(self.localTips)
|
||||
self.localKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.localKeyboardChoose.setObjectName("localKeyboardChoose")
|
||||
self.horizontalLayout.addWidget(self.localKeyboardChoose)
|
||||
self.addTips_2 = QtWidgets.QLabel(self.centralwidget)
|
||||
self.addTips_2.setObjectName("addTips_2")
|
||||
self.horizontalLayout.addWidget(self.addTips_2)
|
||||
self.localKey = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.localKey.setObjectName("localKey")
|
||||
self.horizontalLayout.addWidget(self.localKey)
|
||||
self.wineTips = QtWidgets.QLabel(self.centralwidget)
|
||||
self.wineTips.setObjectName("wineTips")
|
||||
self.horizontalLayout.addWidget(self.wineTips)
|
||||
self.wineKeyboardChoose = QtWidgets.QComboBox(self.centralwidget)
|
||||
self.wineKeyboardChoose.setObjectName("wineKeyboardChoose")
|
||||
self.horizontalLayout.addWidget(self.wineKeyboardChoose)
|
||||
self.addTipsWine = QtWidgets.QLabel(self.centralwidget)
|
||||
self.addTipsWine.setObjectName("addTipsWine")
|
||||
self.horizontalLayout.addWidget(self.addTipsWine)
|
||||
self.wineKey = QtWidgets.QLineEdit(self.centralwidget)
|
||||
self.wineKey.setObjectName("wineKey")
|
||||
self.horizontalLayout.addWidget(self.wineKey)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout_2.addItem(spacerItem1)
|
||||
self.addButton = QtWidgets.QPushButton(self.centralwidget)
|
||||
self.addButton.setObjectName("addButton")
|
||||
self.horizontalLayout_2.addWidget(self.addButton)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout_2)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "添加快捷键"))
|
||||
self.addTips.setText(_translate("MainWindow", "暂时只支持特定组合\n"
|
||||
"文本框内的只能输入单字母"))
|
||||
self.exeNameTips.setText(_translate("MainWindow", "可这执行文件名称:"))
|
||||
self.localTips.setText(_translate("MainWindow", "本地映射:"))
|
||||
self.addTips_2.setText(_translate("MainWindow", "+"))
|
||||
self.wineTips.setText(_translate("MainWindow", "Wine 容器映射内容:"))
|
||||
self.addTipsWine.setText(_translate("MainWindow", "+"))
|
||||
self.addButton.setText(_translate("MainWindow", "添加快捷键"))
|
||||
|
@ -942,7 +942,7 @@ Description: {e3_text.text()}
|
||||
################
|
||||
if not self.build:
|
||||
self.label.emit("正在构建 deb 包……")
|
||||
self.run_command("dpkg -b {} {}".format(debPackagePath, e12_text.text()))
|
||||
self.run_command("bash -c 'dpkg -b {} {}'".format(debPackagePath, e12_text.text()))
|
||||
################
|
||||
# 完成构建
|
||||
################
|
||||
|
@ -632,6 +632,13 @@ def InstallNetFramework():
|
||||
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"]
|
||||
@ -1816,16 +1823,8 @@ exe路径\' 参数 \'
|
||||
<b>千万不要中断后不删除源的情况下 apt upgrade !!!</b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
|
||||
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
|
||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
||||
updateThingsString = '''※1、自动配置解释器支持 bash 语法(新版底层调用 bash,旧版任然使用旧版解析引擎)
|
||||
※2、修复缺失 wimtools 依赖导致无法正常安装的问题
|
||||
※3、修复基于生态适配活动脚本打包器对话框过多影响使用的问题,并支持指定不同的包名和容器名
|
||||
※4、7z 文件解压不会自动替换文件然后卡死以及因此导致程序闪退的问题
|
||||
※5、修复安装更多 Wine 终端调用问题和图标问题
|
||||
※6、支持 openkylin
|
||||
7、支持通过 exe 路径自动生成 Wine 容器路径
|
||||
8、支持禁用/启用 wine 容器是否生成快捷方式的功能以及启用/禁用程序崩溃提示对话框
|
||||
9、支持设置 wine 容器代理
|
||||
10、自动配置脚本支持使用 --help 参数查看帮助
|
||||
updateThingsString = '''※1、新增 VB Runtime 组件安装工具
|
||||
※2、优化自动配置容器搜索功能,搜索不区分大小写
|
||||
'''
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
@ -2107,12 +2106,14 @@ wm1_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine
|
||||
wm1_3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 MSXML"))
|
||||
wm1_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 gecko"))
|
||||
wm1_5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 mono"))
|
||||
wm1_7 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 Visual Basic Runtime"))
|
||||
wm1_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("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(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器运行基础应用"))
|
||||
wm2_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的控制面板"))
|
||||
@ -2188,6 +2189,7 @@ wm1_2.triggered.connect(lambda: threading.Thread(target=InstallVisualStudioCPlus
|
||||
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://www.deepin.org"))
|
||||
@ -2272,6 +2274,8 @@ help.addAction(h2)
|
||||
help.addAction(h3)
|
||||
help.addAction(h4)
|
||||
help.addSeparator()
|
||||
wikiHelp = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "程序 Wiki"))
|
||||
help.addAction(wikiHelp)
|
||||
videoHelp = help.addMenu(QtCore.QCoreApplication.translate("U", "视频教程"))
|
||||
easyHelp = QtWidgets.QAction("简易使用教程")
|
||||
buildHelp = QtWidgets.QAction("打包教程")
|
||||
@ -2296,6 +2300,7 @@ runStatusWebSize.triggered.connect(lambda: webbrowser.open_new_tab("https://gfdg
|
||||
h2.triggered.connect(helps)
|
||||
h3.triggered.connect(UpdateThings)
|
||||
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)
|
||||
|
Binary file not shown.
1
deb/usr/lib/python3/dist-packages/WineRunner
Symbolic link
1
deb/usr/lib/python3/dist-packages/WineRunner
Symbolic link
@ -0,0 +1 @@
|
||||
/opt/apps/deepin-wine-runner/API/Python/
|
0
key/UI/AutoConfig.py
Normal file → Executable file
0
key/UI/AutoConfig.py
Normal file → Executable file
0
key/UI/AutoConfig.ui
Normal file → Executable file
0
key/UI/AutoConfig.ui
Normal file → Executable file
0
key/UI/KeyAddGui.py
Normal file → Executable file
0
key/UI/KeyAddGui.py
Normal file → Executable file
0
key/UI/KeyAddGui.ui
Normal file → Executable file
0
key/UI/KeyAddGui.ui
Normal file → Executable file
0
key/UI/KeyAddKeyboardGui.py
Normal file → Executable file
0
key/UI/KeyAddKeyboardGui.py
Normal file → Executable file
0
key/UI/KeyAddKeyboardGui.ui
Normal file → Executable file
0
key/UI/KeyAddKeyboardGui.ui
Normal file → Executable file
0
key/UI/__pycache__/AutoConfig.cpython-310.pyc
Normal file → Executable file
0
key/UI/__pycache__/AutoConfig.cpython-310.pyc
Normal file → Executable file
0
key/UI/__pycache__/AutoConfig.cpython-37.pyc
Normal file → Executable file
0
key/UI/__pycache__/AutoConfig.cpython-37.pyc
Normal file → Executable file
0
key/UI/__pycache__/KeyAddGui.cpython-37.pyc
Normal file → Executable file
0
key/UI/__pycache__/KeyAddGui.cpython-37.pyc
Normal file → Executable file
0
key/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc
Normal file → Executable file
0
key/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc
Normal file → Executable file
10
key/desktop/deepin-wine-runner-keyboard.desktop
Executable file
10
key/desktop/deepin-wine-runner-keyboard.desktop
Executable file
@ -0,0 +1,10 @@
|
||||
[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;
|
9
key/key-add-gui.py
Normal file → Executable file
9
key/key-add-gui.py
Normal file → Executable file
@ -14,6 +14,7 @@ class Check:
|
||||
try:
|
||||
bus = dbus.SessionBus()
|
||||
bus.get_object("com.deepin.daemon.Keybinding", "/com/deepin/daemon/Keybinding").List()
|
||||
int("a")
|
||||
return True
|
||||
except:
|
||||
print("无法检测到 Deepin/UOS 快捷键服务")
|
||||
@ -30,7 +31,9 @@ class Check:
|
||||
|
||||
class Click:
|
||||
def AddButton():
|
||||
pass
|
||||
os.system(f"'{programPath}/keyboard-add-gui.py'")
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
@ -39,6 +42,10 @@ if __name__ == "__main__":
|
||||
ui.setupUi(window)
|
||||
# 连接槽
|
||||
ui.addButton.clicked.connect(Click.AddButton)
|
||||
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"'{programPath}/start-auto-server.sh'"]).start())
|
||||
ui.setUnautoStart.triggered.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/stop-auto-server.sh'"]).start())
|
||||
window.show()
|
||||
threading.Thread(target=Check.CheckThreading).start()
|
||||
sys.exit(app.exec_())
|
0
key/key-get.py
Normal file → Executable file
0
key/key-get.py
Normal file → Executable file
0
key/keyboard-add-gui.py
Normal file → Executable file
0
key/keyboard-add-gui.py
Normal file → Executable file
2
key/list/KeyList.json
Normal file → Executable file
2
key/list/KeyList.json
Normal file → Executable file
@ -1 +1 @@
|
||||
[["ctrl", "alt", "c", "'/home/gfdgd_xi/Desktop/deep-wine-runner/key/sendkeys.sh' b 'aa' 4"]]
|
||||
[]
|
||||
|
9
key/replace.py
Executable file
9
key/replace.py
Executable file
@ -0,0 +1,9 @@
|
||||
#!/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()
|
28
key/start-auto-server.sh
Normal file → Executable file
28
key/start-auto-server.sh
Normal file → Executable file
@ -1,10 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 Bash
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.3.0
|
||||
# 更新时间:2022年10月11日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
# 基于 Bash 制作
|
||||
#################################################################################################################
|
||||
echo Flag!
|
||||
#!/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)
|
||||
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"
|
27
key/stop-auto-server.sh
Normal file → Executable file
27
key/stop-auto-server.sh
Normal file → Executable file
@ -1,10 +1,17 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 Bash
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 版本:2.3.0
|
||||
# 更新时间:2022年10月11日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
# 基于 Bash 制作
|
||||
#################################################################################################################
|
||||
echo Flag!
|
||||
#!/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)
|
||||
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
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user