Compare commits
48 Commits
Author | SHA1 | Date | |
---|---|---|---|
ef3409419a | |||
6aed0296ee | |||
022e2f1b53 | |||
27cf5b077a | |||
c8e0d5042e | |||
82b352d827 | |||
e94ebecfa2 | |||
123fadd7ac | |||
3fbfb38a53 | |||
83e34a983c | |||
53b16c9d35 | |||
4c940403bd | |||
f82d767a19 | |||
d385fdd64c | |||
ce15113a7a | |||
23179c0266 | |||
b8dde0ff52 | |||
3df126d700 | |||
e045169d99 | |||
414681fc0b | |||
691d140db5 | |||
96cf7dfe74 | |||
576470f70a | |||
625e456e6b | |||
|
2a17547da3 | ||
|
fb46147547 | ||
d37c7514f3 | |||
7fe6187f98 | |||
0bbb560b48 | |||
d583c396b1 | |||
2096022bd4 | |||
e3c342c07b | |||
ee6c7c45d8 | |||
76d5d60c2b | |||
00dd3283e9 | |||
b2998ffe80 | |||
579663c32c | |||
717284ad14 | |||
197f0a9dca | |||
b1e455ca48 | |||
86bc122c5f | |||
0ca2e4f01b | |||
4e14f35021 | |||
10d94886a5 | |||
e57ac28cde | |||
5853fc68c2 | |||
aa039277a9 | |||
d759f81905 |
.github/workflows
.gitignoreAPK
AutoConfig.pyConfigLanguareRunner.pyDownload.pyIcon
LoadingBinder
MakefileREADME.mdaapt
api
bwrap
getxmlimg.pyinformation.jsonmainwindow.pynew-deb-build
DEBIAN
opt/apps/com.gitee.uengine.runner.spark/files
26
.github/workflows/auto-building.yml
vendored
Normal file
26
.github/workflows/auto-building.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Auto Building Wine Runner
|
||||
run-name: ${{ github.actor }} Auto Building Wine Runner 🚀
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
Explore-GitHub-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Building DEB
|
||||
run: |
|
||||
# 配置环境
|
||||
sudo apt update
|
||||
sudo apt install git dpkg-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qt5-qmake -y
|
||||
git clone https://github.com/gfdgd-xi/uengine-runner
|
||||
cd uengine-runner
|
||||
make build
|
||||
mv com.gitee.uengine.runner.spark.deb ~
|
||||
- name: upload result
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: com.gitee.uengine.runner.spark.deb
|
||||
path: /home/runner/com.gitee.uengine.runner.spark.deb
|
||||
|
||||
|
||||
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
__pycache__
|
BIN
APK/Via.apk
Normal file
BIN
APK/Via.apk
Normal file
Binary file not shown.
@ -541,7 +541,7 @@ def ChangeSources():
|
||||
ui.searchList.setModel(nmodel)
|
||||
urlSourcesIndex = i
|
||||
except:
|
||||
[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
|
||||
#[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
urlSources = old_urlSources #如果源不可用则换回来
|
||||
|
@ -41,8 +41,8 @@ programEnv = [
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi"],
|
||||
["($MAKER)", "gfdgd xi"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import base64
|
||||
import requests
|
||||
print("""浣溪沙
|
||||
@ -8,4 +10,7 @@ print("""浣溪沙
|
||||
print("")
|
||||
print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。")
|
||||
print("================================")
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text)
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
with open(f"{programPath}/information.json") as file:
|
||||
version = json.loads(file.read())["Version"]
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + version).text)
|
BIN
Icon/Program/about-background.png
Executable file
BIN
Icon/Program/about-background.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 9.9 KiB |
BIN
Icon/Program/about-icon.png
Executable file
BIN
Icon/Program/about-icon.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 69 KiB |
BIN
Icon/QR/Alipay.jpg
Normal file
BIN
Icon/QR/Alipay.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 270 KiB |
BIN
Icon/QR/QQ.png
Normal file
BIN
Icon/QR/QQ.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 66 KiB |
BIN
Icon/QR/Wechat.png
Normal file
BIN
Icon/QR/Wechat.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 76 KiB |
BIN
Icon/QR/advertisement0.jpg
Normal file
BIN
Icon/QR/advertisement0.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 338 KiB |
@ -5,9 +5,13 @@ if [[ `whoami` != root ]]; then
|
||||
fi
|
||||
if [ -d /dev/binderfs ]; then
|
||||
echo 已启动 binder,end
|
||||
systemctl start uengine-container.service
|
||||
systemctl start uengine-session.service
|
||||
exit
|
||||
fi
|
||||
modprobe binder_linux
|
||||
modprobe ashmem_linux
|
||||
mkdir /dev/binderfs
|
||||
mount -t binder binder /dev/binderfs
|
||||
systemctl start uengine-container.service
|
||||
systemctl start uengine-session.service
|
||||
|
7
LoadingBinder/uengine
Normal file
7
LoadingBinder/uengine
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
export XDG_SESSION_TYPE=x11
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
unset WAYLAND_DISPLAYCOPY
|
||||
XDG_CURRENT_DESKTOP="Deepin"
|
||||
export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
|
||||
uengine-session "$@" -platformtheme=deepin
|
15
LoadingBinder/uengine-wayland-install.sh
Normal file
15
LoadingBinder/uengine-wayland-install.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
programPath=$(cd $(dirname $0); pwd)
|
||||
if [[ ! -f /usr/bin/uengine ]]; then
|
||||
echo 未安装uengine,请先安装!
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f /usr/bin/uengine-session ]] ;then
|
||||
echo 已经安装补丁,无需重复安装!
|
||||
exit 1
|
||||
fi
|
||||
sudo mv /usr/bin/uengine /usr/bin/uengine-session
|
||||
sudo cp "$programPath/uengine" /usr/bin/uengine
|
||||
sudo chmod +x /usr/bin/uengine
|
||||
sudo systemctl restart uengine-session.service
|
||||
echo 补丁安装完成!
|
15
LoadingBinder/uengine-wayland-uninstall.sh
Normal file
15
LoadingBinder/uengine-wayland-uninstall.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
programPath=$(cd $(dirname $0); pwd)
|
||||
if [[ ! -f /usr/bin/uengine ]]; then
|
||||
echo 未安装uengine,请先安装!
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f /usr/bin/uengine-session ]] ;then
|
||||
echo 未安装补丁,无需卸载!
|
||||
exit 1
|
||||
fi
|
||||
rm -fv /usb/bin/uengine
|
||||
sudo mv /usr/bin/uengine-session /usr/bin/uengine
|
||||
sudo chmod +x /usr/bin/uengine
|
||||
sudo systemctl restart uengine-session.service
|
||||
echo 补丁卸载完成!
|
5
Makefile
5
Makefile
@ -1,5 +1,6 @@
|
||||
clean:
|
||||
python3 RemovePycacheFile.py
|
||||
rm com.gitee.uengine.runner.spark.deb -fv
|
||||
|
||||
build:
|
||||
echo 别云间
|
||||
@ -58,6 +59,8 @@ build:
|
||||
cp -rv uengine-remove.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv pkexec new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv LoadingBinder new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv aapt new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
cp -rv APK new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information
|
||||
python3 UpdateTime.py
|
||||
python3 RemovePycacheFile.py #new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||
@ -86,4 +89,4 @@ depend:
|
||||
python3 -m pip install --upgrade keyboard --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
|
||||
run:
|
||||
python3 mainwindow.py
|
||||
python3 mainwindow.py
|
||||
|
92
README.md
92
README.md
@ -1,18 +1,23 @@
|
||||
<p width=100px align="center"><img src="runner.svg"></p>
|
||||
<h1 align="center">UEngine 运行器 2.1.0</h1>
|
||||
<h1 align="center">UEngine 运行器 2.2.0.1</h1>
|
||||
<hr>
|
||||
<a href='https://gitee.com/gfdgd-xi-org/uengine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi-org/uengine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
|
||||
<a href='https://gitee.com/gfdgd-xi/uengine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
|
||||
<a href='https://gitee.com/gfdgd-xi/uengine-runner/members'><img src='https://gitee.com/gfdgd-xi/uengine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
|
||||
|
||||
## 介绍
|
||||
|
||||
新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
||||
虽然通过Deepin/UOS应用商店已经能够安装部分安卓应用,但对于安卓应用爱好者来说,不能自由地安装任意APK软件包实在是不尽如人意。本软件可以实现在Deepin/UOS上安装任意APK软件包,并能将其启动图标发送到系统桌面或启动器中,方便用户快速启动它。
|
||||

|
||||
|
||||
(测试平台:UOS 家庭版 21.3.1,deepin 20.8,UOS 专业版 1050)
|
||||
适配架构:amd64、arm64
|
||||
支持系统:Deepin(amd64)、UOS(amd64/arm64)、Debian(amd64,≥debian 10)、Ubuntu(amd64,≥Ubuntu 20.04)
|
||||
Debian 10、Debian 11、Ubuntu 20.04 需要从 http://dtk.gfdgdxi.top/ 下载 dtk(版本≥5.5)并安装才能通过运行器的安装程序正确安装 UEngine
|
||||
暂不支持 Debian 12
|
||||
|
||||
QQ 交流群:872491938
|
||||
|
||||
## 在 deepin 23 上安装缺失依赖?
|
||||
依赖下载地址:https://gfdgdxi.lanzv.com/b01rwfgtg 密码:648f
|
||||
|
||||
## 程序相关网站
|
||||
作者个人站:https://www.gfdgdxi.top
|
||||
查询 APK 运行情况:https://gfdgd-xi.github.io/uengine-runner-info/
|
||||
@ -21,12 +26,29 @@
|
||||
Deepin 官网:https://www.deepin.org
|
||||
Deepin 论坛:https://bbs.deepin.org
|
||||
|
||||
## 在 Deepin 23 Alpha2 安装 UEngine 运行器?
|
||||
## 在 Deepin 23 Alpha2/Beta 安装 UEngine 运行器?
|
||||
> 例如:https://gitee.com/gfdgd-xi/uengine-runner/issues/I6MBBC
|
||||
|
||||
需要从以下链接补充依赖:
|
||||
https://gfdgdxi.lanzoue.com/b01qiu22f
|
||||
密码:dihl
|
||||
或者从星火应用商店下载安装,星火应用商店的源里已经补齐 UEngine 运行器在 Deepin 23 Alpha2/Beta 缺少的依赖
|
||||
然后输入:
|
||||
```bash
|
||||
python3 -m pip install pillow
|
||||
```
|
||||
|
||||
## 上架到的应用商店
|
||||
> 可以从下列应用商店获取 UEngine 运行器
|
||||
### Deepin/UOS 应用商店
|
||||

|
||||
|
||||
### 星火应用商店
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
## 安装前必读
|
||||
|
||||
@ -64,6 +86,52 @@ sudo apt upgrade
|
||||

