适配deepin23

This commit is contained in:
gfdgd_xi 2024-01-29 18:55:14 +08:00
parent ce15113a7a
commit d385fdd64c
15 changed files with 31 additions and 16 deletions

View File

@ -1,5 +1,6 @@
clean: clean:
python3 RemovePycacheFile.py python3 RemovePycacheFile.py
rm com.gitee.uengine.runner.spark.deb -fv
build: build:
echo 别云间 echo 别云间
@ -58,6 +59,7 @@ build:
cp -rv uengine-remove.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ 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 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 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/
rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information rm -rfv new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Help/information
python3 UpdateTime.py python3 UpdateTime.py
python3 RemovePycacheFile.py #new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ python3 RemovePycacheFile.py #new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/

View File

@ -6,6 +6,12 @@ import traceback
import subprocess import subprocess
from getxmlimg import getsavexml from getxmlimg import getsavexml
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
# 获取用户主目录
def get_home()->"获取用户主目录":
return os.path.expanduser('~')
class ProgramInformation: class ProgramInformation:
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
version = "1.6.0Alpha2" version = "1.6.0Alpha2"
@ -49,7 +55,7 @@ class APK:
def uninstall(self): def uninstall(self):
return os.system("uengine uninstall --pkg='{}'".format(self.packageName())) return os.system("uengine uninstall --pkg='{}'".format(self.packageName()))
def information(self): 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): def activityName(self):
info = self.information() info = self.information()
for line in info.split('\n'): for line in info.split('\n'):

View File

@ -10,10 +10,12 @@ import zipfile
import subprocess import subprocess
import re import re
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
class getsavexml(): class getsavexml():
def savexml(self,apkFilePath,xmlpath,iconSavePath): 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) print(cmddumpid)
xmltree = subprocess.getoutput(cmddumpid) xmltree = subprocess.getoutput(cmddumpid)
xmls = xmltree.splitlines() xmls = xmltree.splitlines()
@ -35,7 +37,7 @@ class getsavexml():
print(foreimgid) print(foreimgid)
# 直接从apk resource文件获取前后两层图片路径及ID字符串 # 直接从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() resourcelines = resource.splitlines()
print(resourcelines) print(resourcelines)

View File

@ -418,7 +418,7 @@ def write_txt(path: "路径", things: "内容")->"写入文本文档":
# 获取 aapt 的所有信息 # 获取 aapt 的所有信息
def GetApkInformation(apkFilePath: "apk 所在路径")->"获取 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 # 获取 apk Activity
def GetApkActivityName(apkFilePath: "apk 所在路径")->"获取 apk Activity": def GetApkActivityName(apkFilePath: "apk 所在路径")->"获取 apk Activity":
@ -1559,7 +1559,7 @@ def UseProgram():
<p>10deepin 终端{}</p>'''.format(subprocess.getoutput("uengine version"), <p>10deepin 终端{}</p>'''.format(subprocess.getoutput("uengine version"),
subprocess.getoutput("python3 --version"), subprocess.getoutput("python3 --version"),
QtCore.qVersion, QtCore.qVersion,
subprocess.getoutput("aapt version"), subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version"),
subprocess.getoutput("dpkg --version"), subprocess.getoutput("dpkg --version"),
subprocess.getoutput("mkdir --version"), subprocess.getoutput("mkdir --version"),
subprocess.getoutput("chmod --version"), subprocess.getoutput("chmod --version"),
@ -1582,7 +1582,7 @@ if not lang in langFile.keys():
programUrl = information["Url"][0] programUrl = information["Url"][0]
version = information["Version"] version = information["Version"]
goodRunSystem = information["System"] goodRunSystem = information["System"]
aaptVersion = GetCommandReturn("aapt version") aaptVersion = GetCommandReturn(f"'{programPath}/aapt/run-aapt.sh' version")
SystemVersion = GetSystemVersion() SystemVersion = GetSystemVersion()
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0]) iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
about = f'''<p align="center"><img width=256 src="{iconPath}"/></p> about = f'''<p align="center"><img width=256 src="{iconPath}"/></p>

