diff --git a/Makefile b/Makefile index d74aea5..9ddaede 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ clean: python3 RemovePycacheFile.py + rm com.gitee.uengine.runner.spark.deb -fv build: echo 别云间 @@ -58,6 +59,7 @@ 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/ 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 +88,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 \ No newline at end of file + python3 mainwindow.py diff --git a/api/__init__.py b/api/__init__.py index abd242c..d8c2708 100755 --- a/api/__init__.py +++ b/api/__init__.py @@ -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'): diff --git a/getxmlimg.py b/getxmlimg.py index 2bda884..cbefdef 100755 --- a/getxmlimg.py +++ b/getxmlimg.py @@ -10,10 +10,12 @@ 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() @@ -35,7 +37,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) diff --git a/mainwindow.py b/mainwindow.py index 202943e..59fa6d1 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -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": @@ -1559,7 +1559,7 @@ def UseProgram():

10、deepin 终端:{}

'''.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"), @@ -1582,7 +1582,7 @@ 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'''

diff --git a/new-deb-build/DEBIAN/control b/new-deb-build/DEBIAN/control index eba6e6d..c5bd458 100755 --- a/new-deb-build/DEBIAN/control +++ b/new-deb-build/DEBIAN/control @@ -1,13 +1,13 @@ 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.2 +Version: 2.2.0 Architecture: all Section: utils Installed-Size: 2920 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 -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, inotify-tools, 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 Homepage: https://gitee.com/gfdgd-xi/uengine-runner diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Download.py b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Download.py index fb6da69..acf1d9a 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Download.py +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Download.py @@ -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) \ No newline at end of file +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) \ No newline at end of file diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/Alipay.jpg b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/Alipay.jpg new file mode 100644 index 0000000..64308b8 Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/Alipay.jpg differ diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/QQ.png b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/QQ.png new file mode 100644 index 0000000..00f8e15 Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/QQ.png differ diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/Wechat.png b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/Wechat.png new file mode 100644 index 0000000..854388e Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/Wechat.png differ diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/advertisement0.jpg b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/advertisement0.jpg new file mode 100644 index 0000000..2449c04 Binary files /dev/null and b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/Icon/QR/advertisement0.jpg differ diff --git a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json index ebadbc7..2126054 100755 --- a/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json +++ b/new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/information.json @@ -263,7 +263,7 @@ "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": [ "感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:

", "
", diff --git a/spark-uengine-runner.deb b/spark-uengine-runner.deb old mode 100755 new mode 100644 index 3403009..e69de29 Binary files a/spark-uengine-runner.deb and b/spark-uengine-runner.deb differ diff --git a/uengine-apk-builder b/uengine-apk-builder index 1490450..48bc4d2 100755 --- a/uengine-apk-builder +++ b/uengine-apk-builder @@ -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) diff --git a/uengine-apk-builder-more b/uengine-apk-builder-more index c1035b7..cefb42d 100755 --- a/uengine-apk-builder-more +++ b/uengine-apk-builder-more @@ -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) diff --git a/uengine-runner-about b/uengine-runner-about index 70208f7..36c7d0c 100755 --- a/uengine-runner-about +++ b/uengine-runner-about @@ -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"),