|
||||
|
||||
### 更新内容
|
||||
#### V2.2.0.1(2023年02月04日)
|
||||
**※1、解决 deepin 23 beta3 缺失依赖的问题**
|
||||
|
||||
#### V2.2.0(2023年01月30日)
|
||||
**※1、支持 deepin 23,不需要强制依赖 aapt**
|
||||
**※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题**
|
||||
**※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境**
|
||||
**※4、修复部分系统在使用程序的一些功能时发生崩溃的问题**
|
||||
**※5、新增 UEngine For Wayland 补丁**
|
||||
6、优化安装量统计机制
|
||||
7、关于窗口新增赞助页
|
||||
8、新增 QQ 交流群入口
|
||||
9、内置 Via 浏览器
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#### V2.1.2(2023年08月14日)
|
||||
**※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX**
|
||||
**※2、修复添加应用图标时activity名称错误的问题**
|
||||
**※3、修复 UEngine 运行器在 23 运行时提示缺失 PIL.Image 库的问题**
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
#### V2.1.1(2023年07月06日)
|
||||
**※1、修复在 Ubuntu/Debian 安装 UEngine 时提示“该脚本不支持 deepin”的问题;**
|
||||
**※2、修复 UEngine 在 debian12 安装无法正常开启 UEngine 的问题;**
|
||||
**※3、修复在 UEngine 程序菜单检查到 UEngine 不存在但是无法安装的问题;**
|
||||
**※4、修复了 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6B6C8 的问题;**
|
||||
**※5、优化了 postinst 和 postrm 脚本;**
|
||||
6、添加 zenity 依赖;
|
||||
7、屏蔽在更新程序过程中杀死程序中输出的错误;
|
||||
8、修改下载 dtk 的网址。
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
#### V2.1.0(2023年05月13日)
|
||||
**※1、修复源地址(迁出 Gitlink);**
|
||||
**※2、优化 UEngine 安装器,可以在 Debian/Ubuntu 使用(Debian11/Debian10/Ubuntu20.04 需要安装 dtk(≥5.5),dtk 可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/releases 获取);**
|
||||
@ -503,4 +571,14 @@ make install
|
||||
[](https://gitee.com/spark-community-works-collections/spark-webapp-runtime-runner)
|
||||
[](https://gitee.com/gfdgd-xi/timer)
|
||||
|
||||
### ©2021-Now gfdgd xi
|
||||
### 请作者喝杯茶
|
||||
如果您觉得对你有帮助,可以请作者喝杯茶
|
||||
<img src="Icon/QR/Wechat.png" width="250" />
|
||||
<img src="Icon/QR/Alipay.jpg" width="250" />
|
||||
<img src="Icon/QR/QQ.png" width="250" >
|
||||
|
||||
#### 广告
|
||||
支付宝官方活动,扫描获得支付红包!
|
||||
<p><img src="Icon/QR/advertisement0.jpg" width="250" ></p>
|
||||
|
||||
## ©2021-Now gfdgd xi
|
||||
|
BIN
aapt/aapt
Executable file
BIN
aapt/aapt
Executable file
Binary file not shown.
BIN
aapt/aapt2
Executable file
BIN
aapt/aapt2
Executable file
Binary file not shown.
1
aapt/libaapt.so
Symbolic link
1
aapt/libaapt.so
Symbolic link
@ -0,0 +1 @@
|
||||
libaapt.so.0
|
BIN
aapt/libaapt.so.0
Normal file
BIN
aapt/libaapt.so.0
Normal file
Binary file not shown.
BIN
aapt/libandroidfw.so.0
Normal file
BIN
aapt/libandroidfw.so.0
Normal file
Binary file not shown.
19
aapt/run-aapt.sh
Executable file
19
aapt/run-aapt.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# 判断是不是 Deepin23
|
||||
cat /etc/deepin_version | grep 23
|
||||
if [[ $? != 0 ]]; then
|
||||
# 如果不是
|
||||
# 判断系统是否有安装 aapt
|
||||
which aapt > /dev/null
|
||||
if [[ $? == 0 ]]; then
|
||||
# 如果有安装
|
||||
aapt "$@"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
# 如果是
|
||||
programPath=$(cd $(dirname $0); pwd)
|
||||
echo $programPath
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$programPath"
|
||||
$programPath/aapt "$@"
|
||||
exit $?
|
@ -6,6 +6,12 @@ import traceback
|
||||
import subprocess
|
||||
from getxmlimg import getsavexml
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
|
||||
# 获取用户主目录
|
||||
def get_home()->"获取用户主目录":
|
||||
return os.path.expanduser('~')
|
||||
|
||||
class ProgramInformation:
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
version = "1.6.0Alpha2"
|
||||
@ -49,7 +55,7 @@ class APK:
|
||||
def uninstall(self):
|
||||
return os.system("uengine uninstall --pkg='{}'".format(self.packageName()))
|
||||
def information(self):
|
||||
return subprocess.getoutput("aapt dump badging '{}'".format(self.apkPath))
|
||||
return subprocess.getoutput("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, self.apkPath))
|
||||
def activityName(self):
|
||||
info = self.information()
|
||||
for line in info.split('\n'):
|
||||
|
BIN
bwrap/bwrap_amd64
Executable file
BIN
bwrap/bwrap_amd64
Executable file
Binary file not shown.
BIN
bwrap/bwrap_arm64
Executable file
BIN
bwrap/bwrap_arm64
Executable file
Binary file not shown.
0
bwrap/run.sh
Normal file
0
bwrap/run.sh
Normal file
17
getxmlimg.py
17
getxmlimg.py
@ -1,13 +1,22 @@
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
import os
|
||||
try:
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
except:
|
||||
os.system("python3 -m pip install --upgrade pillow --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple")
|
||||
os.system("python3 -m pip install --upgrade pillow --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple")
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
import zipfile
|
||||
import subprocess
|
||||
import re
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
|
||||
class getsavexml():
|
||||
|
||||
def savexml(self,apkFilePath,xmlpath,iconSavePath):
|
||||
cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath
|
||||
cmddumpid = f"'{programPath}/aapt/run-aapt.sh' dump xmltree "+ apkFilePath + " " + xmlpath
|
||||
print(cmddumpid)
|
||||
xmltree = subprocess.getoutput(cmddumpid)
|
||||
xmls = xmltree.splitlines()
|
||||
@ -29,7 +38,7 @@ class getsavexml():
|
||||
print(foreimgid)
|
||||
|
||||
# 直接从apk resource文件获取前后两层图片路径及ID字符串
|
||||
resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
|
||||
resource = subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
|
||||
resourcelines = resource.splitlines()
|
||||
print(resourcelines)
|
||||
|
||||
|
@ -2,11 +2,10 @@
|
||||
"Package": "com.gitee.uengine.runner.spark",
|
||||
"Url": [
|
||||
"https://gitee.com/gfdgd-xi/uengine-runner",
|
||||
"https://github.com/gfdgd-xi/uengine-runner",
|
||||
"https://gitlink.org.cn/gfdgd_xi/uengine-runner"
|
||||
"https://github.com/gfdgd-xi/uengine-runner"
|
||||
],
|
||||
"Version": "2.1.0",
|
||||
"System": "Linux(deepin/UOS/Ubuntu22.04)",
|
||||
"Version": "2.2.0.1",
|
||||
"System": "Linux(deepin/UOS/Ubuntu/Debian)",
|
||||
"Tips": [
|
||||
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
|
||||
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
||||
@ -23,6 +22,35 @@
|
||||
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
||||
],
|
||||
"Update": [
|
||||
"<b>V2.2.0.1:</b>",
|
||||
"※1、解决 deepin 23 beta3 缺失依赖的问题",
|
||||
"",
|
||||
"<b>V2.2.0:</b>",
|
||||
"※1、支持 deepin 23,不需要强制依赖 aapt",
|
||||
"※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题",
|
||||
"※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境",
|
||||
"※4、修复部分系统在使用程序的一些功能时发生崩溃的问题",
|
||||
"※5、新增 UEngine For Wayland 补丁",
|
||||
"6、优化安装量统计机制",
|
||||
"7、关于窗口新增赞助页",
|
||||
"8、新增 QQ 交流群入口",
|
||||
"9、内置 Via 浏览器",
|
||||
"",
|
||||
"<b>V2.1.2:</b>",
|
||||
"※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX",
|
||||
"※2、修复添加应用图标时activity名称错误的问题",
|
||||
"※3、修复 UEngine 运行器在 23 运行时提示缺失 PIL.Image 库的问题",
|
||||
"",
|
||||
"<b>V2.1.1:</b>",
|
||||
"※1、修复在 Ubuntu/Debian 安装 UEngine 时提示“该脚本不支持 deepin”的问题;",
|
||||
"※2、修复 UEngine 在 debian12 安装无法正常开启 UEngine 的问题;",
|
||||
"※3、修复在 UEngine 程序菜单检查到 UEngine 不存在但是无法安装的问题;",
|
||||
"※4、修复了 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6B6C8 的问题;",
|
||||
"※5、优化了 postinst 脚本;",
|
||||
"6、添加 zenity 依赖;",
|
||||
"7、屏蔽在更新程序过程中杀死程序中输出的错误;",
|
||||
"8、修改下载 dtk 的网址。",
|
||||
"",
|
||||
"<b>V2.1.0:</b>",
|
||||
"※1、修复源地址(迁出 Gitlink);",
|
||||
"※2、优化 UEngine 安装器,可以在 Debian/Ubuntu 使用(Debian11/Debian10/Ubuntu20.04 需要安装 dtk(≥5.5),dtk 可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/releases 获取);",
|
||||
@ -253,6 +281,7 @@
|
||||
"Contribute": [
|
||||
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
|
||||
"<hr>",
|
||||
"感谢 @鹤舞白沙 优化了程序文案",
|
||||
"感谢 @Bail 修复了修复应用商店换源的问题,实现了微型应用商店更新关闭进程的功能",
|
||||
"感谢 RacoonGX 团队的付出和贡献",
|
||||
"感谢 cleverwwh 反馈的 UEngine 打包器在部分系统无法打开的问题",
|
||||
|
156
mainwindow.py
156
mainwindow.py
@ -89,8 +89,8 @@ class UninstallProgram(QtCore.QThread):
|
||||
self.error.emit("疑似卸载失败,请检查 UEngine 是否正常安装、运行以及 APK 文件或包名是否正确、完整")
|
||||
DisabledAndEnbled(False)
|
||||
return
|
||||
if os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), package)):
|
||||
os.remove("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), package))
|
||||
if os.path.exists("{}/{}.desktop".format(desktopFilePath, package)):
|
||||
os.remove("{}/{}.desktop".format(desktopFilePath, package))
|
||||
if os.path.exists("{}/{}.desktop".format(get_desktop_path(), package)):
|
||||
os.remove("{}/{}.desktop".format(get_desktop_path(), package))
|
||||
findApkHistory.append(ComboInstallPath.currentText())
|
||||
@ -174,9 +174,9 @@ class InstallApk(QtCore.QThread):
|
||||
try:
|
||||
if not os.path.exists("/tmp/uengine-runner"):
|
||||
os.makedirs("/tmp/uengine-runner")
|
||||
if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
|
||||
if not os.path.exists(desktopFilePath):
|
||||
print("Mkdir")
|
||||
os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
|
||||
os.makedirs(desktopFilePath)
|
||||
# 读取设置
|
||||
setting = json.loads(readtxt(get_home() + "/.config/uengine-runner/setting.json"))
|
||||
# 安装应用
|
||||
@ -246,7 +246,7 @@ logicalHeight {verticalHeighe}
|
||||
"{}/{}.desktop".format(get_desktop_path(), GetApkPackageName(path)))
|
||||
print("start install apk3")
|
||||
BuildUengineDesktop(GetApkPackageName(path), GetApkActivityName(path), GetApkChineseLabel(path), iconSavePath,
|
||||
"{}/.local/share/applications/uengine/{}.desktop".format(get_home(), GetApkPackageName(path)))
|
||||
"{}/{}.desktop".format(desktopFilePath, GetApkPackageName(path)))
|
||||
print("\nprint install complete")
|
||||
if quit:
|
||||
return
|
||||
@ -266,7 +266,7 @@ def InstallBuildDesktop(iconSavePath):
|
||||
"{}/{}.desktop".format(get_desktop_path(), GetApkPackageName(path)), choose)
|
||||
print("start install apk3")
|
||||
BuildUengineDesktop(GetApkPackageName(path), GetApkActivityName(path), GetApkChineseLabel(path), iconSavePath,
|
||||
"{}/.local/share/applications/uengine/{}.desktop".format(get_home(), GetApkPackageName(path)), choose)
|
||||
"{}/{}.desktop".format(desktopFilePath, GetApkPackageName(path)), choose)
|
||||
print("\nprint install complete")
|
||||
|
||||
def UpdateCombobox(tmp):
|
||||
@ -418,7 +418,7 @@ def write_txt(path: "路径", things: "内容")->"写入文本文档":
|
||||
|
||||
# 获取 aapt 的所有信息
|
||||
def GetApkInformation(apkFilePath: "apk 所在路径")->"获取 aapt 的所有信息":
|
||||
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
|
||||
return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
|
||||
|
||||
# 获取 apk Activity
|
||||
def GetApkActivityName(apkFilePath: "apk 所在路径")->"获取 apk Activity":
|
||||
@ -587,8 +587,8 @@ def BackUengineClean()->"清空 uengine 数据":
|
||||
if QtWidgets.QMessageBox.warning(widget, "警告", "清空后数据将会完全丢失,确定要继续吗?", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Ok:
|
||||
DisabledAndEnbled(True)
|
||||
try:
|
||||
if os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
|
||||
shutil.rmtree("{}/.local/share/applications/uengine/".format(get_home()))
|
||||
if os.path.exists(desktopFilePath):
|
||||
shutil.rmtree(desktopFilePath)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||
@ -1004,7 +1004,7 @@ class UengineWindowSizeSetting:
|
||||
i.setChecked(True)
|
||||
UengineWindowSizeSetting.setting.setWindowTitle(f"设置 Android 应用的窗口大小缩放设置")
|
||||
UengineWindowSizeSetting.setting.show()
|
||||
UengineWindowSizeSetting.setting.resize(UengineWindowSizeSetting.setting.frameSize().width() * 1.3, UengineWindowSizeSetting.setting.frameSize().height())
|
||||
UengineWindowSizeSetting.setting.resize(int(UengineWindowSizeSetting.setting.frameSize().width() * 1.3), int(UengineWindowSizeSetting.setting.frameSize().height()))
|
||||
|
||||
def ReadSetting():
|
||||
file = open(f"/usr/share/uengine/appetc/{UengineWindowSizeSetting.package}.txt")
|
||||
@ -1191,7 +1191,7 @@ class UpdateWindow():
|
||||
UpdateWindow.update.setCentralWidget(updateWidget)
|
||||
UpdateWindow.update.setWindowTitle("检查 UEngine 运行器更新")
|
||||
UpdateWindow.update.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
|
||||
UpdateWindow.update.resize(int(updateWidget.frameGeometry().width()), int(updateWidget.frameGeometry().height() * 1.5))
|
||||
UpdateWindow.update.show()
|
||||
|
||||
def Update():
|
||||
@ -1410,7 +1410,7 @@ class ShowTextTipsWindow():
|
||||
ShowTextTipsWindow.messageWindow.setWindowTitle("提示")
|
||||
ShowTextTipsWindow.messageWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ShowTextTipsWindow.messageWindow.show()
|
||||
ShowTextTipsWindow.messageWindow.resize(ShowTextTipsWindow.messageWindow.frameSize().width() * 2, ShowTextTipsWindow.messageWindow.frameSize().height() * 1.5)
|
||||
ShowTextTipsWindow.messageWindow.resize(int(ShowTextTipsWindow.messageWindow.frameSize().width() * 2), int(ShowTextTipsWindow.messageWindow.frameSize().height() * 1.5))
|
||||
return
|
||||
|
||||
# 添加/删除 uengine 应用快捷方式
|
||||
@ -1462,7 +1462,7 @@ class AddNewUengineDesktopLink():
|
||||
# 添加快捷方式
|
||||
def SaveDesktopLink():
|
||||
try:
|
||||
if os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text())):
|
||||
if os.path.exists("{}/{}.desktop".format(desktopFilePath, packageName.text())):
|
||||
if QtWidgets.QMessageBox.question(widget, "提示", "文件已存在,是否要覆盖?") == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
if not os.path.exists("{}/.local/share/icons/hicolor/256x256/apps/".format(get_home())):
|
||||
@ -1470,9 +1470,9 @@ class AddNewUengineDesktopLink():
|
||||
global activityName
|
||||
iconSavePath = "{}/.local/share/icons/hicolor/256x256/apps/{}.png".format(get_home(), packageName.text())
|
||||
shutil.copy(programPath + "/defult.png", iconSavePath)
|
||||
BuildUengineDesktop(packageName.text(), activityName, packageName.text(), iconSavePath,
|
||||
"{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text()))
|
||||
BuildUengineDesktop(packageName.text(), activityName, packageName.text(), iconSavePath,
|
||||
BuildUengineDesktop(packageName.text(), activityName.text(), packageName.text(), iconSavePath,
|
||||
"{}/{}.desktop".format(desktopFilePath, packageName.text()))
|
||||
BuildUengineDesktop(packageName.text(), activityName.text(), packageName.text(), iconSavePath,
|
||||
"{}/{}.desktop".format(get_desktop_path(), packageName.text()))
|
||||
AddNewUengineDesktopLink.SaveHistory()
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "创建完毕!")
|
||||
@ -1485,13 +1485,13 @@ class AddNewUengineDesktopLink():
|
||||
def DelDesktopLink():
|
||||
try:
|
||||
global packageName
|
||||
if not os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text())):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "此包名对应的 UEngine 桌面快捷方式不存在!")
|
||||
if not os.path.exists("{}/{}.desktop".format(desktopFilePath, packageName.text())):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "此包名对应的 UEngine 快捷方式不存在!")
|
||||
return
|
||||
if QtWidgets.QMessageBox.warning(widget, "警告", "你确定要删除吗?删除后将无法恢复!", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Cancel:
|
||||
return
|
||||
try:
|
||||
os.remove("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text()))
|
||||
os.remove("{}/{}.desktop".format(desktopFilePath, packageName.text()))
|
||||
AddNewUengineDesktopLink.SaveHistory()
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "已删除")
|
||||
except:
|
||||
@ -1559,7 +1559,7 @@ def UseProgram():
|
||||
<p>10、deepin 终端:{}</p>'''.format(subprocess.getoutput("uengine version"),
|
||||
subprocess.getoutput("python3 --version"),
|
||||
QtCore.qVersion,
|
||||
subprocess.getoutput("aapt version"),
|
||||
subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version"),
|
||||
subprocess.getoutput("dpkg --version"),
|
||||
subprocess.getoutput("mkdir --version"),
|
||||
subprocess.getoutput("chmod --version"),
|
||||
@ -1570,6 +1570,26 @@ def BackAPK(choice):
|
||||
global choose
|
||||
choose = choice
|
||||
|
||||
def InstallUEnginePatchForWayland():
|
||||
if os.system("which uengine"):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
|
||||
return
|
||||
if os.path.exists("/usr/bin/uengine-session"):
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "已安装该补丁,请勿重复安装")
|
||||
return
|
||||
os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-install.sh'")
|
||||
QtWidgets.QMessageBox.information(window, "提示", "安装成功!重启电脑后生效")
|
||||
|
||||
def RemoveUEnginePatchForWayland():
|
||||
if os.system("which uengine"):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
|
||||
return
|
||||
if not os.path.exists("/usr/bin/uengine-session"):
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "已卸载该补丁,无需卸载")
|
||||
return
|
||||
os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-uninstall.sh'")
|
||||
QtWidgets.QMessageBox.information(window, "提示", "卸载成功!重启电脑后生效")
|
||||
|
||||
###########################
|
||||
# 程序信息
|
||||
###########################
|
||||
@ -1582,11 +1602,10 @@ if not lang in langFile.keys():
|
||||
programUrl = information["Url"][0]
|
||||
version = information["Version"]
|
||||
goodRunSystem = information["System"]
|
||||
aaptVersion = GetCommandReturn("aapt version")
|
||||
aaptVersion = GetCommandReturn(f"'{programPath}/aapt/run-aapt.sh' version")
|
||||
SystemVersion = GetSystemVersion()
|
||||
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
|
||||
about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
|
||||
<p>介绍:一个基于 Python3 的 PyQt5 制作的 UEngine 运行器,在新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。</p>
|
||||
about = f'''<p>介绍:虽然通过Deepin/UOS应用商店已经能够安装部分安卓应用,但对于安卓应用爱好者来说,不能自由地安装任意APK软件包实在是不尽如人意。本软件可以实现在Deepin/UOS上安装任意APK软件包,并能将其启动图标发送到系统桌面或启动器中,方便用户快速启动它。 </p>
|
||||
<p>程序开源许可证:GPLV3</p>
|
||||
<p>版本:{version}</p>
|
||||
<p>适用平台:{goodRunSystem}</p>
|
||||
@ -1594,10 +1613,22 @@ about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
|
||||
<p>程序官网:{programUrl}</p>
|
||||
<p>系统版本:{SystemVersion}</p>
|
||||
<p>安装包构建时间:{information['Time']}</p>
|
||||
<p>QQ 交流群:872491938</p>
|
||||
<h1>©2021-{time.strftime("%Y")} gfdgd xi</h1>'''
|
||||
updateThingsString = ""
|
||||
tips = ""
|
||||
contribute = ""
|
||||
appreciate = f"""<h3>请作者喝杯茶</h3>
|
||||
<p>如果您觉得 UEngine 运行器对你有帮助,可以请作者喝杯茶 </p>
|
||||
<p>
|
||||
<img src="{programPath}/Icon/QR/Wechat.png" width="250" />
|
||||
<img src="{programPath}/Icon/QR/Alipay.jpg" width="250" />
|
||||
<img src="{programPath}/Icon/QR/QQ.png" width="250" >
|
||||
</p>
|
||||
<hr/>
|
||||
<h3>广告</h3>
|
||||
<p>支付宝官方活动,扫描获得支付红包!</p>
|
||||
<p><img src="{programPath}/Icon/QR/advertisement0.jpg" width="250" ></p>"""
|
||||
for i in information["Tips"]:
|
||||
tips += f"<p>{i}</p>"
|
||||
for i in information["Update"]:
|
||||
@ -1611,13 +1642,25 @@ desktop = programPath + "/UengineAndroidProgramList.desktop"
|
||||
desktopName = "UengineAndroidProgramList.desktop"
|
||||
useProgram = ""
|
||||
threading.Thread(target=UseProgram).start()
|
||||
isDeepin23=False
|
||||
# 判断是不是 Deepin23
|
||||
if os.path.exists("/etc/deepin_version"):
|
||||
try:
|
||||
with open(f"/etc/deepin_version") as file:
|
||||
isDeepin23 = "23" in file.read()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
desktopFilePath = f"{get_home()}/.local/share/applications/uengine/"
|
||||
if isDeepin23:
|
||||
desktopFilePath = f"{get_home()}/.local/share/applications/"
|
||||
|
||||
|
||||
###########################
|
||||
# 加载配置
|
||||
###########################
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
|
||||
os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
|
||||
if not os.path.exists(desktopFilePath):
|
||||
os.makedirs(desktopFilePath)
|
||||
if not os.path.exists(get_home() + "/.config/uengine-runner"): # 如果没有配置文件夹
|
||||
os.makedirs(get_home() + "/.config/uengine-runner") # 创建配置文件夹
|
||||
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkHistory.json"): # 如果没有配置文件
|
||||
@ -1745,7 +1788,16 @@ def showhelp():
|
||||
def ChgLog():
|
||||
HelpStr.setHtml(updateThingsString)
|
||||
def ChgAbout(event):
|
||||
HelpStr.setHtml(about)
|
||||
HelpStr.setHtml(f"<p align='center'><a href='https://www.gfdgdxi.top/ChangeIcon'><img width=256 src='{iconPath}'/></a></p>\n" + about)
|
||||
def OpenUrl(url):
|
||||
print(url.url())
|
||||
if url.url() == "https://www.gfdgdxi.top/ChangeIcon":
|
||||
ChgAboutChangeIcon()
|
||||
return
|
||||
webbrowser.open_new_tab(url.url())
|
||||
|
||||
def ChgAboutChangeIcon():
|
||||
HelpStr.setHtml(f"<p align='center'><img width=256 src='{programPath}/Icon/Program/about-icon.png'/></p>\n" + about)
|
||||
def ChgDep():
|
||||
if useProgram == "":
|
||||
BtnZujian.setDisabled(True)
|
||||
@ -1755,7 +1807,8 @@ def showhelp():
|
||||
HelpStr.setHtml(contribute)
|
||||
def ChgTips():
|
||||
HelpStr.setHtml(tips)
|
||||
|
||||
def ChgAppreciate():
|
||||
HelpStr.setHtml(appreciate)
|
||||
def ChgGPLV3():
|
||||
try:
|
||||
with open(f"{programPath}/LICENSE", "r") as file:
|
||||
@ -1778,7 +1831,12 @@ def showhelp():
|
||||
BtnDownN = QtWidgets.QPushButton("程序下载量")
|
||||
BtnOpenN = QtWidgets.QPushButton("程序打开量")
|
||||
BtnGPLV3 = QtWidgets.QPushButton("程序开源许可证")
|
||||
appreciateButton = QtWidgets.QPushButton("赞赏作者")
|
||||
HelpStr = QtWidgets.QTextBrowser()
|
||||
HelpStr.setOpenLinks(False)
|
||||
HelpStr.setHtml(about)
|
||||
HelpStr.setOpenExternalLinks(False)
|
||||
HelpStr.anchorClicked.connect(OpenUrl)
|
||||
# 此功能从 2.0.0 后不再隐藏
|
||||
#BtnDownN.setEnabled("--彩蛋" in sys.argv)
|
||||
BtnReadme.clicked.connect(ChgTips)
|
||||
@ -1789,6 +1847,7 @@ def showhelp():
|
||||
BtnDownN.clicked.connect(Download)
|
||||
BtnGPLV3.clicked.connect(ChgGPLV3)
|
||||
BtnOpenN.clicked.connect(Open)
|
||||
appreciateButton.clicked.connect(ChgAppreciate)
|
||||
|
||||
ChgTips()
|
||||
|
||||
@ -1799,14 +1858,18 @@ def showhelp():
|
||||
helpLayout.addWidget(BtnDownN, 4, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnOpenN, 5, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnGPLV3, 6, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAbout, 7, 0, 1, 1)
|
||||
helpLayout.addWidget(HelpStr, 0, 1, 10, 1)
|
||||
helpLayout.addWidget(appreciateButton, 7, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAbout, 8, 0, 1, 1)
|
||||
helpLayout.addWidget(HelpStr, 0, 1, 11, 1)
|
||||
|
||||
helpWidget.setLayout(helpLayout)
|
||||
helpWindow.setCentralWidget(helpWidget)
|
||||
helpWindow.setFixedSize(int(helpWindow.frameSize().width() * 0.9), int(helpWindow.frameSize().height() * 1.5))
|
||||
helpWindow.setWindowTitle("帮助")
|
||||
helpWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
# 设置背景
|
||||
helpWindow.setObjectName("helpWindow")
|
||||
helpWindow.setStyleSheet(f"QWidget#helpWindow {{background: url({programPath}/Icon/Program/about-background.png) no-repeat;background-position: left bottom;}}")
|
||||
helpWindow.show()
|
||||
return
|
||||
|
||||
@ -1816,6 +1879,9 @@ def showhelp():
|
||||
if not os.path.exists("/usr/bin/uengine"):
|
||||
# Deepin/UOS 用户
|
||||
if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower() or subprocess.getoutput("arch").replace("\n", "").replace(" ", "") != "x86_64":
|
||||
if not "ft-" in GetCommandReturn("lscpu").lower() and GetCommandReturn("lscpu").replace(" ", "").replace("\n", "") == "aarch64":
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "UEngine 运行器不支持非飞腾 CPU")
|
||||
sys.exit(1)
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n安装完后重新启动该程序即可") == QtWidgets.QMessageBox.Yes:
|
||||
OpenTerminal(f"pkexec apt install uengine -y")
|
||||
sys.exit(0)
|
||||
@ -1825,15 +1891,24 @@ if not os.path.exists("/usr/bin/uengine"):
|
||||
#QtWidgets.QMessageBox.critical(None, "错误", "请安装 UEngine 后继续")
|
||||
#sys.exit(0)
|
||||
#if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会使用 shenmo 提供的脚本进行安装\n安装完后重新启动该程序即可\n提示:无法保证此安装脚本安装的 UEngine 可以使用") == QtWidgets.QMessageBox.Yes:
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会安装移植版本(之前由 Shenmo 编写)\n安装完后重新启动该程序即可\n提示:需要在 Ubuntu 20.04 或 debian10 及以上版本才能正常安装\nUbuntu 20.04 和 debian10 需要手动安装 dtk(≥5.5),可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/releases 获取") == QtWidgets.QMessageBox.Yes:
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会安装移植版本(之前由 Shenmo 编写)\n安装完后重新启动该程序即可\n提示:需要在 Ubuntu 20.04 或 debian10 及以上版本才能正常安装\nUbuntu 20.04 和 debian10 需要手动安装 dtk(≥5.5),可以从 http://dtk.gfdgdxi.top 获取") == QtWidgets.QMessageBox.Yes:
|
||||
#os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath}/uengine-installer'\"")
|
||||
OpenTerminal(f"bash '{programPath}/uengine-installer'")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###########################
|
||||
# 窗口创建
|
||||
###########################
|
||||
window = QtWidgets.QMainWindow()
|
||||
# 判断系统是不是 Deepin 23、有没有安装 Wayland 补丁、是不是 Wayland 环境
|
||||
if not os.path.exists("/usr/bin/uengine-session") and isDeepin23 and os.getenv("XDG_SESSION_TYPE") == "wayland":
|
||||
# 如果是
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "检测到您使用的是 Deepin 23 + Wayland 环境,建议安装 UEngine For Wayland 补丁以便能正常使用 UEngine,是否安装?") == QtWidgets.QMessageBox.Yes:
|
||||
InstallUEnginePatchForWayland()
|
||||
widget = QtWidgets.QWidget()
|
||||
widgetLayout = QtWidgets.QGridLayout()
|
||||
# 权重
|
||||
@ -1975,9 +2050,12 @@ uengineCheckCpu = QtWidgets.QAction(QtGui.QIcon.fromTheme("cpu"), langFile[lang]
|
||||
uengineDeleteUengineCheck = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9])
|
||||
uengineReinstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10])
|
||||
uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][14])
|
||||
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu 上安装的 UEngine 及其附属脚本")
|
||||
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu 上安装 UEngine(SuperSU 镜像)")
|
||||
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu/Debian 上安装的 UEngine 及其附属脚本")
|
||||
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu/Debian 上安装 UEngine(SuperSU 镜像)")
|
||||
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
|
||||
uengineInstallVia = QtWidgets.QAction("安装 Via")
|
||||
installUEnginePatchForWayland = QtWidgets.QAction("安装 UEngine For Wayland 补丁")
|
||||
uninstallUEnginePatchForWayland = QtWidgets.QAction("卸载 UEngine For Wayland 补丁")
|
||||
uengine.addAction(uengineOpenDebBuilder)
|
||||
uengine.addAction(uengineOpenDebBuilderMore)
|
||||
uengine.addAction(uengineKeyboardToMouse)
|
||||
@ -2003,6 +2081,12 @@ uengine.addSeparator()
|
||||
uengine.addAction(uengineDeleteUengineCheck)
|
||||
uengine.addAction(uengineReinstall)
|
||||
uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"])
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineInstallVia)
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(installUEnginePatchForWayland)
|
||||
uengine.addAction(uninstallUEnginePatchForWayland)
|
||||
|
||||
#uengineUbuntuInstall.setDisabled(True)
|
||||
# 绑定信号
|
||||
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
|
||||
@ -2017,6 +2101,14 @@ uengineUbuntuInstallRoot.triggered.connect(UengineUbuntuInstallRoot)
|
||||
uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
|
||||
uengineReinstall.triggered.connect(ReinstallUengine)
|
||||
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
|
||||
installUEnginePatchForWayland.triggered.connect(InstallUEnginePatchForWayland)
|
||||
uninstallUEnginePatchForWayland.triggered.connect(RemoveUEnginePatchForWayland)
|
||||
|
||||
def InstallVia():
|
||||
ComboInstallPath.setCurrentText(f"{programPath}/APK/Via.apk")
|
||||
Button3Install()
|
||||
|
||||
uengineInstallVia.triggered.connect(InstallVia)
|
||||
|
||||
uengineStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0])
|
||||
uengineStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1])
|
||||
|
@ -1,14 +1,14 @@
|
||||
Package: com.gitee.uengine.runner.spark
|
||||
Source: com.gitee.uengine.runner.spark
|
||||
Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu
|
||||
Version: 2.1.0
|
||||
Version: 2.2.0.1
|
||||
Architecture: all
|
||||
Section: utils
|
||||
Installed-Size: 2920
|
||||
Installed-Size: 9384
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||
Depends: python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, inotify-tools, aria2, python3-pyqt5, python3-matplotlib, python3-urllib3
|
||||
Recommends: uengine, deepin-elf-verify, python3-pyqt5.qtwebengine
|
||||
Depends: python3, python3-tk, python3-pip, python3-setuptools, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, aria2, python3-pyqt5, python3-matplotlib, python3-urllib3, zenity, python3-pil.imagetk
|
||||
Recommends: uengine, deepin-elf-verify, python3-pyqt5.qtwebengine, aapt
|
||||
Priority: optional
|
||||
Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu
|
||||
Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu, kbox
|
||||
Homepage: https://gitee.com/gfdgd-xi/uengine-runner
|
||||
Description: 新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的Uengine安卓运行环境安装/卸载/打包自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
# 使用 pip 安装所需库
|
||||
echo 安装组件
|
||||
python3 -m pip install --upgrade pip --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade ttkthemes --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade pyautogui --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade keyboard --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple
|
||||
python3 -m pip install --upgrade ttkthemes --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
|
||||
python3 -m pip install --upgrade pyautogui --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
|
||||
python3 -m pip install --upgrade keyboard --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
|
||||
python3 -m pip install --upgrade pillow --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
|
||||
echo 执行完成
|
||||
# 建立软链接
|
||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
|
||||
@ -35,28 +35,39 @@ if [[ $? != 0 ]] && [[ -f /usr/bin/uengine-loading-ubuntu ]]; then
|
||||
done
|
||||
fi
|
||||
# 更新 uengine-loading-ubuntu(如果存在)
|
||||
if [[ -f /usr/bin/uengine-loading-ubuntu ]]; then
|
||||
if [[ -f /usr/bin/uengine-loading-ubuntu ]] || [[ -f /usr/bin/uengine-loading-binder ]]; then
|
||||
echo 更新 uengine-loading-ubuntu
|
||||
cp /opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/load.sh /usr/bin/uengine-loading-binder
|
||||
if [ -f /tmp/upgrade-uengine-loading-ubuntu ]; then
|
||||
rm /tmp/upgrade-uengine-loading-ubuntu
|
||||
fi
|
||||
# 下载新版
|
||||
aria2c -x 16 -s 16 -d /tmp -o upgrade-uengine-loading-ubuntu https://code.gitlink.org.cn/gfdgd_xi/uengine-installer-bak/raw/branch/master/run_daemon.sh
|
||||
aria2c -x 16 -s 16 -d /tmp -o upgrade-uengine-loading-ubuntu http://uengine-runner.gfdgdxi.top/shell/run_daemon.sh
|
||||
if [ $? == 0 ]; then
|
||||
# 替换
|
||||
cp /tmp/upgrade-uengine-loading-ubuntu /usr/bin/uengine-loading-ubuntu
|
||||
chmod 755 /usr/bin/uengine-loading-ubuntu
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
cp /usr/bin/uengine-loading-ubuntu /home/$username/uengine-launch/run_daemon.sh
|
||||
chmod 755 /home/$username/uengine-launch/run_daemon.sh
|
||||
done
|
||||
|
||||
else
|
||||
cp /opt/apps/com.gitee.uengine.runner.spark/files/Help/shell/run_daemon.sh /usr/bin/uengine-loading-ubuntu
|
||||
fi
|
||||
rm /tmp/upgrade-uengine-loading-ubuntu
|
||||
chmod 755 /usr/bin/uengine-loading-ubuntu
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
cp /usr/bin/uengine-loading-ubuntu /home/$username/uengine-launch/run_daemon.sh
|
||||
chmod 755 /home/$username/uengine-launch/run_daemon.sh
|
||||
done
|
||||
rm -f /tmp/upgrade-uengine-loading-ubuntu
|
||||
fi
|
||||
# 自动往 UEngine 安装 Via(如果 UEngine 已存在)
|
||||
if [[ -f /usr/bin/uengine-session-launch-helper ]]; then
|
||||
# 忽略错误进行安装
|
||||
cp /opt/apps/com.gitee.uengine.runner.spark/files/APK/Via.apk /tmp/Via.apk | true
|
||||
/usr/bin/uengine-session-launch-helper -- uengine install --apk=/tmp/Via.apk | true
|
||||
rm -f /tmp/Via.apk | true
|
||||
fi
|
||||
# 刷新图标缓存
|
||||
# 因为 Ubuntu 的问题,省略
|
||||
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
|
||||
# 向服务器返回安装数加1(不显示内容且忽略错误)
|
||||
python3 /opt/apps/com.gitee.uengine.runner.spark/files/Download.py 2.1.0 > /dev/null | true
|
||||
python3 /opt/apps/com.gitee.uengine.runner.spark/files/Download.py 2.1.2 > /dev/null | true
|
||||
|
@ -22,11 +22,16 @@ rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__
|
||||
rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__
|
||||
rm -f /usr/bin/uengine-runner-applist-launch.sh
|
||||
rm -f /usr/bin/uengine-runner-auto-install-bash
|
||||
rm -f /usr/bin/uengine-loading-ubuntu
|
||||
#rm -f /usr/bin/uengine-loading-ubuntu
|
||||
# 删除软件残留,简单粗暴一点直接全部删掉,防止出现警告
|
||||
# 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装)
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||
rm -rf /opt/apps/com.gitee.uengine.runner.spark
|
||||
# 移除 UEngine For 23 Wayland 补丁
|
||||
if [[ -f /usr/bin/uengine-session ]]; then
|
||||
rm -fv /usb/bin/uengine
|
||||
mv -v /usr/bin/uengine-session /usr/bin/uengine
|
||||
fi
|
||||
fi
|
||||
# 删除软件配置文件(只限“purge”)
|
||||
# 配置目录:~/.config/uengine-runner
|
||||
@ -61,7 +66,11 @@ if [ "$1" = "purge" ]; then
|
||||
else
|
||||
echo "非 purge,跳过清理"
|
||||
fi
|
||||
|
||||
# 自动卸载 UEngine 的 Via(如果 UEngine 已存在)
|
||||
if [[ -f /usr/bin/uengine-session-launch-helper ]]; then
|
||||
# 忽略错误进行安装
|
||||
/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg=mark.via | true
|
||||
fi
|
||||
# 刷新图标缓存
|
||||
# 因为 Ubuntu 的问题,省略
|
||||
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
|
Binary file not shown.
@ -541,7 +541,7 @@ def ChangeSources():
|
||||
ui.searchList.setModel(nmodel)
|
||||
urlSourcesIndex = i
|
||||
except:
|
||||
[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
|
||||
#[ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
urlSources = old_urlSources #如果源不可用则换回来
|
||||
|
@ -41,8 +41,8 @@ programEnv = [
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi"],
|
||||
["($MAKER)", "gfdgd xi"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import base64
|
||||
import requests
|
||||
print("""浣溪沙
|
||||
@ -8,4 +10,7 @@ print("""浣溪沙
|
||||
print("")
|
||||
print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。")
|
||||
print("================================")
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + sys.argv[1]).text)
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
with open(f"{programPath}/information.json") as file:
|
||||
version = json.loads(file.read())["Version"]
|
||||
print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL0luc3RhbGwucGhwP1ZlcnNpb249").decode("utf-8") + version).text)
|
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-background.png
Executable file
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-background.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 9.9 KiB |
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-icon.png
Executable file
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/Program/about-icon.png
Executable file
Binary file not shown.
After ![]() (image error) Size: 69 KiB |
Binary file not shown.
After ![]() (image error) Size: 270 KiB |
Binary file not shown.
After ![]() (image error) Size: 66 KiB |
Binary file not shown.
After ![]() (image error) Size: 76 KiB |
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/advertisement0.jpg
Normal file
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/advertisement0.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 338 KiB |
@ -5,9 +5,13 @@ if [[ `whoami` != root ]]; then
|
||||
fi
|
||||
if [ -d /dev/binderfs ]; then
|
||||
echo 已启动 binder,end
|
||||
systemctl start uengine-container.service
|
||||
systemctl start uengine-session.service
|
||||
exit
|
||||
fi
|
||||
modprobe binder_linux
|
||||
modprobe ashmem_linux
|
||||
mkdir /dev/binderfs
|
||||
mount -t binder binder /dev/binderfs
|
||||
systemctl start uengine-container.service
|
||||
systemctl start uengine-session.service
|
||||
|
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
export XDG_SESSION_TYPE=x11
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
unset WAYLAND_DISPLAYCOPY
|
||||
XDG_CURRENT_DESKTOP="Deepin"
|
||||
export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
|
||||
uengine-session "$@" -platformtheme=deepin
|
15
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-install.sh
Normal file
15
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-install.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
programPath=$(cd $(dirname $0); pwd)
|
||||
if [[ ! -f /usr/bin/uengine ]]; then
|
||||
echo 未安装uengine,请先安装!
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f /usr/bin/uengine-session ]] ;then
|
||||
echo 已经安装补丁,无需重复安装!
|
||||
exit 1
|
||||
fi
|
||||
sudo mv /usr/bin/uengine /usr/bin/uengine-session
|
||||
sudo cp "$programPath/uengine" /usr/bin/uengine
|
||||
sudo chmod +x /usr/bin/uengine
|
||||
sudo systemctl restart uengine-session.service
|
||||
echo 补丁安装完成!
|
15
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-uninstall.sh
Normal file
15
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/LoadingBinder/uengine-wayland-uninstall.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
programPath=$(cd $(dirname $0); pwd)
|
||||
if [[ ! -f /usr/bin/uengine ]]; then
|
||||
echo 未安装uengine,请先安装!
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -f /usr/bin/uengine-session ]] ;then
|
||||
echo 未安装补丁,无需卸载!
|
||||
exit 1
|
||||
fi
|
||||
rm -fv /usb/bin/uengine
|
||||
sudo mv /usr/bin/uengine-session /usr/bin/uengine
|
||||
sudo chmod +x /usr/bin/uengine
|
||||
sudo systemctl restart uengine-session.service
|
||||
echo 补丁卸载完成!
|
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/aapt
Executable file
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/aapt
Executable file
Binary file not shown.
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/aapt2
Executable file
BIN
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/aapt2
Executable file
Binary file not shown.
@ -0,0 +1 @@
|
||||
libaapt.so.0
|
Binary file not shown.
Binary file not shown.
19
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/run-aapt.sh
Executable file
19
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/aapt/run-aapt.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# 判断是不是 Deepin23
|
||||
cat /etc/deepin_version | grep 23
|
||||
if [[ $? != 0 ]]; then
|
||||
# 如果不是
|
||||
# 判断系统是否有安装 aapt
|
||||
which aapt > /dev/null
|
||||
if [[ $? == 0 ]]; then
|
||||
# 如果有安装
|
||||
aapt "$@"
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
# 如果是
|
||||
programPath=$(cd $(dirname $0); pwd)
|
||||
echo $programPath
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$programPath"
|
||||
$programPath/aapt "$@"
|
||||
exit $?
|
@ -6,6 +6,12 @@ import traceback
|
||||
import subprocess
|
||||
from getxmlimg import getsavexml
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
|
||||
# 获取用户主目录
|
||||
def get_home()->"获取用户主目录":
|
||||
return os.path.expanduser('~')
|
||||
|
||||
class ProgramInformation:
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
version = "1.6.0Alpha2"
|
||||
@ -49,7 +55,7 @@ class APK:
|
||||
def uninstall(self):
|
||||
return os.system("uengine uninstall --pkg='{}'".format(self.packageName()))
|
||||
def information(self):
|
||||
return subprocess.getoutput("aapt dump badging '{}'".format(self.apkPath))
|
||||
return subprocess.getoutput("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, self.apkPath))
|
||||
def activityName(self):
|
||||
info = self.information()
|
||||
for line in info.split('\n'):
|
||||
|
@ -1,13 +1,22 @@
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
import os
|
||||
try:
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
except:
|
||||
os.system("python3 -m pip install --upgrade pillow --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple")
|
||||
os.system("python3 -m pip install --upgrade pillow --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple")
|
||||
import PIL.Image as Image
|
||||
import PIL.ImageDraw as ImageDraw
|
||||
import zipfile
|
||||
import subprocess
|
||||
import re
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
|
||||
class getsavexml():
|
||||
|
||||
def savexml(self,apkFilePath,xmlpath,iconSavePath):
|
||||
cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath
|
||||
cmddumpid = f"'{programPath}/aapt/run-aapt.sh' dump xmltree "+ apkFilePath + " " + xmlpath
|
||||
print(cmddumpid)
|
||||
xmltree = subprocess.getoutput(cmddumpid)
|
||||
xmls = xmltree.splitlines()
|
||||
@ -29,7 +38,7 @@ class getsavexml():
|
||||
print(foreimgid)
|
||||
|
||||
# 直接从apk resource文件获取前后两层图片路径及ID字符串
|
||||
resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
|
||||
resource = subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
|
||||
resourcelines = resource.splitlines()
|
||||
print(resourcelines)
|
||||
|
||||
|
@ -2,11 +2,10 @@
|
||||
"Package": "com.gitee.uengine.runner.spark",
|
||||
"Url": [
|
||||
"https://gitee.com/gfdgd-xi/uengine-runner",
|
||||
"https://github.com/gfdgd-xi/uengine-runner",
|
||||
"https://gitlink.org.cn/gfdgd_xi/uengine-runner"
|
||||
"https://github.com/gfdgd-xi/uengine-runner"
|
||||
],
|
||||
"Version": "2.1.0",
|
||||
"System": "Linux(deepin/UOS/Ubuntu22.04)",
|
||||
"Version": "2.2.0.1",
|
||||
"System": "Linux(deepin/UOS/Ubuntu/Debian)",
|
||||
"Tips": [
|
||||
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
|
||||
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
||||
@ -23,6 +22,35 @@
|
||||
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
||||
],
|
||||
"Update": [
|
||||
"<b>V2.2.0.1:</b>",
|
||||
"※1、解决 deepin 23 beta3 缺失依赖的问题",
|
||||
"",
|
||||
"<b>V2.2.0:</b>",
|
||||
"※1、支持 deepin 23,不需要强制依赖 aapt",
|
||||
"※2、修复 deepin 23 安装的 APK 无法正常在启动器显示图标的问题",
|
||||
"※3、新增 ARM 架构非飞腾 CPU 识别防止破坏鲲鹏 kbox 环境",
|
||||
"※4、修复部分系统在使用程序的一些功能时发生崩溃的问题",
|
||||
"※5、新增 UEngine For Wayland 补丁",
|
||||
"6、优化安装量统计机制",
|
||||
"7、关于窗口新增赞助页",
|
||||
"8、新增 QQ 交流群入口",
|
||||
"9、内置 Via 浏览器",
|
||||
"",
|
||||
"<b>V2.1.2:</b>",
|
||||
"※1、修复 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6ZRZX",
|
||||
"※2、修复添加应用图标时activity名称错误的问题",
|
||||
"※3、修复 UEngine 运行器在 23 运行时提示缺失 PIL.Image 库的问题",
|
||||
"",
|
||||
"<b>V2.1.1:</b>",
|
||||
"※1、修复在 Ubuntu/Debian 安装 UEngine 时提示“该脚本不支持 deepin”的问题;",
|
||||
"※2、修复 UEngine 在 debian12 安装无法正常开启 UEngine 的问题;",
|
||||
"※3、修复在 UEngine 程序菜单检查到 UEngine 不存在但是无法安装的问题;",
|
||||
"※4、修复了 https://gitee.com/gfdgd-xi/uengine-runner/issues/I6B6C8 的问题;",
|
||||
"※5、优化了 postinst 脚本;",
|
||||
"6、添加 zenity 依赖;",
|
||||
"7、屏蔽在更新程序过程中杀死程序中输出的错误;",
|
||||
"8、修改下载 dtk 的网址。",
|
||||
"",
|
||||
"<b>V2.1.0:</b>",
|
||||
"※1、修复源地址(迁出 Gitlink);",
|
||||
"※2、优化 UEngine 安装器,可以在 Debian/Ubuntu 使用(Debian11/Debian10/Ubuntu20.04 需要安装 dtk(≥5.5),dtk 可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/releases 获取);",
|
||||
@ -249,10 +277,11 @@
|
||||
"11、deepin 终端",
|
||||
"……"
|
||||
],
|
||||
"Time": "2023-05-13 13:28:55 Linux-5.15.77-amd64-desktop-x86_64-with-Deepin-20.9-apricot",
|
||||
"Time": "2024-02-04 11:05:59 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.37",
|
||||
"Contribute": [
|
||||
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
|
||||
"<hr>",
|
||||
"感谢 @鹤舞白沙 优化了程序文案",
|
||||
"感谢 @Bail 修复了修复应用商店换源的问题,实现了微型应用商店更新关闭进程的功能",
|
||||
"感谢 RacoonGX 团队的付出和贡献",
|
||||
"感谢 cleverwwh 反馈的 UEngine 打包器在部分系统无法打开的问题",
|
||||
|
@ -2,3 +2,6 @@
|
||||
export XDG_SESSION_TYPE=x11
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
unset WAYLAND_DISPLAYCOPY
|
||||
XDG_CURRENT_DESKTOP="Deepin"
|
||||
export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
|
||||
"$@"
|
||||
|
@ -207,7 +207,7 @@ Name={}
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
||||
self.RunCommandShow("echo '打包 deb 到桌面……'")
|
||||
self.RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
||||
self.RunCommandShow("dpkg-deb -Z xz -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
||||
self.RunCommandShow("echo '正在删除临时目录……'")
|
||||
self.RunCommandShow("rm -rfv '{}'".format(tempPath))
|
||||
self.RunCommandShow("echo '完成!'")
|
||||
@ -289,7 +289,7 @@ def write_txt(path, things):
|
||||
file.close() # 关闭文本对象
|
||||
|
||||
def GetApkInformation(apkFilePath):
|
||||
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
|
||||
return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
|
||||
|
||||
def GetApkActivityName(apkFilePath):
|
||||
info = GetApkInformation(apkFilePath)
|
||||
|
@ -227,7 +227,7 @@ Name={}
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
||||
self.RunCommandShow("echo '打包 deb 到桌面……'")
|
||||
self.RunCommandShow("dpkg -b '{}' '{}/{}_{}_all.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, versionText.text()))
|
||||
self.RunCommandShow("dpkg-deb -Z xz -b '{}' '{}/{}_{}_all.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, versionText.text()))
|
||||
self.RunCommandShow("echo '正在删除临时目录……'")
|
||||
self.RunCommandShow("rm -rfv '{}'".format(tempPath))
|
||||
self.RunCommandShow("echo '完成!'")
|
||||
@ -313,7 +313,7 @@ def write_txt(path, things):
|
||||
file.close() # 关闭文本对象
|
||||
|
||||
def GetApkInformation(apkFilePath):
|
||||
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
|
||||
return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
|
||||
|
||||
def GetApkActivityName(apkFilePath):
|
||||
info = GetApkInformation(apkFilePath)
|
||||
|
@ -3,7 +3,7 @@
|
||||
CheckEnv(){
|
||||
# 检测是不是 Deepin
|
||||
lsb_release -i | grep -i deepin
|
||||
if [[ $? != 0 ]]; then
|
||||
if [[ $? == 0 ]]; then
|
||||
zenity --error --no-wrap '--text=您的系统无法安装 UEngine,原因:此脚本不支持 Deepin'
|
||||
exit
|
||||
fi
|
||||
@ -32,7 +32,7 @@ CheckEnv(){
|
||||
#kernel=`uname -r`
|
||||
python3 "${programPath}/CompareVersion.py" "${newestDtkVersion}" "5.5"
|
||||
if [[ $? != 0 ]]; then
|
||||
zenity --error --no-wrap "--text=提示:您当前的 dtk 版本过老,请更新 dtk 版本后再试(版本需要大于等于 5.5),可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/ 获取编译好的 dtk"
|
||||
zenity --error --no-wrap "--text=提示:您当前的 dtk 版本过老,请更新 dtk 版本后再试(版本需要大于等于 5.5),可以从 http://dtk.gfdgdxi.top 获取编译好的 dtk"
|
||||
exit
|
||||
fi
|
||||
#exit
|
||||
|
@ -89,8 +89,8 @@ class UninstallProgram(QtCore.QThread):
|
||||
self.error.emit("疑似卸载失败,请检查 UEngine 是否正常安装、运行以及 APK 文件或包名是否正确、完整")
|
||||
DisabledAndEnbled(False)
|
||||
return
|
||||
if os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), package)):
|
||||
os.remove("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), package))
|
||||
if os.path.exists("{}/{}.desktop".format(desktopFilePath, package)):
|
||||
os.remove("{}/{}.desktop".format(desktopFilePath, package))
|
||||
if os.path.exists("{}/{}.desktop".format(get_desktop_path(), package)):
|
||||
os.remove("{}/{}.desktop".format(get_desktop_path(), package))
|
||||
findApkHistory.append(ComboInstallPath.currentText())
|
||||
@ -174,9 +174,9 @@ class InstallApk(QtCore.QThread):
|
||||
try:
|
||||
if not os.path.exists("/tmp/uengine-runner"):
|
||||
os.makedirs("/tmp/uengine-runner")
|
||||
if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
|
||||
if not os.path.exists(desktopFilePath):
|
||||
print("Mkdir")
|
||||
os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
|
||||
os.makedirs(desktopFilePath)
|
||||
# 读取设置
|
||||
setting = json.loads(readtxt(get_home() + "/.config/uengine-runner/setting.json"))
|
||||
# 安装应用
|
||||
@ -246,7 +246,7 @@ logicalHeight {verticalHeighe}
|
||||
"{}/{}.desktop".format(get_desktop_path(), GetApkPackageName(path)))
|
||||
print("start install apk3")
|
||||
BuildUengineDesktop(GetApkPackageName(path), GetApkActivityName(path), GetApkChineseLabel(path), iconSavePath,
|
||||
"{}/.local/share/applications/uengine/{}.desktop".format(get_home(), GetApkPackageName(path)))
|
||||
"{}/{}.desktop".format(desktopFilePath, GetApkPackageName(path)))
|
||||
print("\nprint install complete")
|
||||
if quit:
|
||||
return
|
||||
@ -266,7 +266,7 @@ def InstallBuildDesktop(iconSavePath):
|
||||
"{}/{}.desktop".format(get_desktop_path(), GetApkPackageName(path)), choose)
|
||||
print("start install apk3")
|
||||
BuildUengineDesktop(GetApkPackageName(path), GetApkActivityName(path), GetApkChineseLabel(path), iconSavePath,
|
||||
"{}/.local/share/applications/uengine/{}.desktop".format(get_home(), GetApkPackageName(path)), choose)
|
||||
"{}/{}.desktop".format(desktopFilePath, GetApkPackageName(path)), choose)
|
||||
print("\nprint install complete")
|
||||
|
||||
def UpdateCombobox(tmp):
|
||||
@ -418,7 +418,7 @@ def write_txt(path: "路径", things: "内容")->"写入文本文档":
|
||||
|
||||
# 获取 aapt 的所有信息
|
||||
def GetApkInformation(apkFilePath: "apk 所在路径")->"获取 aapt 的所有信息":
|
||||
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
|
||||
return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
|
||||
|
||||
# 获取 apk Activity
|
||||
def GetApkActivityName(apkFilePath: "apk 所在路径")->"获取 apk Activity":
|
||||
@ -587,8 +587,8 @@ def BackUengineClean()->"清空 uengine 数据":
|
||||
if QtWidgets.QMessageBox.warning(widget, "警告", "清空后数据将会完全丢失,确定要继续吗?", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Ok:
|
||||
DisabledAndEnbled(True)
|
||||
try:
|
||||
if os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
|
||||
shutil.rmtree("{}/.local/share/applications/uengine/".format(get_home()))
|
||||
if os.path.exists(desktopFilePath):
|
||||
shutil.rmtree(desktopFilePath)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||
@ -1004,7 +1004,7 @@ class UengineWindowSizeSetting:
|
||||
i.setChecked(True)
|
||||
UengineWindowSizeSetting.setting.setWindowTitle(f"设置 Android 应用的窗口大小缩放设置")
|
||||
UengineWindowSizeSetting.setting.show()
|
||||
UengineWindowSizeSetting.setting.resize(UengineWindowSizeSetting.setting.frameSize().width() * 1.3, UengineWindowSizeSetting.setting.frameSize().height())
|
||||
UengineWindowSizeSetting.setting.resize(int(UengineWindowSizeSetting.setting.frameSize().width() * 1.3), int(UengineWindowSizeSetting.setting.frameSize().height()))
|
||||
|
||||
def ReadSetting():
|
||||
file = open(f"/usr/share/uengine/appetc/{UengineWindowSizeSetting.package}.txt")
|
||||
@ -1191,7 +1191,7 @@ class UpdateWindow():
|
||||
UpdateWindow.update.setCentralWidget(updateWidget)
|
||||
UpdateWindow.update.setWindowTitle("检查 UEngine 运行器更新")
|
||||
UpdateWindow.update.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
|
||||
UpdateWindow.update.resize(int(updateWidget.frameGeometry().width()), int(updateWidget.frameGeometry().height() * 1.5))
|
||||
UpdateWindow.update.show()
|
||||
|
||||
def Update():
|
||||
@ -1410,7 +1410,7 @@ class ShowTextTipsWindow():
|
||||
ShowTextTipsWindow.messageWindow.setWindowTitle("提示")
|
||||
ShowTextTipsWindow.messageWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ShowTextTipsWindow.messageWindow.show()
|
||||
ShowTextTipsWindow.messageWindow.resize(ShowTextTipsWindow.messageWindow.frameSize().width() * 2, ShowTextTipsWindow.messageWindow.frameSize().height() * 1.5)
|
||||
ShowTextTipsWindow.messageWindow.resize(int(ShowTextTipsWindow.messageWindow.frameSize().width() * 2), int(ShowTextTipsWindow.messageWindow.frameSize().height() * 1.5))
|
||||
return
|
||||
|
||||
# 添加/删除 uengine 应用快捷方式
|
||||
@ -1462,7 +1462,7 @@ class AddNewUengineDesktopLink():
|
||||
# 添加快捷方式
|
||||
def SaveDesktopLink():
|
||||
try:
|
||||
if os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text())):
|
||||
if os.path.exists("{}/{}.desktop".format(desktopFilePath, packageName.text())):
|
||||
if QtWidgets.QMessageBox.question(widget, "提示", "文件已存在,是否要覆盖?") == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
if not os.path.exists("{}/.local/share/icons/hicolor/256x256/apps/".format(get_home())):
|
||||
@ -1470,9 +1470,9 @@ class AddNewUengineDesktopLink():
|
||||
global activityName
|
||||
iconSavePath = "{}/.local/share/icons/hicolor/256x256/apps/{}.png".format(get_home(), packageName.text())
|
||||
shutil.copy(programPath + "/defult.png", iconSavePath)
|
||||
BuildUengineDesktop(packageName.text(), activityName, packageName.text(), iconSavePath,
|
||||
"{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text()))
|
||||
BuildUengineDesktop(packageName.text(), activityName, packageName.text(), iconSavePath,
|
||||
BuildUengineDesktop(packageName.text(), activityName.text(), packageName.text(), iconSavePath,
|
||||
"{}/{}.desktop".format(desktopFilePath, packageName.text()))
|
||||
BuildUengineDesktop(packageName.text(), activityName.text(), packageName.text(), iconSavePath,
|
||||
"{}/{}.desktop".format(get_desktop_path(), packageName.text()))
|
||||
AddNewUengineDesktopLink.SaveHistory()
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "创建完毕!")
|
||||
@ -1485,13 +1485,13 @@ class AddNewUengineDesktopLink():
|
||||
def DelDesktopLink():
|
||||
try:
|
||||
global packageName
|
||||
if not os.path.exists("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text())):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "此包名对应的 UEngine 桌面快捷方式不存在!")
|
||||
if not os.path.exists("{}/{}.desktop".format(desktopFilePath, packageName.text())):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", "此包名对应的 UEngine 快捷方式不存在!")
|
||||
return
|
||||
if QtWidgets.QMessageBox.warning(widget, "警告", "你确定要删除吗?删除后将无法恢复!", QtWidgets.QMessageBox.Ok | QtWidgets.QMessageBox.Cancel, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Cancel:
|
||||
return
|
||||
try:
|
||||
os.remove("{}/.local/share/applications/uengine/{}.desktop".format(get_home(), packageName.text()))
|
||||
os.remove("{}/{}.desktop".format(desktopFilePath, packageName.text()))
|
||||
AddNewUengineDesktopLink.SaveHistory()
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "已删除")
|
||||
except:
|
||||
@ -1559,7 +1559,7 @@ def UseProgram():
|
||||
<p>10、deepin 终端:{}</p>'''.format(subprocess.getoutput("uengine version"),
|
||||
subprocess.getoutput("python3 --version"),
|
||||
QtCore.qVersion,
|
||||
subprocess.getoutput("aapt version"),
|
||||
subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version"),
|
||||
subprocess.getoutput("dpkg --version"),
|
||||
subprocess.getoutput("mkdir --version"),
|
||||
subprocess.getoutput("chmod --version"),
|
||||
@ -1570,6 +1570,26 @@ def BackAPK(choice):
|
||||
global choose
|
||||
choose = choice
|
||||
|
||||
def InstallUEnginePatchForWayland():
|
||||
if os.system("which uengine"):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
|
||||
return
|
||||
if os.path.exists("/usr/bin/uengine-session"):
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "已安装该补丁,请勿重复安装")
|
||||
return
|
||||
os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-install.sh'")
|
||||
QtWidgets.QMessageBox.information(window, "提示", "安装成功!重启电脑后生效")
|
||||
|
||||
def RemoveUEnginePatchForWayland():
|
||||
if os.system("which uengine"):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", "未安装UEngine,请先安装UEngine")
|
||||
return
|
||||
if not os.path.exists("/usr/bin/uengine-session"):
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "已卸载该补丁,无需卸载")
|
||||
return
|
||||
os.system(f"pkexec bash '{programPath}/LoadingBinder/uengine-wayland-uninstall.sh'")
|
||||
QtWidgets.QMessageBox.information(window, "提示", "卸载成功!重启电脑后生效")
|
||||
|
||||
###########################
|
||||
# 程序信息
|
||||
###########################
|
||||
@ -1582,11 +1602,10 @@ if not lang in langFile.keys():
|
||||
programUrl = information["Url"][0]
|
||||
version = information["Version"]
|
||||
goodRunSystem = information["System"]
|
||||
aaptVersion = GetCommandReturn("aapt version")
|
||||
aaptVersion = GetCommandReturn(f"'{programPath}/aapt/run-aapt.sh' version")
|
||||
SystemVersion = GetSystemVersion()
|
||||
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
|
||||
about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
|
||||
<p>介绍:一个基于 Python3 的 PyQt5 制作的 UEngine 运行器,在新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。</p>
|
||||
about = f'''<p>介绍:虽然通过Deepin/UOS应用商店已经能够安装部分安卓应用,但对于安卓应用爱好者来说,不能自由地安装任意APK软件包实在是不尽如人意。本软件可以实现在Deepin/UOS上安装任意APK软件包,并能将其启动图标发送到系统桌面或启动器中,方便用户快速启动它。 </p>
|
||||
<p>程序开源许可证:GPLV3</p>
|
||||
<p>版本:{version}</p>
|
||||
<p>适用平台:{goodRunSystem}</p>
|
||||
@ -1594,10 +1613,22 @@ about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>
|
||||
<p>程序官网:{programUrl}</p>
|
||||
<p>系统版本:{SystemVersion}</p>
|
||||
<p>安装包构建时间:{information['Time']}</p>
|
||||
<p>QQ 交流群:872491938</p>
|
||||
<h1>©2021-{time.strftime("%Y")} gfdgd xi</h1>'''
|
||||
updateThingsString = ""
|
||||
tips = ""
|
||||
contribute = ""
|
||||
appreciate = f"""<h3>请作者喝杯茶</h3>
|
||||
<p>如果您觉得 UEngine 运行器对你有帮助,可以请作者喝杯茶 </p>
|
||||
<p>
|
||||
<img src="{programPath}/Icon/QR/Wechat.png" width="250" />
|
||||
<img src="{programPath}/Icon/QR/Alipay.jpg" width="250" />
|
||||
<img src="{programPath}/Icon/QR/QQ.png" width="250" >
|
||||
</p>
|
||||
<hr/>
|
||||
<h3>广告</h3>
|
||||
<p>支付宝官方活动,扫描获得支付红包!</p>
|
||||
<p><img src="{programPath}/Icon/QR/advertisement0.jpg" width="250" ></p>"""
|
||||
for i in information["Tips"]:
|
||||
tips += f"<p>{i}</p>"
|
||||
for i in information["Update"]:
|
||||
@ -1611,13 +1642,25 @@ desktop = programPath + "/UengineAndroidProgramList.desktop"
|
||||
desktopName = "UengineAndroidProgramList.desktop"
|
||||
useProgram = ""
|
||||
threading.Thread(target=UseProgram).start()
|
||||
isDeepin23=False
|
||||
# 判断是不是 Deepin23
|
||||
if os.path.exists("/etc/deepin_version"):
|
||||
try:
|
||||
with open(f"/etc/deepin_version") as file:
|
||||
isDeepin23 = "23" in file.read()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
desktopFilePath = f"{get_home()}/.local/share/applications/uengine/"
|
||||
if isDeepin23:
|
||||
desktopFilePath = f"{get_home()}/.local/share/applications/"
|
||||
|
||||
|
||||
###########################
|
||||
# 加载配置
|
||||
###########################
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
|
||||
os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
|
||||
if not os.path.exists(desktopFilePath):
|
||||
os.makedirs(desktopFilePath)
|
||||
if not os.path.exists(get_home() + "/.config/uengine-runner"): # 如果没有配置文件夹
|
||||
os.makedirs(get_home() + "/.config/uengine-runner") # 创建配置文件夹
|
||||
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkHistory.json"): # 如果没有配置文件
|
||||
@ -1745,7 +1788,16 @@ def showhelp():
|
||||
def ChgLog():
|
||||
HelpStr.setHtml(updateThingsString)
|
||||
def ChgAbout(event):
|
||||
HelpStr.setHtml(about)
|
||||
HelpStr.setHtml(f"<p align='center'><a href='https://www.gfdgdxi.top/ChangeIcon'><img width=256 src='{iconPath}'/></a></p>\n" + about)
|
||||
def OpenUrl(url):
|
||||
print(url.url())
|
||||
if url.url() == "https://www.gfdgdxi.top/ChangeIcon":
|
||||
ChgAboutChangeIcon()
|
||||
return
|
||||
webbrowser.open_new_tab(url.url())
|
||||
|
||||
def ChgAboutChangeIcon():
|
||||
HelpStr.setHtml(f"<p align='center'><img width=256 src='{programPath}/Icon/Program/about-icon.png'/></p>\n" + about)
|
||||
def ChgDep():
|
||||
if useProgram == "":
|
||||
BtnZujian.setDisabled(True)
|
||||
@ -1755,7 +1807,8 @@ def showhelp():
|
||||
HelpStr.setHtml(contribute)
|
||||
def ChgTips():
|
||||
HelpStr.setHtml(tips)
|
||||
|
||||
def ChgAppreciate():
|
||||
HelpStr.setHtml(appreciate)
|
||||
def ChgGPLV3():
|
||||
try:
|
||||
with open(f"{programPath}/LICENSE", "r") as file:
|
||||
@ -1778,7 +1831,12 @@ def showhelp():
|
||||
BtnDownN = QtWidgets.QPushButton("程序下载量")
|
||||
BtnOpenN = QtWidgets.QPushButton("程序打开量")
|
||||
BtnGPLV3 = QtWidgets.QPushButton("程序开源许可证")
|
||||
appreciateButton = QtWidgets.QPushButton("赞赏作者")
|
||||
HelpStr = QtWidgets.QTextBrowser()
|
||||
HelpStr.setOpenLinks(False)
|
||||
HelpStr.setHtml(about)
|
||||
HelpStr.setOpenExternalLinks(False)
|
||||
HelpStr.anchorClicked.connect(OpenUrl)
|
||||
# 此功能从 2.0.0 后不再隐藏
|
||||
#BtnDownN.setEnabled("--彩蛋" in sys.argv)
|
||||
BtnReadme.clicked.connect(ChgTips)
|
||||
@ -1789,6 +1847,7 @@ def showhelp():
|
||||
BtnDownN.clicked.connect(Download)
|
||||
BtnGPLV3.clicked.connect(ChgGPLV3)
|
||||
BtnOpenN.clicked.connect(Open)
|
||||
appreciateButton.clicked.connect(ChgAppreciate)
|
||||
|
||||
ChgTips()
|
||||
|
||||
@ -1799,14 +1858,18 @@ def showhelp():
|
||||
helpLayout.addWidget(BtnDownN, 4, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnOpenN, 5, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnGPLV3, 6, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAbout, 7, 0, 1, 1)
|
||||
helpLayout.addWidget(HelpStr, 0, 1, 10, 1)
|
||||
helpLayout.addWidget(appreciateButton, 7, 0, 1, 1)
|
||||
helpLayout.addWidget(BtnAbout, 8, 0, 1, 1)
|
||||
helpLayout.addWidget(HelpStr, 0, 1, 11, 1)
|
||||
|
||||
helpWidget.setLayout(helpLayout)
|
||||
helpWindow.setCentralWidget(helpWidget)
|
||||
helpWindow.setFixedSize(int(helpWindow.frameSize().width() * 0.9), int(helpWindow.frameSize().height() * 1.5))
|
||||
helpWindow.setWindowTitle("帮助")
|
||||
helpWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
# 设置背景
|
||||
helpWindow.setObjectName("helpWindow")
|
||||
helpWindow.setStyleSheet(f"QWidget#helpWindow {{background: url({programPath}/Icon/Program/about-background.png) no-repeat;background-position: left bottom;}}")
|
||||
helpWindow.show()
|
||||
return
|
||||
|
||||
@ -1816,6 +1879,9 @@ def showhelp():
|
||||
if not os.path.exists("/usr/bin/uengine"):
|
||||
# Deepin/UOS 用户
|
||||
if "deepin" in SystemVersion.lower() or "uos" in SystemVersion.lower() or subprocess.getoutput("arch").replace("\n", "").replace(" ", "") != "x86_64":
|
||||
if not "ft-" in GetCommandReturn("lscpu").lower() and GetCommandReturn("lscpu").replace(" ", "").replace("\n", "") == "aarch64":
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "UEngine 运行器不支持非飞腾 CPU")
|
||||
sys.exit(1)
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n安装完后重新启动该程序即可") == QtWidgets.QMessageBox.Yes:
|
||||
OpenTerminal(f"pkexec apt install uengine -y")
|
||||
sys.exit(0)
|
||||
@ -1825,15 +1891,24 @@ if not os.path.exists("/usr/bin/uengine"):
|
||||
#QtWidgets.QMessageBox.critical(None, "错误", "请安装 UEngine 后继续")
|
||||
#sys.exit(0)
|
||||
#if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会使用 shenmo 提供的脚本进行安装\n安装完后重新启动该程序即可\n提示:无法保证此安装脚本安装的 UEngine 可以使用") == QtWidgets.QMessageBox.Yes:
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会安装移植版本(之前由 Shenmo 编写)\n安装完后重新启动该程序即可\n提示:需要在 Ubuntu 20.04 或 debian10 及以上版本才能正常安装\nUbuntu 20.04 和 debian10 需要手动安装 dtk(≥5.5),可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/releases 获取") == QtWidgets.QMessageBox.Yes:
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会安装移植版本(之前由 Shenmo 编写)\n安装完后重新启动该程序即可\n提示:需要在 Ubuntu 20.04 或 debian10 及以上版本才能正常安装\nUbuntu 20.04 和 debian10 需要手动安装 dtk(≥5.5),可以从 http://dtk.gfdgdxi.top 获取") == QtWidgets.QMessageBox.Yes:
|
||||
#os.system(f"'{programPath}/launch.sh' deepin-terminal -C \"bash '{programPath}/uengine-installer'\"")
|
||||
OpenTerminal(f"bash '{programPath}/uengine-installer'")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
###########################
|
||||
# 窗口创建
|
||||
###########################
|
||||
window = QtWidgets.QMainWindow()
|
||||
# 判断系统是不是 Deepin 23、有没有安装 Wayland 补丁、是不是 Wayland 环境
|
||||
if not os.path.exists("/usr/bin/uengine-session") and isDeepin23 and os.getenv("XDG_SESSION_TYPE") == "wayland":
|
||||
# 如果是
|
||||
if QtWidgets.QMessageBox.question(None, "提示", "检测到您使用的是 Deepin 23 + Wayland 环境,建议安装 UEngine For Wayland 补丁以便能正常使用 UEngine,是否安装?") == QtWidgets.QMessageBox.Yes:
|
||||
InstallUEnginePatchForWayland()
|
||||
widget = QtWidgets.QWidget()
|
||||
widgetLayout = QtWidgets.QGridLayout()
|
||||
# 权重
|
||||
@ -1975,9 +2050,12 @@ uengineCheckCpu = QtWidgets.QAction(QtGui.QIcon.fromTheme("cpu"), langFile[lang]
|
||||
uengineDeleteUengineCheck = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(40), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][9])
|
||||
uengineReinstall = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][10])
|
||||
uengineUbuntuInstall = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][14])
|
||||
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu 上安装的 UEngine 及其附属脚本")
|
||||
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu 上安装 UEngine(SuperSU 镜像)")
|
||||
uengineUbuntuRemove = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "移除在 Ubuntu/Debian 上安装的 UEngine 及其附属脚本")
|
||||
uengineUbuntuInstallRoot = QtWidgets.QAction(QtGui.QIcon.fromTheme("ubuntu-logo-icon"), "在 Ubuntu/Debian 上安装 UEngine(SuperSU 镜像)")
|
||||
uengineWindowSizeSetting = QtWidgets.QAction(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][16])
|
||||
uengineInstallVia = QtWidgets.QAction("安装 Via")
|
||||
installUEnginePatchForWayland = QtWidgets.QAction("安装 UEngine For Wayland 补丁")
|
||||
uninstallUEnginePatchForWayland = QtWidgets.QAction("卸载 UEngine For Wayland 补丁")
|
||||
uengine.addAction(uengineOpenDebBuilder)
|
||||
uengine.addAction(uengineOpenDebBuilderMore)
|
||||
uengine.addAction(uengineKeyboardToMouse)
|
||||
@ -2003,6 +2081,12 @@ uengine.addSeparator()
|
||||
uengine.addAction(uengineDeleteUengineCheck)
|
||||
uengine.addAction(uengineReinstall)
|
||||
uengineRoot = uengine.addMenu(langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][11]["Name"])
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(uengineInstallVia)
|
||||
uengine.addSeparator()
|
||||
uengine.addAction(installUEnginePatchForWayland)
|
||||
uengine.addAction(uninstallUEnginePatchForWayland)
|
||||
|
||||
#uengineUbuntuInstall.setDisabled(True)
|
||||
# 绑定信号
|
||||
uengineAllowOrDisallowUpdateAndroidApp.triggered.connect(AllowOrDisallowUpdateAndroidApp)
|
||||
@ -2017,6 +2101,14 @@ uengineUbuntuInstallRoot.triggered.connect(UengineUbuntuInstallRoot)
|
||||
uengineDeleteUengineCheck.triggered.connect(DelUengineCheck)
|
||||
uengineReinstall.triggered.connect(ReinstallUengine)
|
||||
uengineWindowSizeSetting.triggered.connect(UengineWindowSizeSetting.ShowWindow)
|
||||
installUEnginePatchForWayland.triggered.connect(InstallUEnginePatchForWayland)
|
||||
uninstallUEnginePatchForWayland.triggered.connect(RemoveUEnginePatchForWayland)
|
||||
|
||||
def InstallVia():
|
||||
ComboInstallPath.setCurrentText(f"{programPath}/APK/Via.apk")
|
||||
Button3Install()
|
||||
|
||||
uengineInstallVia.triggered.connect(InstallVia)
|
||||
|
||||
uengineStart = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][0])
|
||||
uengineStop = QtWidgets.QAction(QtGui.QIcon.fromTheme("services"), langFile[lang]["Main"]["MainWindow"]["Menu"][2]["Menu"][2]["Menu"][1])
|
||||
|
@ -35,7 +35,7 @@ information = json.loads(readtxt(programPath + "/information.json"))
|
||||
programUrl = information["Url"][0]
|
||||
version = information["Version"]
|
||||
goodRunSystem = information["System"]
|
||||
aaptVersion = subprocess.getoutput("aapt version")
|
||||
aaptVersion = subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version")
|
||||
about = '''介绍 :一个基于 Python3 的 tkinter 制作的 UEngine 运行器,在新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
||||
|
||||
版本 :{}
|
||||
@ -75,7 +75,7 @@ def UseProgram():
|
||||
10、deepin 终端:{}'''.format(subprocess.getoutput("uengine version"),
|
||||
subprocess.getoutput("python3 --version"),
|
||||
tk.TkVersion,
|
||||
subprocess.getoutput("aapt version"),
|
||||
subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version"),
|
||||
subprocess.getoutput("dpkg --version"),
|
||||
subprocess.getoutput("mkdir --version"),
|
||||
subprocess.getoutput("chmod --version"),
|
||||
|
@ -14,16 +14,16 @@ else
|
||||
if [ "$versionLower" = "deepin" ] || [ "$versionLower" = "uos" ]; then
|
||||
echo "此系统为 Deepin/UOS,使用 apt 安装"
|
||||
zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap
|
||||
if [[ $? = 0 ]]; then
|
||||
"$dir/uengine-runner-applist-launch.sh" deepin-terminal -C "pkexec apt install uengine -y"
|
||||
if [[ $? == 0 ]]; then
|
||||
"$dir/launch.sh" deepin-terminal -C "pkexec apt install uengine -y"
|
||||
fi
|
||||
else
|
||||
# 因为安装器出现问题,所以废弃
|
||||
zenity --error --text="请安装 UEngine 后继续" --no-wrap
|
||||
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
|
||||
zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap
|
||||
if [[ $? = 0 ]]; then
|
||||
deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
|
||||
if [[ $? == 0 ]]; then
|
||||
"$dir/launch.sh" deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -33,7 +33,7 @@ def Update(name, stars, contact, things, version):
|
||||
"Version": version
|
||||
}
|
||||
try:
|
||||
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text)
|
||||
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL2J1Zy91cGxvYWQucGhw").decode("utf-8")), data=data).text)
|
||||
print(data)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@ -104,4 +104,11 @@ window.setCentralWidget(widget)
|
||||
window.setWindowTitle(f"UEngine 运行器 {version} 问题/建议反馈")
|
||||
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
window.show()
|
||||
starMenu.setDisabled(True)
|
||||
contactThings.setDisabled(True)
|
||||
#otherUpload.setDisabled(True)
|
||||
nameThings.setDisabled(True)
|
||||
updateButton.setDisabled(True)
|
||||
updateThings.setDisabled(True)
|
||||
updateThings.setText("请移步到 Gitee 或 Github 提交 Bug(推荐使用 Gitee)")
|
||||
sys.exit(app.exec_())
|
||||
|
@ -8,9 +8,10 @@ PIDFILE = '/tmp/uengine-runner.pid'
|
||||
#程序结束时清理pid
|
||||
@atexit.register
|
||||
def remove_pid():
|
||||
'''程序结束时清理pid'''
|
||||
with open(PIDFILE) as pidfile:
|
||||
pidlst = pidfile.readlines()
|
||||
pidlst.remove(str(PID)+'\n')
|
||||
pidlst.remove(str(PID)+'\n') #移除记录中的pid
|
||||
with open(PIDFILE,'w') as pidfile:
|
||||
pidfile.writelines(pidlst)
|
||||
|
||||
@ -21,7 +22,7 @@ def main():
|
||||
os.kill(int(i),15)
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
os.remove(PIDFILE)
|
||||
## os.remove(PIDFILE) #因修复#I6ZRZX而注释
|
||||
|
||||
#当该程序被直接执行时,执行结束进程操作。如果是导入的形式,则只是记录pid
|
||||
if __name__ == '__main__':
|
||||
|
@ -2,3 +2,6 @@
|
||||
export XDG_SESSION_TYPE=x11
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
unset WAYLAND_DISPLAYCOPY
|
||||
XDG_CURRENT_DESKTOP="Deepin"
|
||||
export LD_LIBRARY_PATH=/usr/share/uengine/lib64/
|
||||
"$@"
|
||||
|
BIN
spark-uengine-runner.deb
Executable file → Normal file
BIN
spark-uengine-runner.deb
Executable file → Normal file
Binary file not shown.
@ -207,7 +207,7 @@ Name={}
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
||||
self.RunCommandShow("echo '打包 deb 到桌面……'")
|
||||
self.RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
||||
self.RunCommandShow("dpkg-deb -Z xz -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
||||
self.RunCommandShow("echo '正在删除临时目录……'")
|
||||
self.RunCommandShow("rm -rfv '{}'".format(tempPath))
|
||||
self.RunCommandShow("echo '完成!'")
|
||||
@ -289,7 +289,7 @@ def write_txt(path, things):
|
||||
file.close() # 关闭文本对象
|
||||
|
||||
def GetApkInformation(apkFilePath):
|
||||
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
|
||||
return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
|
||||
|
||||
def GetApkActivityName(apkFilePath):
|
||||
info = GetApkInformation(apkFilePath)
|
||||
|
@ -227,7 +227,7 @@ Name={}
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
||||
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
||||
self.RunCommandShow("echo '打包 deb 到桌面……'")
|
||||
self.RunCommandShow("dpkg -b '{}' '{}/{}_{}_all.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, versionText.text()))
|
||||
self.RunCommandShow("dpkg-deb -Z xz -b '{}' '{}/{}_{}_all.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, versionText.text()))
|
||||
self.RunCommandShow("echo '正在删除临时目录……'")
|
||||
self.RunCommandShow("rm -rfv '{}'".format(tempPath))
|
||||
self.RunCommandShow("echo '完成!'")
|
||||
@ -313,7 +313,7 @@ def write_txt(path, things):
|
||||
file.close() # 关闭文本对象
|
||||
|
||||
def GetApkInformation(apkFilePath):
|
||||
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
|
||||
return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
|
||||
|
||||
def GetApkActivityName(apkFilePath):
|
||||
info = GetApkInformation(apkFilePath)
|
||||
|
@ -3,7 +3,7 @@
|
||||
CheckEnv(){
|
||||
# 检测是不是 Deepin
|
||||
lsb_release -i | grep -i deepin
|
||||
if [[ $? != 0 ]]; then
|
||||
if [[ $? == 0 ]]; then
|
||||
zenity --error --no-wrap '--text=您的系统无法安装 UEngine,原因:此脚本不支持 Deepin'
|
||||
exit
|
||||
fi
|
||||
@ -32,7 +32,7 @@ CheckEnv(){
|
||||
#kernel=`uname -r`
|
||||
python3 "${programPath}/CompareVersion.py" "${newestDtkVersion}" "5.5"
|
||||
if [[ $? != 0 ]]; then
|
||||
zenity --error --no-wrap "--text=提示:您当前的 dtk 版本过老,请更新 dtk 版本后再试(版本需要大于等于 5.5),可以从 https://gitee.com/gfdgd-xi/dtk-sources-for-uos-apt/ 获取编译好的 dtk"
|
||||
zenity --error --no-wrap "--text=提示:您当前的 dtk 版本过老,请更新 dtk 版本后再试(版本需要大于等于 5.5),可以从 http://dtk.gfdgdxi.top 获取编译好的 dtk"
|
||||
exit
|
||||
fi
|
||||
#exit
|
||||
|
@ -35,7 +35,7 @@ information = json.loads(readtxt(programPath + "/information.json"))
|
||||
programUrl = information["Url"][0]
|
||||
version = information["Version"]
|
||||
goodRunSystem = information["System"]
|
||||
aaptVersion = subprocess.getoutput("aapt version")
|
||||
aaptVersion = subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version")
|
||||
about = '''介绍 :一个基于 Python3 的 tkinter 制作的 UEngine 运行器,在新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
||||
|
||||
版本 :{}
|
||||
@ -75,7 +75,7 @@ def UseProgram():
|
||||
10、deepin 终端:{}'''.format(subprocess.getoutput("uengine version"),
|
||||
subprocess.getoutput("python3 --version"),
|
||||
tk.TkVersion,
|
||||
subprocess.getoutput("aapt version"),
|
||||
subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version"),
|
||||
subprocess.getoutput("dpkg --version"),
|
||||
subprocess.getoutput("mkdir --version"),
|
||||
subprocess.getoutput("chmod --version"),
|
||||
|
@ -14,16 +14,16 @@ else
|
||||
if [ "$versionLower" = "deepin" ] || [ "$versionLower" = "uos" ]; then
|
||||
echo "此系统为 Deepin/UOS,使用 apt 安装"
|
||||
zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap
|
||||
if [[ $? = 0 ]]; then
|
||||
"$dir/uengine-runner-applist-launch.sh" deepin-terminal -C "pkexec apt install uengine -y"
|
||||
if [[ $? == 0 ]]; then
|
||||
"$dir/launch.sh" deepin-terminal -C "pkexec apt install uengine -y"
|
||||
fi
|
||||
else
|
||||
# 因为安装器出现问题,所以废弃
|
||||
zenity --error --text="请安装 UEngine 后继续" --no-wrap
|
||||
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
|
||||
zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap
|
||||
if [[ $? = 0 ]]; then
|
||||
deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
|
||||
if [[ $? == 0 ]]; then
|
||||
"$dir/launch.sh" deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -33,7 +33,7 @@ def Update(name, stars, contact, things, version):
|
||||
"Version": version
|
||||
}
|
||||
try:
|
||||
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text)
|
||||
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL2J1Zy91cGxvYWQucGhw").decode("utf-8")), data=data).text)
|
||||
print(data)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@ -104,4 +104,11 @@ window.setCentralWidget(widget)
|
||||
window.setWindowTitle(f"UEngine 运行器 {version} 问题/建议反馈")
|
||||
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
window.show()
|
||||
starMenu.setDisabled(True)
|
||||
contactThings.setDisabled(True)
|
||||
#otherUpload.setDisabled(True)
|
||||
nameThings.setDisabled(True)
|
||||
updateButton.setDisabled(True)
|
||||
updateThings.setDisabled(True)
|
||||
updateThings.setText("请移步到 Gitee 或 Github 提交 Bug(推荐使用 Gitee)")
|
||||
sys.exit(app.exec_())
|
||||
|
@ -8,9 +8,10 @@ PIDFILE = '/tmp/uengine-runner.pid'
|
||||
#程序结束时清理pid
|
||||
@atexit.register
|
||||
def remove_pid():
|
||||
'''程序结束时清理pid'''
|
||||
with open(PIDFILE) as pidfile:
|
||||
pidlst = pidfile.readlines()
|
||||
pidlst.remove(str(PID)+'\n')
|
||||
pidlst.remove(str(PID)+'\n') #移除记录中的pid
|
||||
with open(PIDFILE,'w') as pidfile:
|
||||
pidfile.writelines(pidlst)
|
||||
|
||||
@ -21,7 +22,7 @@ def main():
|
||||
os.kill(int(i),15)
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
os.remove(PIDFILE)
|
||||
## os.remove(PIDFILE) #因修复#I6ZRZX而注释
|
||||
|
||||
#当该程序被直接执行时,执行结束进程操作。如果是导入的形式,则只是记录pid
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user