mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-06-16 03:46:00 +08:00
Compare commits
3 Commits
385348a7b9
...
1d59f6b4f1
Author | SHA1 | Date | |
---|---|---|---|
1d59f6b4f1 | |||
ab31fc6d65 | |||
c88521a3e7 |
@ -415,7 +415,7 @@ class make_deb_threading(QtCore.QThread):
|
||||
"Architecture": debFirstArch.currentText(),
|
||||
"Depends": [
|
||||
f"{wine[wineVersion.currentText()]}, deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei",
|
||||
f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner, fonts-wqy-microhei, fonts-wqy-zenhei"
|
||||
f"{wine[wineVersion.currentText()]}, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei"
|
||||
][int(chooseWineHelperValue.isChecked())],
|
||||
"postinst": ['', f'''#!/bin/bash
|
||||
PACKAGE_NAME="{e1_text.text()}"
|
||||
@ -1361,7 +1361,7 @@ true
|
||||
print("c")
|
||||
if os.path.exists(wine[wineVersion.currentText()]):
|
||||
debInformation[0]["Depends"] = ["deepin-wine-helper | com.wine-helper.deepin",
|
||||
"spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner"
|
||||
"spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin"
|
||||
][int(chooseWineHelperValue.isChecked())] #+ ["", "libasound2 (>= 1.0.16), libc6 (>= 2.28), libglib2.0-0 (>= 2.12.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628), libldap-2.4-2 (>= 2.4.7), libmpg123-0 (>= 1.13.7), libopenal1 (>= 1.14), libpcap0.8 (>= 0.9.8), libpulse0 (>= 0.99.1), libudev1 (>= 183), libvkd3d1 (>= 1.0), libx11-6, libxext6, libxml2 (>= 2.9.0), ocl-icd-libopencl1 | libopencl1, udis86, zlib1g (>= 1:1.1.4), libasound2-plugins, libncurses6 | libncurses5 | libncurses, deepin-wine-plugin-virtual\nRecommends: libcapi20-3, libcups2, libdbus-1-3, libfontconfig1, libfreetype6, libglu1-mesa | libglu1, libgnutls30 | libgnutls28 | libgnutls26, libgsm1, libgssapi-krb5-2, libjpeg62-turbo | libjpeg8, libkrb5-3, libodbc1, libosmesa6, libpng16-16 | libpng12-0, libsane | libsane1, libsdl2-2.0-0, libtiff5, libv4l-0, libxcomposite1, libxcursor1, libxfixes3, libxi6, libxinerama1, libxrandr2, libxrender1, libxslt1.1, libxxf86vm1"][]
|
||||
print("d")
|
||||
debInformation[0]["run.sh"] = f'''#!/bin/sh
|
||||
@ -1919,14 +1919,14 @@ def BrowserHelperConfigPathText():
|
||||
def ChangeWine():
|
||||
useInstallWineArch.setEnabled(os.path.exists(wine[wineVersion.currentText()]))
|
||||
debDepends.setText([f"{wine[wineVersion.currentText()]} | {wine[wineVersion.currentText()]}-bcm | {wine[wineVersion.currentText()]}-dcm | com.{wine[wineVersion.currentText()]}.deepin, deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei",
|
||||
f"{wine[wineVersion.currentText()]} | {wine[wineVersion.currentText()]}-bcm | {wine[wineVersion.currentText()]}-dcm | com.{wine[wineVersion.currentText()]}.deepin, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner, fonts-wqy-microhei, fonts-wqy-zenhei"
|
||||
f"{wine[wineVersion.currentText()]} | {wine[wineVersion.currentText()]}-bcm | {wine[wineVersion.currentText()]}-dcm | com.{wine[wineVersion.currentText()]}.deepin, spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei"
|
||||
][int(chooseWineHelperValue.isChecked())])
|
||||
debRecommend.setText("")
|
||||
helperConfigPathText.setEnabled(chooseWineHelperValue.isChecked())
|
||||
helperConfigPathButton.setEnabled(chooseWineHelperValue.isChecked())
|
||||
if os.path.exists(wine[wineVersion.currentText()]):
|
||||
debDepends.setText(["deepin-wine-helper | com.wine-helper.deepin",
|
||||
"spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepinwinerunner"
|
||||
"spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin"
|
||||
][int(chooseWineHelperValue.isChecked())])
|
||||
#if "deepin-wine5-stable" in wine[wineVersion.currentText()]:
|
||||
# debDepends.setText("libasound2 (>= 1.0.16), libc6 (>= 2.28), libglib2.0-0 (>= 2.12.0), libgphoto2-6 (>= 2.5.10), libgphoto2-port12 (>= 2.5.10), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628), libldap-2.4-2 (>= 2.4.7), libmpg123-0 (>= 1.13.7), libopenal1 (>= 1.14), libpcap0.8 (>= 0.9.8), libpulse0 (>= 0.99.1), libudev1 (>= 183), libvkd3d1 (>= 1.0), libx11-6, libxext6, libxml2 (>= 2.9.0), ocl-icd-libopencl1 | libopencl1, udis86, zlib1g (>= 1:1.1.4), libasound2-plugins, libncurses6 | libncurses5 | libncurses, deepin-wine-plugin-virtual")
|
||||
|
11
globalenv.py
11
globalenv.py
@ -1,14 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def _init():#初始化
|
||||
|
||||
# 用于实现主模块的变量可被子模块调用和读取
|
||||
# 要在主模块和需要的子模块分别 import globalenv
|
||||
# 然后需要在主模块进行初始化(_init),子模块不要重复 init
|
||||
# 接着即可调用 set_value 和 get_value 存放/读取变量
|
||||
def _init(): #初始化(在主模块初始化,不要在子模块重复 init)
|
||||
global _global_dict
|
||||
_global_dict = {}
|
||||
|
||||
def set_value(key,value):
|
||||
def set_value(key :str, value):
|
||||
""" 定义一个全局变量 """
|
||||
_global_dict[key] = value
|
||||
|
||||
""" 获得一个全局变量,不存在则返回默认值 """
|
||||
def get_value(key,defValue=None):
|
||||
def get_value(key, defValue=None):
|
||||
try:
|
||||
return _global_dict[key]
|
||||
except KeyError:
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "4.0.0.1",
|
||||
"Version": "4.0.0.2",
|
||||
"Time": "未知",
|
||||
"Thank": [
|
||||
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "4.0.0.1",
|
||||
"Version": "4.0.0.2",
|
||||
"Time": "未知",
|
||||
"Thank": [
|
||||
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
||||
|
5
test.py
5
test.py
@ -3,11 +3,12 @@ import globalenv
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = QtWidgets.QMainWindow()
|
||||
# globalenv 的 init 是必须的,这样才能正确的 import Wine 运行器的窗口
|
||||
globalenv._init()
|
||||
globalenv.set_value("app", app)
|
||||
globalenv.set_value("app", app) # 用于将该部分的 app 给子模块的 Qt 控件调用以解决 UI 异常以及其它问题
|
||||
#import deepin_wine_packager
|
||||
#modules = __import__("deepin-wine-packager")
|
||||
modules = __import__("deepin-wine-easy-packager")
|
||||
modules = __import__("deepin-wine-easy-packager") # 使用该方法可以引入带 - 文件名的模块
|
||||
#import mainwindow
|
||||
window.setCentralWidget(modules.window)
|
||||
window.show()
|
||||
|
@ -350,8 +350,13 @@ class GetInfo():
|
||||
result = True
|
||||
if (data == "termux" and self.isTermux):
|
||||
result = True
|
||||
if (self.compareVersion(self.glibcVersion, data) == 1):
|
||||
result = True
|
||||
try:
|
||||
if (self.compareVersion(self.glibcVersion, data) == 1 or
|
||||
self.compareVersion(self.glibcVersion, data) == 0):
|
||||
result = True
|
||||
except:
|
||||
# 如果检查 tag 出现问题,强制返回符合条件
|
||||
return True
|
||||
if (os.path.exists(data)):
|
||||
result = True
|
||||
if (no):
|
||||
|
Loading…
x
Reference in New Issue
Block a user