mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-17 04:21:37 +08:00
Compare commits
29 Commits
4.0.0
...
83fd8fffd4
| Author | SHA1 | Date | |
|---|---|---|---|
| 83fd8fffd4 | |||
| b6f8145fa5 | |||
| 1d59f6b4f1 | |||
| ab31fc6d65 | |||
| c88521a3e7 | |||
| 385348a7b9 | |||
| 3bcff8dd87 | |||
| 0623b95fca | |||
| fbd14710a5 | |||
| 9a212ca212 | |||
| ee6b166dd7 | |||
| fcd4e5e610 | |||
| dd4785d8e2 | |||
| e6df6addd7 | |||
| 9e1e898da4 | |||
| ff60f69565 | |||
| c5577568c9 | |||
| eb6fe87485 | |||
| e9f6847e57 | |||
| 47f1b2a843 | |||
| d95a4cd9f4 | |||
| e5ffd06b26 | |||
| f327216855 | |||
| d335a72aee | |||
| ee8be07185 | |||
| 4f08e44ca3 | |||
| caa08cfa8d | |||
| a4ab3b27d1 | |||
| 4caf1a3be5 |
33
.github/workflows/auto-building-pkg.yml
vendored
Normal file
33
.github/workflows/auto-building-pkg.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Auto Building Wine Runner(pkg)
|
||||||
|
run-name: ${{ github.actor }} Auto Building Wine Runner(pkg) 🚀
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
Explore-GitHub-Actions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux
|
||||||
|
steps:
|
||||||
|
- name: Building PKG
|
||||||
|
env:
|
||||||
|
GUSER: ${{ secrets.GUSER }}
|
||||||
|
PASSWORD: ${{ secrets.PASSWORD }}
|
||||||
|
UPLOADURL: ${{ secrets.UPLOADURL }}
|
||||||
|
run: |
|
||||||
|
# 配置环境
|
||||||
|
pacman -Sy
|
||||||
|
pacman -S yay git sudo
|
||||||
|
pacman -S dpkg qt5-base -y
|
||||||
|
yay install
|
||||||
|
git clone https://github.com/gfdgd-xi/deep-wine-runner
|
||||||
|
cd deep-wine-runner
|
||||||
|
make package-deb -j4
|
||||||
|
make package-pkg -j4
|
||||||
|
cd ..
|
||||||
|
mv spark-deepin-wine-runner*.pkg.tar.zst ../spark-deepin-wine-runner.pkg.tar.zst
|
||||||
|
- name: upload result
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: spark-deepin-wine-runner.pkg.tar.zst
|
||||||
|
path: spark-deepin-wine-runner.pkg.tar.zst
|
||||||
|
|
||||||
|
|
||||||
20
.github/workflows/auto-building.yml
vendored
20
.github/workflows/auto-building.yml
vendored
@@ -8,10 +8,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Building DEB
|
- name: Building DEB
|
||||||
env:
|
|
||||||
GUSER: ${{ secrets.GUSER }}
|
|
||||||
PASSWORD: ${{ secrets.PASSWORD }}
|
|
||||||
UPLOADURL: ${{ secrets.UPLOADURL }}
|
|
||||||
run: |
|
run: |
|
||||||
# 配置环境
|
# 配置环境
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -22,14 +18,24 @@ jobs:
|
|||||||
mv spark-deepin-wine-runner.deb ~
|
mv spark-deepin-wine-runner.deb ~
|
||||||
mv spark-deepin-wine-runner-ace.deb ~
|
mv spark-deepin-wine-runner-ace.deb ~
|
||||||
- name: upload result
|
- name: upload result
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: spark-deepin-wine-runner.deb
|
name: spark-deepin-wine-runner.deb
|
||||||
path: /home/runner/spark-deepin-wine-runner.deb
|
path: /home/runner/spark-deepin-wine-runner.deb
|
||||||
- name: upload result
|
- name: upload result
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: spark-deepin-wine-runner-ace.deb
|
name: spark-deepin-wine-runner-ace.deb
|
||||||
path: /home/runner/spark-deepin-wine-runner-ace.deb
|
path: /home/runner/spark-deepin-wine-runner-ace.deb
|
||||||
|
- name: Building DEB (termux)
|
||||||
|
run: |
|
||||||
|
cd deep-wine-runner
|
||||||
|
make package-deb-termux -j4
|
||||||
|
mv spark-deepin-wine-runner-termux.deb ~
|
||||||
|
- name: upload result
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: spark-deepin-wine-runner-termux.deb
|
||||||
|
path: /home/runner/spark-deepin-wine-runner-termux.deb
|
||||||
|
|
||||||
|
|
||||||
76
.github/workflows/building-off-line-package-arm.yml
vendored
Normal file
76
.github/workflows/building-off-line-package-arm.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
name: Building Wine Runner Off-line Pages(arm64)
|
||||||
|
run-name: ${{ github.actor }} Building Wine Runner Off-line Pages(arm64) 🚀
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
Explore-GitHub-Actions:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Building DEB
|
||||||
|
run: |
|
||||||
|
# 获取所需数据
|
||||||
|
cpu=$(cat /proc/cpuinfo | grep processor | wc -l)
|
||||||
|
# 配置环境
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install python3-requests debootstrap xz-utils qemu-user-static -y
|
||||||
|
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools psmisc -y
|
||||||
|
cd ~
|
||||||
|
mkdir package
|
||||||
|
# 部署 chroot 环境
|
||||||
|
sudo debootstrap --arch=arm64 bookworm debian
|
||||||
|
wget https://github.com/gfdgd-xi/deep-wine-runner/raw/main/pardus-chroot
|
||||||
|
sudo cp pardus-chroot /usr/bin
|
||||||
|
sudo chmod 777 /usr/bin/pardus-chroot
|
||||||
|
sudo pardus-chroot debian
|
||||||
|
### 配置容器
|
||||||
|
## 加入 wine 源
|
||||||
|
sudo chroot debian apt update
|
||||||
|
sudo chroot debian apt install sudo gpg wget -y
|
||||||
|
sudo chroot debian wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list
|
||||||
|
sudo chroot debian bash -c "wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg"
|
||||||
|
sudo chroot debian apt update
|
||||||
|
sudo chroot debian apt install box64 wine -y
|
||||||
|
## 获取 Wine 运行器安装包
|
||||||
|
git clone https://github.com/gfdgd-xi/deep-wine-runner --depth=1
|
||||||
|
cd deep-wine-runner
|
||||||
|
make package-deb
|
||||||
|
cd ..
|
||||||
|
url=`python3 deep-wine-runner/off-line-shell/GetNewestDebUrl.py`
|
||||||
|
#wget $url
|
||||||
|
mv deep-wine-runner/spark-deepin-wine-runner.deb debian/tmp/wine-runner.deb
|
||||||
|
## 安装
|
||||||
|
sudo chroot debian apt install locales /tmp/wine-runner.deb fcitx xfce4-terminal -y
|
||||||
|
sudo chroot debian apt install libxenmisc4.17 libxenstore4 libxenforeignmemory1 -y
|
||||||
|
# 构建软件包
|
||||||
|
mkdir package/runner -p
|
||||||
|
sudo cp debian/usr/local/bin package -rv
|
||||||
|
sudo cp debian/usr/bin package -rv
|
||||||
|
sudo cp debian/usr/lib package -rv
|
||||||
|
sudo cp debian/usr/share package -rv
|
||||||
|
#sudo cp debian/usr/lib64 package -rv
|
||||||
|
sudo cp debian/opt/apps/deepin-wine-runner/* package/runner -rv
|
||||||
|
# 精简运行器体积
|
||||||
|
sudo rm -rf package/runner/2048
|
||||||
|
sudo rm -rf package/runner/geek.exe
|
||||||
|
sudo rm -rf package/runner/BeCyIconGrabber.exe
|
||||||
|
sudo rm -rf package/runner/Icon
|
||||||
|
sudo rm -rf package/runner/RegShot.exe
|
||||||
|
sudo rm -rf package/runner/novnc
|
||||||
|
sudo rm -rf package/bin/wine*
|
||||||
|
cp deep-wine-runner/off-line-shell/run.sh package -rv
|
||||||
|
cp deep-wine-runner/off-line-shell/bwrap_arm64 package/bwrap -rv
|
||||||
|
sudo chmod 777 -Rv package ; true
|
||||||
|
cd package
|
||||||
|
# 添加 Wine 运行器离线模式标识
|
||||||
|
touch runner/off-line.lock
|
||||||
|
tar -cvf ../spark-deepin-wine-runner-off-line.tar *
|
||||||
|
cd ..
|
||||||
|
xz -T $cpu spark-deepin-wine-runner-off-line.tar
|
||||||
|
- name: upload result
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: spark-deepin-wine-runner-off-line.tar.xz
|
||||||
|
path: /home/runner/spark-deepin-wine-runner-off-line.tar.xz
|
||||||
|
|
||||||
|
|
||||||
27
.github/workflows/building-off-line-package.yml
vendored
27
.github/workflows/building-off-line-package.yml
vendored
@@ -1,16 +1,13 @@
|
|||||||
name: Building Wine Runner Off-line Pages(amd64)
|
name: Building Wine Runner Off-line Pages(amd64)
|
||||||
run-name: ${{ github.actor }} Building Wine Runner Off-line Pages(amd64) 🚀
|
run-name: ${{ github.actor }} Building Wine Runner Off-line Pages(amd64) 🚀
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
Explore-GitHub-Actions:
|
Explore-GitHub-Actions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Building DEB
|
- name: Building DEB
|
||||||
env:
|
|
||||||
GUSER: ${{ secrets.GUSER }}
|
|
||||||
PASSWORD: ${{ secrets.PASSWORD }}
|
|
||||||
UPLOADURL: ${{ secrets.UPLOADURL }}
|
|
||||||
run: |
|
run: |
|
||||||
# 获取所需数据
|
# 获取所需数据
|
||||||
cpu=$(cat /proc/cpuinfo | grep processor | wc -l)
|
cpu=$(cat /proc/cpuinfo | grep processor | wc -l)
|
||||||
@@ -30,7 +27,7 @@ jobs:
|
|||||||
## 加入 wine 源
|
## 加入 wine 源
|
||||||
sudo chroot debian dpkg --add-architecture i386
|
sudo chroot debian dpkg --add-architecture i386
|
||||||
sudo chroot debian apt update
|
sudo chroot debian apt update
|
||||||
sudo chroot debian apt install wget -y
|
sudo chroot debian apt install sudo gpg wget -y
|
||||||
sudo chroot debian wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
sudo chroot debian wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
||||||
sudo chroot debian wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
|
sudo chroot debian wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources
|
||||||
sudo chroot debian apt update
|
sudo chroot debian apt update
|
||||||
@@ -44,15 +41,22 @@ jobs:
|
|||||||
mv deep-wine-runner/spark-deepin-wine-runner.deb debian/tmp/wine-runner.deb
|
mv deep-wine-runner/spark-deepin-wine-runner.deb debian/tmp/wine-runner.deb
|
||||||
## 安装
|
## 安装
|
||||||
sudo chroot debian apt install locales /tmp/wine-runner.deb winehq-devel fcitx xfce4-terminal -y
|
sudo chroot debian apt install locales /tmp/wine-runner.deb winehq-devel fcitx xfce4-terminal -y
|
||||||
|
sudo chroot debian apt install libxenmisc4.17 libxenstore4 libxenforeignmemory1 -y
|
||||||
# 构建软件包
|
# 构建软件包
|
||||||
mkdir package/opt -p
|
|
||||||
mkdir package/runner -p
|
mkdir package/runner -p
|
||||||
sudo cp debian/opt/wine-devel package/opt -rv
|
|
||||||
sudo cp debian/usr/bin package -rv
|
sudo cp debian/usr/bin package -rv
|
||||||
sudo cp debian/usr/lib package -rv
|
sudo cp debian/usr/lib package -rv
|
||||||
sudo cp debian/usr/lib32 package -rv
|
sudo cp debian/usr/share package -rv
|
||||||
sudo cp debian/usr/lib64 package -rv
|
sudo cp debian/usr/lib64 package -rv
|
||||||
sudo cp debian/opt/apps/deepin-wine-runner/* package/runner -rv
|
sudo cp debian/opt/apps/deepin-wine-runner/* package/runner -rv
|
||||||
|
# 精简运行器体积
|
||||||
|
sudo rm -rf package/runner/2048
|
||||||
|
sudo rm -rf package/runner/geek.exe
|
||||||
|
sudo rm -rf package/runner/BeCyIconGrabber.exe
|
||||||
|
sudo rm -rf package/runner/Icon
|
||||||
|
sudo rm -rf package/runner/RegShot.exe
|
||||||
|
sudo rm -rf package/runner/novnc
|
||||||
|
sudo rm -rf package/bin/wine*
|
||||||
cp deep-wine-runner/off-line-shell/run.sh package -rv
|
cp deep-wine-runner/off-line-shell/run.sh package -rv
|
||||||
cp deep-wine-runner/off-line-shell/bwrap_amd64 package/bwrap -rv
|
cp deep-wine-runner/off-line-shell/bwrap_amd64 package/bwrap -rv
|
||||||
sudo chmod 777 -Rv package ; true
|
sudo chmod 777 -Rv package ; true
|
||||||
@@ -62,17 +66,10 @@ jobs:
|
|||||||
tar -cvf ../spark-deepin-wine-runner-off-line.tar *
|
tar -cvf ../spark-deepin-wine-runner-off-line.tar *
|
||||||
cd ..
|
cd ..
|
||||||
xz -T $cpu spark-deepin-wine-runner-off-line.tar
|
xz -T $cpu spark-deepin-wine-runner-off-line.tar
|
||||||
cp deep-wine-runner/off-line-shell/compression-packager.sh spark-deepin-wine-runner-off-line.sh
|
|
||||||
cat spark-deepin-wine-runner-off-line.tar.xz >> spark-deepin-wine-runner-off-line.sh
|
|
||||||
- name: upload result
|
- name: upload result
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: spark-deepin-wine-runner-off-line.tar.xz
|
name: spark-deepin-wine-runner-off-line.tar.xz
|
||||||
path: /home/runner/spark-deepin-wine-runner-off-line.tar.xz
|
path: /home/runner/spark-deepin-wine-runner-off-line.tar.xz
|
||||||
- name: upload result
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: spark-deepin-wine-runner-off-line.sh
|
|
||||||
path: /home/runner/spark-deepin-wine-runner-off-line.sh
|
|
||||||
|
|
||||||
|
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
#################
|
#################
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import globalenv
|
||||||
import traceback
|
import traceback
|
||||||
import updatekiller
|
import updatekiller
|
||||||
import PyQt5.QtGui as QtGui
|
import PyQt5.QtGui as QtGui
|
||||||
@@ -101,7 +102,10 @@ homePath = os.getenv("HOME")
|
|||||||
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
|
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
|
||||||
#GetDesktopList(f"{homePath}/.local/share/applications")
|
#GetDesktopList(f"{homePath}/.local/share/applications")
|
||||||
#print(desktopList)
|
#print(desktopList)
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
if (__name__ == "__main__"):
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
else:
|
||||||
|
app = globalenv.get_value("app")
|
||||||
window = QtWidgets.QMainWindow()
|
window = QtWidgets.QMainWindow()
|
||||||
widget = QtWidgets.QWidget()
|
widget = QtWidgets.QWidget()
|
||||||
layout = QtWidgets.QGridLayout()
|
layout = QtWidgets.QGridLayout()
|
||||||
@@ -118,6 +122,7 @@ window.setCentralWidget(widget)
|
|||||||
window.setWindowTitle("图标管理")
|
window.setWindowTitle("图标管理")
|
||||||
window.resize(int(window.frameGeometry().width() * 1.5), int(window.frameGeometry().height() * 1.2))
|
window.resize(int(window.frameGeometry().width() * 1.5), int(window.frameGeometry().height() * 1.2))
|
||||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||||
window.show()
|
|
||||||
GetDesktopThread()
|
GetDesktopThread()
|
||||||
app.exec_()
|
if (__name__ == "__main__"):
|
||||||
|
window.show()
|
||||||
|
app.exec_()
|
||||||
@@ -8,4 +8,8 @@ import requests
|
|||||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
with open(f"{programPath}/information.json") as file:
|
with open(f"{programPath}/information.json") as file:
|
||||||
version = json.loads(file.read())["Version"]
|
version = json.loads(file.read())["Version"]
|
||||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9JbnN0YWxsLnBocD9WZXJzaW9uPQ==").decode("utf-8") + version).text)
|
print(requests.get(base64.b64decode("aHR0cHM6Ly9zb3VyY2Vmb3JnZS5uZXQvcHJvamVjdHMvZGVlcC13aW5lLXJ1bm5lci13aW5lLWRvd25sb2FkL2ZpbGVzL2Rvd25sb2FkLXRpbWUv").decode("utf-8")
|
||||||
|
+ version
|
||||||
|
+ base64.b64decode("L2Rvd25sb2Fk").decode("utf-8"),
|
||||||
|
timeout=5 # timeout 设置为 5S
|
||||||
|
).text)
|
||||||
1
Makefile
1
Makefile
@@ -147,6 +147,7 @@ copy-files:
|
|||||||
cp -rv InstallBox86.sh deb/opt/apps/deepin-wine-runner
|
cp -rv InstallBox86.sh deb/opt/apps/deepin-wine-runner
|
||||||
cp -rv InstallRuntime deb/opt/apps/deepin-wine-runner
|
cp -rv InstallRuntime deb/opt/apps/deepin-wine-runner
|
||||||
if [[ ! -d novnc/utils/websockify ]]; then git submodule update --init --recursive ; fi
|
if [[ ! -d novnc/utils/websockify ]]; then git submodule update --init --recursive ; fi
|
||||||
|
if [[ ! -d novnc/utils/websockify ]]; then cd novnc/utils; git clone https://github.com/novnc/websockify ; fi
|
||||||
cp -rv novnc deb/opt/apps/deepin-wine-runner
|
cp -rv novnc deb/opt/apps/deepin-wine-runner
|
||||||
mkdir -pv deb/opt/apps/deepin-wine-runner/entries/
|
mkdir -pv deb/opt/apps/deepin-wine-runner/entries/
|
||||||
cp -rv deb/usr/share/applications deb/opt/apps/deepin-wine-runner/entries/applications
|
cp -rv deb/usr/share/applications deb/opt/apps/deepin-wine-runner/entries/applications
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Wine 运行器 QQ 交流群:762985460
|
|||||||
Wine 运行器离线包下载地址:https://www.123pan.com/s/pDSKVv-pAJWv.html
|
Wine 运行器离线包下载地址:https://www.123pan.com/s/pDSKVv-pAJWv.html
|
||||||
|
|
||||||
### Wine 运行器 For Termux 安装方法以及注意事项
|
### Wine 运行器 For Termux 安装方法以及注意事项
|
||||||
|
Wine 运行器 For Termux 使用的是独立的安装包,详细见:
|
||||||
见 https://gitee.com/gfdgd-xi/deep-wine-runner-termux
|
见 https://gitee.com/gfdgd-xi/deep-wine-runner-termux
|
||||||
https://github.com/gfdgd-xi/deep-wine-runner-termux
|
https://github.com/gfdgd-xi/deep-wine-runner-termux
|
||||||
|
|
||||||
@@ -57,14 +58,6 @@ https://gfdgdxi.lanzouw.com/b0plly5cj
|
|||||||
spark-deepin-wine-runner 是普通包,spark-deepin-wine-runner-ace 是使用 ace 兼容环境运行的运行器
|
spark-deepin-wine-runner 是普通包,spark-deepin-wine-runner-ace 是使用 ace 兼容环境运行的运行器
|
||||||
|
|
||||||
## Wine 运行器离线包
|
## Wine 运行器离线包
|
||||||
### X86
|
|
||||||
123pan:https://www.123pan.com/s/pDSKVv-pAJWv.html
|
|
||||||
百度网盘:https://pan.baidu.com/s/1klBw63tw2_ZQLzmi11dDBw?pwd=7bu5 提取码: 7bu5
|
|
||||||
诚通网盘:http://ctfile.gfdgdxi.top/d/31540479-59254792-909739?p=2061 (访问密码: 2061)
|
|
||||||
Github:https://github.com/gfdgd-xi/deep-wine-runner/releases/
|
|
||||||
Sourceforge:https://sourceforge.net/projects/deep-wine-runner/files/
|
|
||||||
更多需求需要私聊作者定制(有偿服务)
|
|
||||||
### ARM
|
|
||||||
需要私聊作者定制(有偿服务)
|
需要私聊作者定制(有偿服务)
|
||||||
|
|
||||||
## 软件架构
|
## 软件架构
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ Depends: python3,
|
|||||||
fakeroot,
|
fakeroot,
|
||||||
which,
|
which,
|
||||||
git,
|
git,
|
||||||
xfwm4,
|
|
||||||
tigervnc,
|
|
||||||
proot,
|
proot,
|
||||||
bash
|
bash
|
||||||
Recommends: winbind,
|
Recommends: winbind,
|
||||||
|
tigervnc | termux-x11-nightly | termux-x11,
|
||||||
|
xfwm4,
|
||||||
wimtools | wimlib,
|
wimtools | wimlib,
|
||||||
python3-pyquery,
|
python3-pyquery,
|
||||||
python3-pyqt5.qtwebengine | pyqtwebengine,
|
python3-pyqt5.qtwebengine | pyqtwebengine,
|
||||||
@@ -53,7 +53,14 @@ Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, s
|
|||||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
||||||
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
||||||
Installed-Size: @@SIZE@@
|
Installed-Size: @@SIZE@@
|
||||||
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
|
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的
|
||||||
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
|
程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决
|
||||||
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
|
该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的
|
||||||
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
|
Wine程序打包器、运行库安装工具等。
|
||||||
|
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,
|
||||||
|
可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架
|
||||||
|
构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
|
||||||
|
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安
|
||||||
|
装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
|
||||||
|
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。
|
||||||
|
同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
|
||||||
|
|||||||
@@ -108,7 +108,10 @@ fi
|
|||||||
# 设置目录权限,让用户可读可写,方便后续删除组件
|
# 设置目录权限,让用户可读可写,方便后续删除组件
|
||||||
chmod 777 -R /opt/apps/deepin-wine-runner > /dev/null 2>&1 | true
|
chmod 777 -R /opt/apps/deepin-wine-runner > /dev/null 2>&1 | true
|
||||||
|
|
||||||
if [[ ! -f /data/data/com.termux/files/home/.vnc/passwd ]]; then
|
# 向服务器返回安装数加1(不显示内容且忽略错误)
|
||||||
|
python3 /opt/apps/deepin-wine-runner/Download.py $version > /dev/null 2>&1 | true
|
||||||
|
|
||||||
|
if [[ ! -f /data/data/com.termux/files/home/.vnc/passwd ]] && [[ -f /data/data/com.termux/files/usr/bin/vncpasswd ]]; then
|
||||||
echo 开始配置 VNCServer
|
echo 开始配置 VNCServer
|
||||||
echo 接下来需要设置 VNCServer 的密码
|
echo 接下来需要设置 VNCServer 的密码
|
||||||
set +e
|
set +e
|
||||||
@@ -121,11 +124,11 @@ if [[ ! -f /data/data/com.termux/files/home/.vnc/passwd ]]; then
|
|||||||
echo 设置有误,需重新设置
|
echo 设置有误,需重新设置
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
echo 'Wine 运行器安装完成,如果没有设置 $DISPLAY 变量的情况下打开 Wine 运行器'
|
||||||
|
echo '可以在浏览器输入网址 http://localhost:6080/vnc.html 远程访问'
|
||||||
|
echo '或者用 VNC 远程工具输入 localhost:5 远程访问'
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 向服务器返回安装数加1(不显示内容且忽略错误)
|
|
||||||
python3 /opt/apps/deepin-wine-runner/Download.py $version > /dev/null 2>&1 | true
|
|
||||||
|
|
||||||
echo 'Wine 运行器安装完成,如果没有设置 $DISPLAY 变量的情况下打开 Wine 运行器'
|
|
||||||
echo '可以在浏览器输入网址 http://localhost:6080/vnc.html 远程访问'
|
|
||||||
echo '或者用 VNC 远程工具输入 localhost:5 远程访问'
|
|
||||||
|
|||||||
@@ -49,7 +49,14 @@ Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, s
|
|||||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux
|
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux
|
||||||
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux
|
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux
|
||||||
Installed-Size: @@SIZE@@
|
Installed-Size: @@SIZE@@
|
||||||
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
|
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的
|
||||||
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
|
程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决
|
||||||
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
|
该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的
|
||||||
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
|
Wine程序打包器、运行库安装工具等。
|
||||||
|
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,
|
||||||
|
可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架
|
||||||
|
构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
|
||||||
|
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安
|
||||||
|
装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
|
||||||
|
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。
|
||||||
|
同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import PyQt5.QtCore as QtCore
|
|||||||
import PyQt5.QtWidgets as QtWidgets
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
from DefaultSetting import *
|
from DefaultSetting import *
|
||||||
|
|
||||||
|
import globalenv
|
||||||
|
|
||||||
def ShowText(text: str):
|
def ShowText(text: str):
|
||||||
if text.replace(" ", "").replace("\n", "") == "":
|
if text.replace(" ", "").replace("\n", "") == "":
|
||||||
return
|
return
|
||||||
@@ -669,82 +671,94 @@ def BrowserExe():
|
|||||||
exePath.setText(filePath[0])
|
exePath.setText(filePath[0])
|
||||||
|
|
||||||
chooseWine = ""
|
chooseWine = ""
|
||||||
if __name__ == "__main__":
|
|
||||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
|
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
|
||||||
information = json.loads(ReadTxt(f"{programPath}/information.json"))
|
information = json.loads(ReadTxt(f"{programPath}/information.json"))
|
||||||
iconListUnBuild = json.loads(ReadTxt(f"{programPath}/IconList.json"))[0]
|
iconListUnBuild = json.loads(ReadTxt(f"{programPath}/IconList.json"))[0]
|
||||||
iconList = json.loads(ReadTxt(f"{programPath}/IconList.json"))[1]
|
iconList = json.loads(ReadTxt(f"{programPath}/IconList.json"))[1]
|
||||||
for i in iconListUnBuild:
|
for i in iconListUnBuild:
|
||||||
iconList.append(i)
|
iconList.append(i)
|
||||||
|
if (__name__ == "__main__"):
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
version = information["Version"]
|
else:
|
||||||
window = QtWidgets.QMainWindow()
|
app = globalenv.get_value("app")
|
||||||
widget = QtWidgets.QWidget()
|
version = information["Version"]
|
||||||
layout = QtWidgets.QGridLayout()
|
window = QtWidgets.QMainWindow()
|
||||||
exePath = QtWidgets.QLineEdit()
|
widget = QtWidgets.QWidget()
|
||||||
wineChooser = QtWidgets.QComboBox()
|
layout = QtWidgets.QGridLayout()
|
||||||
browserExeButton = QtWidgets.QPushButton("浏览……")
|
exePath = QtWidgets.QLineEdit()
|
||||||
logText = QtWidgets.QTextBrowser()
|
wineChooser = QtWidgets.QComboBox()
|
||||||
logText.setStyleSheet("""
|
browserExeButton = QtWidgets.QPushButton("浏览……")
|
||||||
background-color: black;
|
logText = QtWidgets.QTextBrowser()
|
||||||
color: white;
|
logText.setStyleSheet("""
|
||||||
""")
|
background-color: black;
|
||||||
wineChooserList = [
|
color: white;
|
||||||
"使用 Deepin Wine8 Stable 打包应用",
|
""")
|
||||||
"使用 Spark Wine9 wow 打包应用",
|
wineChooserList = [
|
||||||
"使用 Spark Wine9 打包应用",
|
"使用 Deepin Wine8 Stable 打包应用",
|
||||||
"使用 Spark Wine8 打包应用",
|
"使用 Spark Wine9 wow 打包应用",
|
||||||
"使用 Spark Wine7 Devel 打包应用",
|
"使用 Spark Wine9 打包应用",
|
||||||
"使用 Deepin Wine6 Stable 打包应用",
|
"使用 Spark Wine8 打包应用",
|
||||||
"使用 Deepin Wine5 Stable 打包应用",
|
"使用 Spark Wine7 Devel 打包应用",
|
||||||
"使用 Deepin Wine5 打包应用",
|
"使用 Deepin Wine6 Stable 打包应用",
|
||||||
"使用 Deepin Wine2 打包应用",
|
"使用 Deepin Wine5 Stable 打包应用",
|
||||||
"使用 Spark Wine 打包应用"
|
"使用 Deepin Wine5 打包应用",
|
||||||
]
|
"使用 Deepin Wine2 打包应用",
|
||||||
wineChooserIndex = 2
|
"使用 Spark Wine 打包应用"
|
||||||
wineList = ["deepin-wine8-stable", "spark-wine9-wow", "spark-wine9", "spark-wine8", "spark-wine7-devel", "deepin-wine6-stable", "deepin-wine6-vannila", "spark-wine8-wow", "deepin-wine5-stable", "deepin-wine5", "deepin-wine", "spark-wine"]
|
]
|
||||||
for i in range(len(wineList)):
|
wineChooserIndex = 2
|
||||||
if not os.system(f"which '{wineList[i]}'"):
|
wineList = ["deepin-wine8-stable", "spark-wine9-wow", "spark-wine9", "spark-wine8", "spark-wine7-devel", "deepin-wine6-stable", "deepin-wine6-vannila", "spark-wine8-wow", "deepin-wine5-stable", "deepin-wine5", "deepin-wine", "spark-wine"]
|
||||||
wineChooserIndex = i
|
for i in range(len(wineList)):
|
||||||
break
|
if not os.system(f"which '{wineList[i]}'"):
|
||||||
chooseWine = wineList[wineChooserIndex]
|
wineChooserIndex = i
|
||||||
wineChooserList[wineChooserIndex] = f"{wineChooserList[wineChooserIndex]}(推荐,如无特殊需求不建议更换)"
|
break
|
||||||
wineChooser.addItems(wineChooserList)
|
chooseWine = wineList[wineChooserIndex]
|
||||||
wineChooser.setCurrentIndex(wineChooserIndex)
|
wineChooserList[wineChooserIndex] = f"{wineChooserList[wineChooserIndex]}(推荐,如无特殊需求不建议更换)"
|
||||||
controlLayout = QtWidgets.QHBoxLayout()
|
wineChooser.addItems(wineChooserList)
|
||||||
buildButton = QtWidgets.QPushButton("现在打包……")
|
wineChooser.setCurrentIndex(wineChooserIndex)
|
||||||
installCmpleteButton = QtWidgets.QPushButton("安装程序执行完成")
|
controlLayout = QtWidgets.QHBoxLayout()
|
||||||
helpButton = QtWidgets.QPushButton("帮助")
|
buildButton = QtWidgets.QPushButton("现在打包……")
|
||||||
installUosPackingTool = QtWidgets.QPushButton("安装维护工具箱(可以安装测试 deb)")
|
installCmpleteButton = QtWidgets.QPushButton("安装程序执行完成")
|
||||||
browserExeButton.clicked.connect(BrowserExe)
|
helpButton = QtWidgets.QPushButton("帮助")
|
||||||
buildButton.clicked.connect(RunBuildThread)
|
installUosPackingTool = QtWidgets.QPushButton("安装维护工具箱(可以安装测试 deb)")
|
||||||
installCmpleteButton.clicked.connect(PressCompleteDownload)
|
browserExeButton.clicked.connect(BrowserExe)
|
||||||
helpButton.clicked.connect(ReadMe)
|
buildButton.clicked.connect(RunBuildThread)
|
||||||
def InstallUosPackingTool():
|
installCmpleteButton.clicked.connect(PressCompleteDownload)
|
||||||
if os.system("which spark-store"):
|
helpButton.clicked.connect(ReadMe)
|
||||||
QtWidgets.QMessageBox.critical(window, "提示", "未安装星火应用商店,无法继续\n星火应用商店官网:https://spark-app.store/")
|
def InstallUosPackingTool():
|
||||||
return 0
|
if os.system("which spark-store"):
|
||||||
threading.Thread(target=os.system, args=["spark-store spk://store/tools/uos-packaging-tools"]).start()
|
QtWidgets.QMessageBox.critical(window, "提示", "未安装星火应用商店,无法继续\n星火应用商店官网:https://spark-app.store/")
|
||||||
installUosPackingTool.clicked.connect(InstallUosPackingTool)
|
return 0
|
||||||
installCmpleteButton.setDisabled(True)
|
threading.Thread(target=os.system, args=["spark-store spk://store/tools/uos-packaging-tools"]).start()
|
||||||
controlLayout.addWidget(buildButton)
|
installUosPackingTool.clicked.connect(InstallUosPackingTool)
|
||||||
controlLayout.addWidget(installCmpleteButton)
|
installCmpleteButton.setDisabled(True)
|
||||||
controlLayout.addWidget(helpButton)
|
controlLayout.addWidget(buildButton)
|
||||||
controlLayout.addWidget(installUosPackingTool)
|
controlLayout.addWidget(installCmpleteButton)
|
||||||
layout.addWidget(QtWidgets.QLabel("选择 EXE:"), 0, 0)
|
controlLayout.addWidget(helpButton)
|
||||||
layout.addWidget(exePath, 0, 1)
|
controlLayout.addWidget(installUosPackingTool)
|
||||||
layout.addWidget(browserExeButton, 0, 2)
|
layout.addWidget(QtWidgets.QLabel("选择 EXE:"), 0, 0)
|
||||||
layout.addWidget(wineChooser, 1, 1)
|
layout.addWidget(exePath, 0, 1)
|
||||||
layout.addLayout(controlLayout, 2, 1)
|
layout.addWidget(browserExeButton, 0, 2)
|
||||||
layout.addWidget(logText, 3, 0, 1, 3)
|
layout.addWidget(wineChooser, 1, 1)
|
||||||
widget.setLayout(layout)
|
layout.addLayout(controlLayout, 2, 1)
|
||||||
window.setCentralWidget(widget)
|
layout.addWidget(logText, 3, 0, 1, 3)
|
||||||
window.setWindowTitle(f"Wine 运行器 {version}——简易打包器")
|
widget.setLayout(layout)
|
||||||
try:
|
window.setCentralWidget(widget)
|
||||||
exePath.setText(sys.argv[1])
|
window.setWindowTitle(f"Wine 运行器 {version}——简易打包器")
|
||||||
except:
|
try:
|
||||||
pass
|
exePath.setText(sys.argv[1])
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
if (__name__ != "__main__"):
|
||||||
|
# 设置滚动条
|
||||||
|
areaScroll = QtWidgets.QScrollArea(window)
|
||||||
|
areaScroll.setWidgetResizable(True)
|
||||||
|
areaScroll.setWidget(widget)
|
||||||
|
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||||
|
window.setCentralWidget(areaScroll)
|
||||||
|
|
||||||
|
if (__name__ == "__main__"):
|
||||||
window.resize(int(window.frameGeometry().width() * 1.2), int(window.frameGeometry().height() * 1.1))
|
window.resize(int(window.frameGeometry().width() * 1.2), int(window.frameGeometry().height() * 1.1))
|
||||||
window.show()
|
window.show()
|
||||||
# 设置字体
|
# 设置字体
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import PyQt5.QtWidgets as QtWidgets
|
|||||||
from trans import *
|
from trans import *
|
||||||
from DefaultSetting import *
|
from DefaultSetting import *
|
||||||
from Model import *
|
from Model import *
|
||||||
|
import globalenv
|
||||||
|
|
||||||
TMPDIR = os.getenv("TMPDIR")
|
TMPDIR = os.getenv("TMPDIR")
|
||||||
if (TMPDIR == None):
|
if (TMPDIR == None):
|
||||||
@@ -414,7 +415,7 @@ class make_deb_threading(QtCore.QThread):
|
|||||||
"Architecture": debFirstArch.currentText(),
|
"Architecture": debFirstArch.currentText(),
|
||||||
"Depends": [
|
"Depends": [
|
||||||
f"{wine[wineVersion.currentText()]}, deepin-wine-helper | com.wine-helper.deepin, fonts-wqy-microhei, fonts-wqy-zenhei",
|
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())],
|
][int(chooseWineHelperValue.isChecked())],
|
||||||
"postinst": ['', f'''#!/bin/bash
|
"postinst": ['', f'''#!/bin/bash
|
||||||
PACKAGE_NAME="{e1_text.text()}"
|
PACKAGE_NAME="{e1_text.text()}"
|
||||||
@@ -1360,7 +1361,7 @@ true
|
|||||||
print("c")
|
print("c")
|
||||||
if os.path.exists(wine[wineVersion.currentText()]):
|
if os.path.exists(wine[wineVersion.currentText()]):
|
||||||
debInformation[0]["Depends"] = ["deepin-wine-helper | com.wine-helper.deepin",
|
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"][]
|
][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")
|
print("d")
|
||||||
debInformation[0]["run.sh"] = f'''#!/bin/sh
|
debInformation[0]["run.sh"] = f'''#!/bin/sh
|
||||||
@@ -1918,14 +1919,14 @@ def BrowserHelperConfigPathText():
|
|||||||
def ChangeWine():
|
def ChangeWine():
|
||||||
useInstallWineArch.setEnabled(os.path.exists(wine[wineVersion.currentText()]))
|
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",
|
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())])
|
][int(chooseWineHelperValue.isChecked())])
|
||||||
debRecommend.setText("")
|
debRecommend.setText("")
|
||||||
helperConfigPathText.setEnabled(chooseWineHelperValue.isChecked())
|
helperConfigPathText.setEnabled(chooseWineHelperValue.isChecked())
|
||||||
helperConfigPathButton.setEnabled(chooseWineHelperValue.isChecked())
|
helperConfigPathButton.setEnabled(chooseWineHelperValue.isChecked())
|
||||||
if os.path.exists(wine[wineVersion.currentText()]):
|
if os.path.exists(wine[wineVersion.currentText()]):
|
||||||
debDepends.setText(["deepin-wine-helper | com.wine-helper.deepin",
|
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())])
|
][int(chooseWineHelperValue.isChecked())])
|
||||||
#if "deepin-wine5-stable" in wine[wineVersion.currentText()]:
|
#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")
|
# 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")
|
||||||
@@ -2366,7 +2367,10 @@ tips = transla.transe("U", """提示:
|
|||||||
# 窗口创建
|
# 窗口创建
|
||||||
###############
|
###############
|
||||||
|
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
if (__name__ == "__main__"):
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
else:
|
||||||
|
app = globalenv.get_value("app")
|
||||||
window = QtWidgets.QMainWindow()
|
window = QtWidgets.QMainWindow()
|
||||||
widget = QtWidgets.QWidget()
|
widget = QtWidgets.QWidget()
|
||||||
|
|
||||||
@@ -2703,7 +2707,8 @@ SetFont(app)
|
|||||||
window.setCentralWidget(widget)
|
window.setCentralWidget(widget)
|
||||||
# 判断是否为小屏幕,是则设置滚动条并全屏
|
# 判断是否为小屏幕,是则设置滚动条并全屏
|
||||||
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
|
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
|
||||||
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9):
|
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9 or
|
||||||
|
__name__ != "__main__"):
|
||||||
# 设置滚动条
|
# 设置滚动条
|
||||||
areaScroll = QtWidgets.QScrollArea(window)
|
areaScroll = QtWidgets.QScrollArea(window)
|
||||||
areaScroll.setWidgetResizable(True)
|
areaScroll.setWidgetResizable(True)
|
||||||
@@ -2711,8 +2716,8 @@ if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().siz
|
|||||||
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
|
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||||
window.setCentralWidget(areaScroll)
|
window.setCentralWidget(areaScroll)
|
||||||
window.showMaximized() # 设置全屏
|
window.showMaximized() # 设置全屏
|
||||||
window.show()
|
|
||||||
|
|
||||||
window.show()
|
if (__name__ == "__main__"):
|
||||||
sys.exit(app.exec_())
|
window.show()
|
||||||
# Flag:解包只读control和解包全部读取
|
sys.exit(app.exec_())
|
||||||
|
# Flag:解包只读control和解包全部读取
|
||||||
|
|||||||
20
globalenv.py
Normal file
20
globalenv.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# 用于实现主模块的变量可被子模块调用和读取
|
||||||
|
# 要在主模块和需要的子模块分别 import globalenv
|
||||||
|
# 然后需要在主模块进行初始化(_init),子模块不要重复 init
|
||||||
|
# 接着即可调用 set_value 和 get_value 存放/读取变量
|
||||||
|
def _init(): #初始化(在主模块初始化,不要在子模块重复 init)
|
||||||
|
global _global_dict
|
||||||
|
_global_dict = {}
|
||||||
|
|
||||||
|
def set_value(key :str, value):
|
||||||
|
""" 定义一个全局变量 """
|
||||||
|
_global_dict[key] = value
|
||||||
|
|
||||||
|
""" 获得一个全局变量,不存在则返回默认值 """
|
||||||
|
def get_value(key, defValue=None):
|
||||||
|
try:
|
||||||
|
return _global_dict[key]
|
||||||
|
except KeyError:
|
||||||
|
return defValue
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "4.0.0",
|
"Version": "4.0.0.2",
|
||||||
"Time": "未知",
|
"Time": "未知",
|
||||||
"Thank": [
|
"Thank": [
|
||||||
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ CURRENT_DIR=$(dirname $(readlink -f "$0"))
|
|||||||
if [[ ! -d $TMPDIR/tmp ]]; then
|
if [[ ! -d $TMPDIR/tmp ]]; then
|
||||||
mkdir -p $TMPDIR/tmp
|
mkdir -p $TMPDIR/tmp
|
||||||
fi
|
fi
|
||||||
noVNCOption="--vnc localhost:5901"
|
noVNCOption="--listen localhost:6080"
|
||||||
VNCServerOption="-localhost yes"
|
VNCServerOption="-localhost yes"
|
||||||
if [[ -f $HOME/.config/deepin-wine-runner/vnc-public ]]; then
|
if [[ -f $HOME/.config/deepin-wine-runner/vnc-public ]]; then
|
||||||
unset noVNCOption
|
unset noVNCOption
|
||||||
unset VNCServerOption
|
unset VNCServerOption
|
||||||
fi
|
fi
|
||||||
if [[ $DISPLAY == "" ]] && [[ $WAYLAND_DISPLAY == "" ]]; then
|
if [[ $DISPLAY == "" ]] && [[ $WAYLAND_DISPLAY == "" ]] && [[ -f /data/data/com.termux/files/usr/bin/vncpasswd ]]; then
|
||||||
# 自动配置 NoVNC
|
# 自动配置 NoVNC
|
||||||
export DISPLAY=:5
|
export DISPLAY=:5
|
||||||
vncserver -kill :5
|
vncserver -kill :5
|
||||||
|
|||||||
@@ -50,8 +50,13 @@ from trans import *
|
|||||||
from Model import *
|
from Model import *
|
||||||
from DefaultSetting import *
|
from DefaultSetting import *
|
||||||
|
|
||||||
|
import globalenv
|
||||||
|
|
||||||
def PythonLower():
|
def PythonLower():
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
if (__name__ == "__main__"):
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
else:
|
||||||
|
app = globalenv.get_value("app")
|
||||||
QtWidgets.QMessageBox.critical(None, "错误", "Python 至少需要 3.6 及以上版本,目前版本:" + platform.python_version() + "")
|
QtWidgets.QMessageBox.critical(None, "错误", "Python 至少需要 3.6 及以上版本,目前版本:" + platform.python_version() + "")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@@ -448,7 +453,7 @@ def about_this_program()->"显示“关于这个程序”窗口":
|
|||||||
if i[-4:] == ".svg" or i[-4:] == ".png":
|
if i[-4:] == ".svg" or i[-4:] == ".png":
|
||||||
iconPathList.append(f"{programPath}/Icon/{k}/{i}")
|
iconPathList.append(f"{programPath}/Icon/{k}/{i}")
|
||||||
except:
|
except:
|
||||||
traceback.print_exec()
|
traceback.print_exc()
|
||||||
randomNumber = random.randint(0, len(iconPathList) - 1)
|
randomNumber = random.randint(0, len(iconPathList) - 1)
|
||||||
iconShow.setText(f"<a href='https://www.gfdgdxi.top'><img width=256 src='{iconPathList[randomNumber]}'></a><p align='center'>{randomNumber + 1}/{len(iconPathList)}</p>")
|
iconShow.setText(f"<a href='https://www.gfdgdxi.top'><img width=256 src='{iconPathList[randomNumber]}'></a><p align='center'>{randomNumber + 1}/{len(iconPathList)}</p>")
|
||||||
iconShow.linkActivated.connect(ChangeIcon)
|
iconShow.linkActivated.connect(ChangeIcon)
|
||||||
@@ -2456,7 +2461,6 @@ def CheckWine():
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
QtWidgets.QMessageBox.critical(None, "错误", f"无法读取配置,无法继续\n{traceback.format_exc()}")
|
QtWidgets.QMessageBox.critical(None, "错误", f"无法读取配置,无法继续\n{traceback.format_exc()}")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
CheckWine()
|
CheckWine()
|
||||||
@@ -2468,7 +2472,10 @@ print(wine)
|
|||||||
###########################
|
###########################
|
||||||
# 程序信息
|
# 程序信息
|
||||||
###########################
|
###########################
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
if (__name__ == "__main__"):
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
else:
|
||||||
|
app = globalenv.get_value("app")
|
||||||
trans = QtCore.QTranslator()
|
trans = QtCore.QTranslator()
|
||||||
transeObject = QtCore.QObject()
|
transeObject = QtCore.QObject()
|
||||||
transla = QtCore.QCoreApplication.translate
|
transla = QtCore.QCoreApplication.translate
|
||||||
@@ -2615,7 +2622,7 @@ else:
|
|||||||
#<h1>©2020~{time.strftime("%Y")} <a href="https://gitee.com/gfdgd-xi">By gfdgd xi</h1>'''
|
#<h1>©2020~{time.strftime("%Y")} <a href="https://gitee.com/gfdgd-xi">By gfdgd xi</h1>'''
|
||||||
updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
|
updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
|
||||||
try:
|
try:
|
||||||
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9vcGVuL0luc3RhbGwucGhw").decode("utf-8")) + "?Version=" + version]).start()
|
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cHM6Ly9zb3VyY2Vmb3JnZS5uZXQvcHJvamVjdHMvZGVlcC13aW5lLXJ1bm5lci13aW5lLWRvd25sb2FkL2ZpbGVzL29wZW4tdGltZS8=").decode("utf-8")) + version + base64.b64decode("L2Rvd25sb2Fk").decode("utf-8")]).start()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
iconListUnBuild = json.loads(readtxt(f"{programPath}/IconList.json"))[0]
|
iconListUnBuild = json.loads(readtxt(f"{programPath}/IconList.json"))[0]
|
||||||
@@ -3381,8 +3388,10 @@ SetFont(setting["FontSize"])
|
|||||||
|
|
||||||
window.setCentralWidget(widget)
|
window.setCentralWidget(widget)
|
||||||
# 判断是否为小屏幕,是则设置滚动条并全屏
|
# 判断是否为小屏幕,是则设置滚动条并全屏
|
||||||
|
# 获取为 import 为控件,也默认开启滚动条
|
||||||
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
|
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
|
||||||
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9):
|
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9 or
|
||||||
|
__name__ != "__main__"):
|
||||||
# 设置滚动条
|
# 设置滚动条
|
||||||
areaScroll = QtWidgets.QScrollArea(window)
|
areaScroll = QtWidgets.QScrollArea(window)
|
||||||
areaScroll.setWidgetResizable(True)
|
areaScroll.setWidgetResizable(True)
|
||||||
@@ -3390,9 +3399,13 @@ if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().siz
|
|||||||
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
|
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
|
||||||
window.setCentralWidget(areaScroll)
|
window.setCentralWidget(areaScroll)
|
||||||
window.showMaximized() # 设置全屏
|
window.showMaximized() # 设置全屏
|
||||||
window.show()
|
|
||||||
|
|
||||||
|
|
||||||
# Mini 模式
|
if (__name__ == "__main__"):
|
||||||
# MiniMode(True)
|
window.show()
|
||||||
sys.exit(app.exec_())
|
# Mini 模式
|
||||||
|
# MiniMode(True)
|
||||||
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,43 +2,19 @@
|
|||||||
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
|
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
|
||||||
# /opt 目录识别
|
# /opt 目录识别
|
||||||
option=""
|
option=""
|
||||||
for path in `ls /opt`
|
|
||||||
do
|
if [[ -d /usr/lib32 ]] && [[ -d $SHELL_FOLDER/lib32 ]]; then
|
||||||
echo /opt/$path
|
option="$option --dev-bind $SHELL_FOLDER/lib32 /usr/lib32 "
|
||||||
if [[ $path != wine-staging ]]; then
|
fi
|
||||||
# 支持识别正确的 wine
|
|
||||||
mkdir -pv "$SHELL_FOLDER/opt/$path"
|
if [[ -d /usr/lib64 ]] && [[ -d $SHELL_FOLDER/lib64 ]]; then
|
||||||
option="$option --dev-bind /opt/$path /opt/$path"
|
option="$option --dev-bind $SHELL_FOLDER/lib64 /usr/lib64 "
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
wineName=(deepin-wine
|
|
||||||
deepin-wine8-stable
|
|
||||||
deepin-wine6-stable
|
|
||||||
deepin-wine5-stable
|
|
||||||
spark-wine
|
|
||||||
spark-wine8
|
|
||||||
deepin-wine6-vannila
|
|
||||||
spark-wine7-devel
|
|
||||||
spark-wine8-wow
|
|
||||||
deepin-wine5
|
|
||||||
ukylin-wine
|
|
||||||
okylin-wine
|
|
||||||
bookworm-run
|
|
||||||
)
|
|
||||||
for i in ${wineName[*]}; do
|
|
||||||
if [[ -e /usr/bin/$i ]]; then
|
|
||||||
option="$option --dev-bind /usr/bin/$i /usr/bin/$i"
|
|
||||||
if [[ ! -e "$SHELL_FOLDER/bin/$i" ]]; then
|
|
||||||
touch "$SHELL_FOLDER/bin/$i"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
"$SHELL_FOLDER/bwrap" --dev-bind / / \
|
"$SHELL_FOLDER/bwrap" --dev-bind / / \
|
||||||
--dev-bind "$SHELL_FOLDER/opt" /opt \
|
|
||||||
--dev-bind "$SHELL_FOLDER/bin" /usr/bin \
|
--dev-bind "$SHELL_FOLDER/bin" /usr/bin \
|
||||||
--dev-bind "$SHELL_FOLDER/lib" /usr/lib \
|
--dev-bind "$SHELL_FOLDER/lib" /usr/lib \
|
||||||
--dev-bind "$SHELL_FOLDER/lib32" /usr/lib32 \
|
|
||||||
--dev-bind "$SHELL_FOLDER/lib64" /usr/lib64 \
|
|
||||||
--dev-bind /usr/lib/locale /usr/lib/locale \
|
--dev-bind /usr/lib/locale /usr/lib/locale \
|
||||||
|
--dev-bind "$SHELL_FOLDER/share" /usr/share \
|
||||||
$option \
|
$option \
|
||||||
$SHELL_FOLDER/runner/deepin-wine-runner
|
$SHELL_FOLDER/runner/deepin-wine-runner $*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"Version": "4.0.0",
|
"Version": "4.0.0.2",
|
||||||
"Time": "未知",
|
"Time": "未知",
|
||||||
"Thank": [
|
"Thank": [
|
||||||
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
||||||
|
|||||||
18
test.py
Normal file
18
test.py
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
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) # 用于将该部分的 app 给子模块的 Qt 控件调用以解决 UI 异常以及其它问题
|
||||||
|
#import deepin_wine_packager
|
||||||
|
#modules = __import__("deepin-wine-packager")
|
||||||
|
#modules = __import__("deepin-wine-easy-packager")
|
||||||
|
#import mainwindow
|
||||||
|
# 使用 __import__ 可以引入带 - 文件名的模块
|
||||||
|
import wine.installwine
|
||||||
|
window.setCentralWidget(wine.installwine.window)
|
||||||
|
window.show()
|
||||||
|
app.exec_()
|
||||||
154
wine/installwine
154
wine/installwine
@@ -21,6 +21,7 @@ import webbrowser
|
|||||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
sys.path.append(f"{programPath}/../")
|
sys.path.append(f"{programPath}/../")
|
||||||
from Model import *
|
from Model import *
|
||||||
|
import globalenv
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
# UI 布局(自动生成)
|
# UI 布局(自动生成)
|
||||||
@@ -230,7 +231,29 @@ class GetInfo():
|
|||||||
"/usr/lib/mips64el-linux-gnuabi64/ld.so.1",
|
"/usr/lib/mips64el-linux-gnuabi64/ld.so.1",
|
||||||
"/usr/lib/powerpc64le-linux-gnu/ld64.so.2",
|
"/usr/lib/powerpc64le-linux-gnu/ld64.so.2",
|
||||||
"/usr/lib/loongarch64-linux-gnu/ld-linux-loongarch-lp64d.so.1",
|
"/usr/lib/loongarch64-linux-gnu/ld-linux-loongarch-lp64d.so.1",
|
||||||
"/usr/lib/loongarch64-linux-gnu/ld.so.1"
|
"/usr/lib/loongarch64-linux-gnu/ld.so.1",
|
||||||
|
"/usr/lib/ld-linux.so.2",
|
||||||
|
"/usr/lib/ld-linux-x86-64.so.2",
|
||||||
|
"/usr/lib/ld-linux-armhf.so.3",
|
||||||
|
"/usr/lib/ld-linux.so.3",
|
||||||
|
"/usr/lib/ld-linux-aarch64.so.1",
|
||||||
|
"/usr/lib/ld-linux-aarch64.so.1",
|
||||||
|
"/usr/lib/ld-linux-riscv64-lp64d.so.1",
|
||||||
|
"/usr/lib/ld.so.1",
|
||||||
|
"/usr/lib/ld64.so.2",
|
||||||
|
"/usr/lib/ld-linux-loongarch-lp64d.so.1",
|
||||||
|
"/usr/lib64/ld.so.1",
|
||||||
|
"/usr/lib64/ld-linux.so.2",
|
||||||
|
"/usr/lib64/ld-linux-x86-64.so.2",
|
||||||
|
"/usr/lib64/ld-linux-armhf.so.3",
|
||||||
|
"/usr/lib64/ld-linux.so.3",
|
||||||
|
"/usr/lib64/ld-linux-aarch64.so.1",
|
||||||
|
"/usr/lib64/ld-linux-aarch64.so.1",
|
||||||
|
"/usr/lib64/ld-linux-riscv64-lp64d.so.1",
|
||||||
|
"/usr/lib64/ld.so.1",
|
||||||
|
"/usr/lib64/ld64.so.2",
|
||||||
|
"/usr/lib64/ld-linux-loongarch-lp64d.so.1",
|
||||||
|
"/usr/lib64/ld.so.1"
|
||||||
]
|
]
|
||||||
for i in glibcPathList:
|
for i in glibcPathList:
|
||||||
if (os.path.exists(i)):
|
if (os.path.exists(i)):
|
||||||
@@ -250,11 +273,15 @@ class GetInfo():
|
|||||||
if (self.compareVersion(newestVersion, i) == -1):
|
if (self.compareVersion(newestVersion, i) == -1):
|
||||||
newestVersion = i
|
newestVersion = i
|
||||||
version = newestVersion
|
version = newestVersion
|
||||||
|
if (version == None):
|
||||||
|
version = "2.28" # 默认值
|
||||||
self.glibcVersion = version
|
self.glibcVersion = version
|
||||||
return version
|
return version
|
||||||
|
|
||||||
def compareVersion(self, version1: str, version2: str):
|
def compareVersion(self, version1: str, version2: str):
|
||||||
# 判断是不是版本号
|
# 判断是不是版本号
|
||||||
|
if (type(version1) != str or type(version2) != str):
|
||||||
|
return -2
|
||||||
if ((not "." in version1) or (not "." in version2)):
|
if ((not "." in version1) or (not "." in version2)):
|
||||||
return -2
|
return -2
|
||||||
if (version1 == version2):
|
if (version1 == version2):
|
||||||
@@ -324,8 +351,13 @@ class GetInfo():
|
|||||||
result = True
|
result = True
|
||||||
if (data == "termux" and self.isTermux):
|
if (data == "termux" and self.isTermux):
|
||||||
result = True
|
result = True
|
||||||
if (self.compareVersion(self.glibcVersion, data) == 1):
|
try:
|
||||||
result = True
|
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)):
|
if (os.path.exists(data)):
|
||||||
result = True
|
result = True
|
||||||
if (no):
|
if (no):
|
||||||
@@ -553,65 +585,69 @@ def on_downloadWineFromCloudDisk_clicked():
|
|||||||
def get_now_lang()->"获取当前语言":
|
def get_now_lang()->"获取当前语言":
|
||||||
return os.getenv('LANG')
|
return os.getenv('LANG')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
localJsonList = []
|
|
||||||
internetJsonList = []
|
|
||||||
internetWineSourceList = [
|
|
||||||
"http://wine.wine-runner.gfdgdxi.top/",
|
|
||||||
"http://wine.wine-runner.gfdgdxi.top/sourceforge",
|
|
||||||
"https://gitee.com/gfdgd-xi/wine-mirrors-websize/raw/master/",
|
|
||||||
"https://github.com/gfdgd-xi/wine-mirrors-websize/raw/master/",
|
|
||||||
"http://127.0.0.1/wine-mirrors/" # 本地测试源
|
|
||||||
]
|
|
||||||
|
|
||||||
|
localJsonList = []
|
||||||
|
internetJsonList = []
|
||||||
|
internetWineSourceList = [
|
||||||
|
"http://wine.wine-runner.gfdgdxi.top/",
|
||||||
|
"http://wine.wine-runner.gfdgdxi.top/sourceforge",
|
||||||
|
"https://gitee.com/gfdgd-xi/wine-mirrors-websize/raw/master/",
|
||||||
|
"https://github.com/gfdgd-xi/wine-mirrors-websize/raw/master/",
|
||||||
|
"http://127.0.0.1/wine-mirrors/" # 本地测试源
|
||||||
|
]
|
||||||
|
|
||||||
|
if (__name__ == "__main__"):
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
# 读取翻译
|
else:
|
||||||
if not get_now_lang() == "zh_CN.UTF-8":
|
app = globalenv.get_value("app")
|
||||||
trans = QtCore.QTranslator()
|
# 读取翻译
|
||||||
trans.load(f"{programPath}/../LANG/installwine-en_US.qm")
|
if not get_now_lang() == "zh_CN.UTF-8":
|
||||||
app.installTranslator(trans)
|
trans = QtCore.QTranslator()
|
||||||
# 获取信息
|
trans.load(f"{programPath}/../LANG/installwine-en_US.qm")
|
||||||
systemInfo = GetInfo()
|
app.installTranslator(trans)
|
||||||
# 窗口构建
|
# 获取信息
|
||||||
window = QtWidgets.QMainWindow()
|
systemInfo = GetInfo()
|
||||||
ui = Ui_MainWindow()
|
# 窗口构建
|
||||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
window = QtWidgets.QMainWindow()
|
||||||
ui.setupUi(window)
|
ui = Ui_MainWindow()
|
||||||
|
window.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||||
|
ui.setupUi(window)
|
||||||
|
if (__name__ == "__main__"):
|
||||||
window.show()
|
window.show()
|
||||||
# 隐藏选项
|
# 隐藏选项
|
||||||
ui.unzip.setVisible(False)
|
ui.unzip.setVisible(False)
|
||||||
ui.deleteZip.setVisible(False)
|
ui.deleteZip.setVisible(False)
|
||||||
# 判断机器所在国家并自动分配源
|
# 判断机器所在国家并自动分配源
|
||||||
try:
|
try:
|
||||||
isChina = requests.get("https://ip.useragentinfo.com/json").json()["country"] == "中国"
|
isChina = requests.get("https://ip.useragentinfo.com/json").json()["country"] == "中国"
|
||||||
print("IsChina", isChina)
|
print("IsChina", isChina)
|
||||||
if isChina:
|
if isChina:
|
||||||
internetWineSource = internetWineSourceList[0]
|
internetWineSource = internetWineSourceList[0]
|
||||||
ui.ipv6Action.setChecked(True)
|
ui.ipv6Action.setChecked(True)
|
||||||
else:
|
else:
|
||||||
internetWineSource = internetWineSourceList[1]
|
|
||||||
ui.kgithubAction.setChecked(True)
|
|
||||||
except:
|
|
||||||
traceback.print_exc()
|
|
||||||
print("IsChina", False)
|
|
||||||
# 请求失败,默认使用国际源
|
|
||||||
internetWineSource = internetWineSourceList[1]
|
internetWineSource = internetWineSourceList[1]
|
||||||
ui.kgithubAction.setChecked(True)
|
ui.kgithubAction.setChecked(True)
|
||||||
# 连接信号
|
except:
|
||||||
ui.addButton.clicked.connect(on_addButton_clicked)
|
traceback.print_exc()
|
||||||
ui.delButton.clicked.connect(on_delButton_clicked)
|
print("IsChina", False)
|
||||||
ui.downloadWineFromCloudDisk.clicked.connect(on_downloadWineFromCloudDisk_clicked)
|
# 请求失败,默认使用国际源
|
||||||
ui.addOtherWine.clicked.connect(InstallOtherWine)
|
internetWineSource = internetWineSourceList[1]
|
||||||
ui.changeSourcesGroup.triggered.connect(ChangeSources)
|
ui.kgithubAction.setChecked(True)
|
||||||
ui.m_recommendWine.clicked.connect(ReadInternetInformation)
|
# 连接信号
|
||||||
## 加载内容
|
ui.addButton.clicked.connect(on_addButton_clicked)
|
||||||
# 设置列表双击不会编辑
|
ui.delButton.clicked.connect(on_delButton_clicked)
|
||||||
ui.localWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
ui.downloadWineFromCloudDisk.clicked.connect(on_downloadWineFromCloudDisk_clicked)
|
||||||
ui.internetWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
ui.addOtherWine.clicked.connect(InstallOtherWine)
|
||||||
# 读取信息
|
ui.changeSourcesGroup.triggered.connect(ChangeSources)
|
||||||
ReadLocalInformation()
|
ui.m_recommendWine.clicked.connect(ReadInternetInformation)
|
||||||
ReadInternetInformation()
|
## 加载内容
|
||||||
# 图标
|
# 设置列表双击不会编辑
|
||||||
ui.centralWidget.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
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"))
|
||||||
|
if (__name__ == "__main__"):
|
||||||
app.exec_()
|
app.exec_()
|
||||||
1
wine/installwine.py
Symbolic link
1
wine/installwine.py
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
installwine
|
||||||
5856
winetricks
5856
winetricks
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user