diff --git a/Makefile b/Makefile
index 0c14ee7..29cf47a 100755
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ build:
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
+ cp -rv key deb/opt/apps/deepin-wine-runner
dpkg -b deb spark-deepin-wine-runner.deb
diff --git a/deb/DEBIAN/control b/deb/DEBIAN/control
index 0f572e4..ee4d027 100755
--- a/deb/DEBIAN/control
+++ b/deb/DEBIAN/control
@@ -1,5 +1,5 @@
Package: spark-deepin-wine-runner
-Version: 2.4.0
+Version: 2.4.0~alpha1
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
diff --git a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner
index 1d87350..806639a 100755
--- a/deb/opt/apps/deepin-wine-runner/deepin-wine-runner
+++ b/deb/opt/apps/deepin-wine-runner/deepin-wine-runner
@@ -3,7 +3,7 @@
#################################################################################################################
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本:2.3.0
-# 更新时间:2022年10月02日
+# 更新时间:2022年10月15日
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 Python3 的 PyQt5 构建
#################################################################################################################
@@ -716,6 +716,18 @@ def SetDeepinFileDialogDeepin():
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:
@@ -2170,6 +2182,13 @@ enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设
disbledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy)
+dllOver = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "函数顶替库列表"))
+saveDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "导出函数顶替列表"))
+addDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "导入函数顶替列表"))
+editDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "编辑函数顶替库列表"))
+dllOver.addAction(saveDllOver)
+dllOver.addAction(addDllOver)
+dllOver.addAction(editDllOver)
w1.triggered.connect(OpenWineBotton)
w2.triggered.connect(InstallWineFont)
w3.triggered.connect(OpenWineFontPath)
@@ -2192,7 +2211,7 @@ wm1_5.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=[
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"))
+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"))
@@ -2210,6 +2229,9 @@ disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_
enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f"))
enabledHttpProxy.triggered.connect(SetHttpProxy)
disbledHttpProxy.triggered.connect(DisbledHttpProxy)
+saveDllOver.triggered.connect(SaveDllList)
+addDllOver.triggered.connect(AddReg)
+editDllOver.triggered.connect(lambda: RunWineProgram("winecfg"))
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))
diff --git a/deb/opt/apps/deepin-wine-runner/dlls-arm.7z b/deb/opt/apps/deepin-wine-runner/dlls-arm.7z
index ee5bc4d..b7d17cf 100644
Binary files a/deb/opt/apps/deepin-wine-runner/dlls-arm.7z and b/deb/opt/apps/deepin-wine-runner/dlls-arm.7z differ
diff --git a/deb/opt/apps/deepin-wine-runner/information.json b/deb/opt/apps/deepin-wine-runner/information.json
index 333d675..3c5b809 100755
--- a/deb/opt/apps/deepin-wine-runner/information.json
+++ b/deb/opt/apps/deepin-wine-runner/information.json
@@ -1,5 +1,5 @@
{
- "Version": "2.3.0",
+ "Version": "2.4.0~alpha1",
"Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948",
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/AutoConfig.py b/deb/opt/apps/deepin-wine-runner/key/UI/AutoConfig.py
new file mode 100755
index 0000000..1418666
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/UI/AutoConfig.py
@@ -0,0 +1,76 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'AutoConfig.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, 600)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget)
+ self.verticalLayout_3.setObjectName("verticalLayout_3")
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.searchTips = QtWidgets.QLabel(self.centralwidget)
+ self.searchTips.setObjectName("searchTips")
+ self.horizontalLayout.addWidget(self.searchTips)
+ self.searchThings = QtWidgets.QLineEdit(self.centralwidget)
+ self.searchThings.setObjectName("searchThings")
+ self.horizontalLayout.addWidget(self.searchThings)
+ self.saerchBotton = QtWidgets.QPushButton(self.centralwidget)
+ self.saerchBotton.setObjectName("saerchBotton")
+ self.horizontalLayout.addWidget(self.saerchBotton)
+ self.verticalLayout_3.addLayout(self.horizontalLayout)
+ self.searchList = QtWidgets.QListView(self.centralwidget)
+ self.searchList.setObjectName("searchList")
+ self.verticalLayout_3.addWidget(self.searchList)
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.horizontalLayout_2.addItem(spacerItem)
+ self.runBotton = QtWidgets.QPushButton(self.centralwidget)
+ self.runBotton.setObjectName("runBotton")
+ self.horizontalLayout_2.addWidget(self.runBotton)
+ self.verticalLayout_3.addLayout(self.horizontalLayout_2)
+ MainWindow.setCentralWidget(self.centralwidget)
+ self.menubar = QtWidgets.QMenuBar(MainWindow)
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36))
+ self.menubar.setObjectName("menubar")
+ self.menu = QtWidgets.QMenu(self.menubar)
+ self.menu.setObjectName("menu")
+ MainWindow.setMenuBar(self.menubar)
+ self.about = QtWidgets.QAction(MainWindow)
+ self.about.setObjectName("about")
+ self.exitProgram = QtWidgets.QAction(MainWindow)
+ self.exitProgram.setObjectName("exitProgram")
+ self.help = QtWidgets.QAction(MainWindow)
+ self.help.setObjectName("help")
+ self.openFile = QtWidgets.QAction(MainWindow)
+ self.openFile.setObjectName("openFile")
+ self.menu.addAction(self.openFile)
+ self.menu.addSeparator()
+ self.menu.addAction(self.exitProgram)
+ 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.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):"))
+ self.saerchBotton.setText(_translate("MainWindow", "搜索"))
+ self.runBotton.setText(_translate("MainWindow", "部署此方案"))
+ self.menu.setTitle(_translate("MainWindow", "程序"))
+ self.about.setText(_translate("MainWindow", "关于"))
+ self.exitProgram.setText(_translate("MainWindow", "退出程序"))
+ self.help.setText(_translate("MainWindow", "帮助"))
+ self.openFile.setText(_translate("MainWindow", "打开本地部署脚本"))
+
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/AutoConfig.ui b/deb/opt/apps/deepin-wine-runner/key/UI/AutoConfig.ui
new file mode 100755
index 0000000..7b0ae10
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/UI/AutoConfig.ui
@@ -0,0 +1,110 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 800
+ 600
+
+
+
+ 自动部署脚本
+
+
+
+ -
+
+
-
+
+
+ 搜索内容(为空代表显示所有内容):
+
+
+
+ -
+
+
+ -
+
+
+ 搜索
+
+
+
+
+
+ -
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 部署此方案
+
+
+
+
+
+
+
+
+
+
+ 关于
+
+
+
+
+ 退出程序
+
+
+
+
+ 帮助
+
+
+
+
+ 打开本地部署脚本
+
+
+
+
+
+
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddGui.py b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddGui.py
new file mode 100755
index 0000000..171ad00
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddGui.py
@@ -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", "
此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键
Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务
Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理
"))
+ 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", "关闭开机自启动"))
+
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddGui.ui b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddGui.ui
new file mode 100755
index 0000000..c024da2
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddGui.ui
@@ -0,0 +1,127 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 692
+ 314
+
+
+
+ 编辑快捷键
+
+
+
+ -
+
+
+ <html><head/><body><p>此工具可以用于设置快捷键到 Wine 容器的映射,以便 Wine 程序可以正常的使用快捷键<br/>Deepin/UOS将会使用默认的快捷键服务,其它发行版将使用此运行器提供的快捷键服务<br>Deepin/UOS将只会提供快捷键添加功能,请在控制中心进行快捷键的修改管理</p></body></html>
+
+
+
+ -
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 添加
+
+
+
+ -
+
+
+ 编辑
+
+
+
+ -
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+ 关于
+
+
+
+
+ false
+
+
+ 此内容只支持非Deepin/UOS发行版
+
+
+
+
+ 启动服务
+
+
+
+
+ 停止服务
+
+
+
+
+ 设置开机自启
+
+
+
+
+ 关闭开机自启动
+
+
+
+
+
+
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddKeyboardGui.py b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddKeyboardGui.py
new file mode 100755
index 0000000..46041e3
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddKeyboardGui.py
@@ -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", "暂时只支持 Ctrl+Alt+? 和 Alt+? 的组合\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", "添加快捷键"))
+
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddKeyboardGui.ui b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddKeyboardGui.ui
new file mode 100755
index 0000000..847a464
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/UI/KeyAddKeyboardGui.ui
@@ -0,0 +1,130 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 800
+ 195
+
+
+
+ 添加快捷键
+
+
+
+ ../../../.designer/backup../../../.designer/backup
+
+
+
+ -
+
+
+ 暂时只支持 Ctrl+Alt+? 和 Alt+? 的组合
+文本框内的只能输入单字母
+
+
+
+ -
+
+
-
+
+
+ 可这执行文件名称:
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+ 本地映射:
+
+
+
+ -
+
+
+ -
+
+
+ +
+
+
+
+ -
+
+
+ -
+
+
+ Wine 容器映射内容:
+
+
+
+ -
+
+
+ -
+
+
+ +
+
+
+
+ -
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 添加快捷键
+
+
+
+
+
+
+
+
+
+
+
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/AutoConfig.cpython-310.pyc b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/AutoConfig.cpython-310.pyc
new file mode 100755
index 0000000..bbf0dfb
Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/AutoConfig.cpython-310.pyc differ
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/AutoConfig.cpython-37.pyc b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/AutoConfig.cpython-37.pyc
new file mode 100755
index 0000000..8dc37e6
Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/AutoConfig.cpython-37.pyc differ
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/KeyAddGui.cpython-37.pyc b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/KeyAddGui.cpython-37.pyc
new file mode 100755
index 0000000..cb9a5ca
Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/KeyAddGui.cpython-37.pyc differ
diff --git a/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc
new file mode 100755
index 0000000..2c41e76
Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/key/UI/__pycache__/KeyAddKeyboardGui.cpython-37.pyc differ
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
new file mode 100755
index 0000000..1aba0c6
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/desktop/deepin-wine-runner-keyboard.desktop
@@ -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;
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
new file mode 100755
index 0000000..2b71aab
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/key-add-gui.py
@@ -0,0 +1,66 @@
+#!/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 json
+import dbus
+import threading
+from UI.KeyAddGui import *
+import PyQt5.QtWidgets as QtWidgets
+
+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.saveButton.setDisabled(True)
+
+def Clear():
+ ui.keyBoardList.model().removeRows(0, ui.keyBoardList.model().rowCount())
+ model = QtCore.QStringListModel(window)
+ 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[1: -1])}),{i[-1]}")
+ model.setStringList(lists)
+ ui.keyBoardList.setModel(model)
+
+
+class Click:
+ def AddButton():
+ os.system(f"'{programPath}/keyboard-add-gui.py'")
+
+
+
+if __name__ == "__main__":
+ app = QtWidgets.QApplication(sys.argv)
+ window = QtWidgets.QMainWindow()
+ ui = Ui_MainWindow()
+ 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()
+ 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
new file mode 100755
index 0000000..48251f9
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/key-get.py
@@ -0,0 +1,104 @@
+#!/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
new file mode 100755
index 0000000..2510a42
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/keyboard-add-gui.py
@@ -0,0 +1,128 @@
+#!/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.wineKeyboardChoose.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
new file mode 100755
index 0000000..fe51488
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/list/KeyList.json
@@ -0,0 +1 @@
+[]
diff --git a/deb/opt/apps/deepin-wine-runner/key/replace.py b/deb/opt/apps/deepin-wine-runner/key/replace.py
new file mode 100755
index 0000000..9a11ac1
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/replace.py
@@ -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()
\ 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
new file mode 100755
index 0000000..cf6d9de
Binary files /dev/null and b/deb/opt/apps/deepin-wine-runner/key/sendkeys.exe differ
diff --git a/deb/opt/apps/deepin-wine-runner/key/sendkeys.sh b/deb/opt/apps/deepin-wine-runner/key/sendkeys.sh
new file mode 100755
index 0000000..e45511c
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/sendkeys.sh
@@ -0,0 +1,107 @@
+#!/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
new file mode 100755
index 0000000..226d344
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/start-auto-server.sh
@@ -0,0 +1,18 @@
+#!/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"
\ 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
new file mode 100755
index 0000000..f2086b7
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/stop-auto-server.sh
@@ -0,0 +1,17 @@
+#!/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
\ 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
new file mode 100755
index 0000000..0397809
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/stop.sh
@@ -0,0 +1,2 @@
+#!/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
new file mode 100755
index 0000000..85b1e54
--- /dev/null
+++ b/deb/opt/apps/deepin-wine-runner/key/unlock.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+rm /tmp/deepin-wine-runner-keyboard-lock
\ No newline at end of file
diff --git a/deb/opt/apps/deepin-wine-runner/package-script.zip b/deb/opt/apps/deepin-wine-runner/package-script.zip
index ae3de9f..95c6ea8 100755
Binary files a/deb/opt/apps/deepin-wine-runner/package-script.zip and b/deb/opt/apps/deepin-wine-runner/package-script.zip differ
diff --git a/dlls-arm.7z b/dlls-arm.7z
index ee5bc4d..b7d17cf 100644
Binary files a/dlls-arm.7z and b/dlls-arm.7z differ
diff --git a/information.json b/information.json
index 333d675..3c5b809 100755
--- a/information.json
+++ b/information.json
@@ -1,5 +1,5 @@
{
- "Version": "2.3.0",
+ "Version": "2.4.0~alpha1",
"Thank": [
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
"感谢 @zhangs https://bbs.deepin.org/post/227948",
diff --git a/key/key-add-gui.py b/key/key-add-gui.py
index 37953c7..2b71aab 100755
--- a/key/key-add-gui.py
+++ b/key/key-add-gui.py
@@ -4,6 +4,9 @@ import sys
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 *
@@ -29,6 +32,17 @@ class Check:
ui.keyBoardList.setDisabled(True)
ui.saveButton.setDisabled(True)
+def Clear():
+ ui.keyBoardList.model().removeRows(0, ui.keyBoardList.model().rowCount())
+ model = QtCore.QStringListModel(window)
+ 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[1: -1])}),{i[-1]}")
+ model.setStringList(lists)
+ ui.keyBoardList.setModel(model)
+
+
class Click:
def AddButton():
os.system(f"'{programPath}/keyboard-add-gui.py'")
@@ -48,4 +62,5 @@ if __name__ == "__main__":
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()
+ Clear()
sys.exit(app.exec_())
\ No newline at end of file
diff --git a/mainwindow.py b/mainwindow.py
index 1d87350..806639a 100755
--- a/mainwindow.py
+++ b/mainwindow.py
@@ -3,7 +3,7 @@
#################################################################################################################
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
# 版本:2.3.0
-# 更新时间:2022年10月02日
+# 更新时间:2022年10月15日
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
# 基于 Python3 的 PyQt5 构建
#################################################################################################################
@@ -716,6 +716,18 @@ def SetDeepinFileDialogDeepin():
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:
@@ -2170,6 +2182,13 @@ enabledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设
disbledHttpProxy = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用指定 wine 容器的代理"))
settingHttpProxy.addAction(enabledHttpProxy)
settingHttpProxy.addAction(disbledHttpProxy)
+dllOver = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "函数顶替库列表"))
+saveDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "导出函数顶替列表"))
+addDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "导入函数顶替列表"))
+editDllOver = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "编辑函数顶替库列表"))
+dllOver.addAction(saveDllOver)
+dllOver.addAction(addDllOver)
+dllOver.addAction(editDllOver)
w1.triggered.connect(OpenWineBotton)
w2.triggered.connect(InstallWineFont)
w3.triggered.connect(OpenWineFontPath)
@@ -2192,7 +2211,7 @@ wm1_5.triggered.connect(lambda: threading.Thread(target=InstallMonoGecko, args=[
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"))
+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"))
@@ -2210,6 +2229,9 @@ disbledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_
enabledWineCrashDialog.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 00000001 '/f"))
enabledHttpProxy.triggered.connect(SetHttpProxy)
disbledHttpProxy.triggered.connect(DisbledHttpProxy)
+saveDllOver.triggered.connect(SaveDllList)
+addDllOver.triggered.connect(AddReg)
+editDllOver.triggered.connect(lambda: RunWineProgram("winecfg"))
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))
diff --git a/package-script.zip b/package-script.zip
index ae3de9f..95c6ea8 100755
Binary files a/package-script.zip and b/package-script.zip differ
diff --git a/package-script/information.json b/package-script/information.json
index 9dcf9b9..54a5527 100755
--- a/package-script/information.json
+++ b/package-script/information.json
@@ -1,3 +1,3 @@
{
- "Version": "2.3.0"
+ "Version": "2.4.0~alpha1"
}