View File

@ -1,13 +1,13 @@
Package: com.gitee.uengine.runner.spark Package: com.gitee.uengine.runner.spark
Source: com.gitee.uengine.runner.spark Source: com.gitee.uengine.runner.spark
Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu
Version: 2.1.2 Version: 2.2.0
Architecture: all Architecture: all
Section: utils Section: utils
Installed-Size: 2920 Installed-Size: 2920
Maintainer: gfdgd xi <3025613752@qq.com> 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, zenity, python3-pil.imagetk 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, inotify-tools, aria2, python3-pyqt5, python3-matplotlib, python3-urllib3, zenity, python3-pil.imagetk
Recommends: uengine, deepin-elf-verify, python3-pyqt5.qtwebengine Recommends: uengine, deepin-elf-verify, python3-pyqt5.qtwebengine, aapt
Priority: optional Priority: optional
Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu Conflicts: spark-uengine-apk-builder, com.gitee.uengine.runner.spark.ubuntu
Homepage: https://gitee.com/gfdgd-xi/uengine-runner Homepage: https://gitee.com/gfdgd-xi/uengine-runner

View File

@ -1,5 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os
import sys import sys
import json
import base64 import base64
import requests import requests
print("""浣溪沙 print("""浣溪沙
@ -8,4 +10,7 @@ print("""浣溪沙
print("") print("")
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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

View File

@ -263,7 +263,7 @@
"11、deepin 终端", "11、deepin 终端",
"……" "……"
], ],
"Time": "2023-08-14 17:02:40 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.35", "Time": "2024-01-29 18:34:06 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.35",
"Contribute": [ "Contribute": [
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>", "<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
"<hr>", "<hr>",

BIN
spark-uengine-runner.deb Executable file → Normal file

Binary file not shown.

View File

@ -289,7 +289,7 @@ def write_txt(path, things):
file.close() # 关闭文本对象 file.close() # 关闭文本对象
def GetApkInformation(apkFilePath): def GetApkInformation(apkFilePath):
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath)) return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
def GetApkActivityName(apkFilePath): def GetApkActivityName(apkFilePath):
info = GetApkInformation(apkFilePath) info = GetApkInformation(apkFilePath)

View File

@ -313,7 +313,7 @@ def write_txt(path, things):
file.close() # 关闭文本对象 file.close() # 关闭文本对象
def GetApkInformation(apkFilePath): def GetApkInformation(apkFilePath):
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath)) return GetCommandReturn("'{}/aapt/run-aapt.sh' dump badging '{}'".format(programPath, apkFilePath))
def GetApkActivityName(apkFilePath): def GetApkActivityName(apkFilePath):
info = GetApkInformation(apkFilePath) info = GetApkInformation(apkFilePath)

View File

@ -35,7 +35,7 @@ information = json.loads(readtxt(programPath + "/information.json"))
programUrl = information["Url"][0] programUrl = information["Url"][0]
version = information["Version"] version = information["Version"]
goodRunSystem = information["System"] 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包启动菜单到桌面或系统菜单。 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"), 10、deepin 终端:{}'''.format(subprocess.getoutput("uengine version"),
subprocess.getoutput("python3 --version"), subprocess.getoutput("python3 --version"),
tk.TkVersion, tk.TkVersion,
subprocess.getoutput("aapt version"), subprocess.getoutput(f"'{programPath}/aapt/run-aapt.sh' version"),
subprocess.getoutput("dpkg --version"), subprocess.getoutput("dpkg --version"),
subprocess.getoutput("mkdir --version"), subprocess.getoutput("mkdir --version"),
subprocess.getoutput("chmod --version"), subprocess.getoutput("chmod --version"),