diff --git a/README.md b/README.md index bec5801..e001463 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# uengine 运行器 1.3.0 +# uengine 运行器 1.3.1 ### 介绍 新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的Uengine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。 @@ -8,6 +8,11 @@ ### 更新内容 +#### V1.3.1: +**※1、修复打包问题,防止部分用户安装出错的问题;** +**※2、修复了程序无法提取图标时可以提取默认图标使用;** +![1.3.1](https://storage.deepin.org/thread/202108121509217807_截图_选择区域_20210812150849.png) + #### V1.3.0: **※1、修改了界面布局;** **※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs;** @@ -93,6 +98,7 @@ pip3 uninstall ttkthemes | 网易云音乐 For Android | https://music.163.com/#/download | | 抖音 | https://www.wandoujia.com/apps/7461948 | | 360 手机浏览器 | https://mse.360.cn/ | +| E-Go | 忘了 | | 其他待测试…… | 其他待测试…… | **注意:提取不出图标不代表未安装成功!** diff --git a/build/DEBIAN/control b/build/DEBIAN/control index ced2f2f..5ae6d7f 100644 --- a/build/DEBIAN/control +++ b/build/DEBIAN/control @@ -1,9 +1,9 @@ Package: spark-uengine-runner -Version: 1.3.0 -Maintainer: gfdgd xi <3025613752@qq.com> +Version: 1.3.1 +Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com> Homepage: https://gitee.com/gfdgd-xi/uengine-runner Architecture: all Priority: optional -Depends: python3, python3-tk, python3-pip, aapt, uengine, python3-pil +Depends: python3, python3-tk, python3-pip, aapt, uengine, python3-pil, python3-setuptools Description: gfdgd xi make's uengine runner diff --git a/build/opt/apps/uengine-runner/defult.png b/build/opt/apps/uengine-runner/defult.png new file mode 100755 index 0000000..4cff476 Binary files /dev/null and b/build/opt/apps/uengine-runner/defult.png differ diff --git a/build/opt/apps/uengine-runner/uengine-runner b/build/opt/apps/uengine-runner/uengine-runner index 61b1516..93bf9dc 100755 --- a/build/opt/apps/uengine-runner/uengine-runner +++ b/build/opt/apps/uengine-runner/uengine-runner @@ -341,19 +341,24 @@ def GetApkChineseLabel(apkFilePath)->"获取软件的中文名称": #合并两个函数到一起 def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标": - info = GetApkInformation(apkFilePath) - for line in info.split('\n'): - if "application:" in line: - xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","") - if xmlpath.endswith('.xml'): - xmlsave = getsavexml() - print(xmlpath) - xmlsave.savexml(apkFilePath,xmlpath,iconSavePath) - else: - zip = zipfile.ZipFile(apkFilePath) - iconData = zip.read(xmlpath) - with open(iconSavePath, 'w+b') as saveIconFile: - saveIconFile.write(iconData) + try: + info = GetApkInformation(apkFilePath) + for line in info.split('\n'): + if "application:" in line: + xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","") + if xmlpath.endswith('.xml'): + xmlsave = getsavexml() + print(xmlpath) + xmlsave.savexml(apkFilePath,xmlpath,iconSavePath) + else: + zip = zipfile.ZipFile(apkFilePath) + iconData = zip.read(xmlpath) + with open(iconSavePath, 'w+b') as saveIconFile: + saveIconFile.write(iconData) + except: + traceback.print_exc() + print("Error, show defult icon") + shutil.copy(programPath + "/defult.png", iconSavePath) def saveicon(): global temppath @@ -412,7 +417,7 @@ def get_home()->"获取用户主目录": # 程序信息 ########################### programUrl = "https://gitee.com/gfdgd-xi/uengine-runner" -version = "1.3.0" +version = "1.3.1" goodRunSystem = "Linux(deepin/UOS)" aaptVersion = GetCommandReturn("aapt version") about = ''' 一个基于 Python3 的 tkinter 制作的 uengine APK 安装器 @@ -449,7 +454,11 @@ tips = ''' 新版本Deepin/UOS发布后,可以在应用商店安装部分 4、如果报错是有关产生 .deksotp 文件有关,一般可以打开程序列表运行。如果想要连接其他手机,请使用 1.2.0 以前的版本,可以使用 adb 连接。 ''' -updateThingsString = '''V1.3.0: +updateThingsString = '''V1.3.1: +※1、修复打包问题,防止部分用户安装出错的问题; +※2、修复了程序无法提取图标时可以提取默认图标使用; + +V1.3.0: ※1、修改了界面布局; ※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs; 3、删除少量冗余代码,调整代码顺序; @@ -468,16 +477,11 @@ V1.2.1: ※1、进行了安装方式的修改(不使用 adb),修复原无法安装和卸载的问题; 2、进行了部分优化; 3、进行了功能缩水; -4、修复 deb 打包错误。 - -V1.2.0: -1、支持安装自动添加快捷方式、卸载删除快捷方式; -2、支持使用包名或 APK 文件卸载程序; -3、支持查看安装的所有包名; -4、进行了部分优化''' +4、修复 deb 打包错误。''' title = "uengine 安装器 {}".format(version) updateTime = "2021年08月08日" updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y")) +programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0]) desktop = "/opt/apps/uengine-runner/UengineAndroidProgramList.desktop" desktopName = "UengineAndroidProgramList.desktop" diff --git a/defult.png b/defult.png new file mode 100755 index 0000000..4cff476 Binary files /dev/null and b/defult.png differ diff --git a/main.py b/main.py index 61b1516..93bf9dc 100755 --- a/main.py +++ b/main.py @@ -341,19 +341,24 @@ def GetApkChineseLabel(apkFilePath)->"获取软件的中文名称": #合并两个函数到一起 def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标": - info = GetApkInformation(apkFilePath) - for line in info.split('\n'): - if "application:" in line: - xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","") - if xmlpath.endswith('.xml'): - xmlsave = getsavexml() - print(xmlpath) - xmlsave.savexml(apkFilePath,xmlpath,iconSavePath) - else: - zip = zipfile.ZipFile(apkFilePath) - iconData = zip.read(xmlpath) - with open(iconSavePath, 'w+b') as saveIconFile: - saveIconFile.write(iconData) + try: + info = GetApkInformation(apkFilePath) + for line in info.split('\n'): + if "application:" in line: + xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","") + if xmlpath.endswith('.xml'): + xmlsave = getsavexml() + print(xmlpath) + xmlsave.savexml(apkFilePath,xmlpath,iconSavePath) + else: + zip = zipfile.ZipFile(apkFilePath) + iconData = zip.read(xmlpath) + with open(iconSavePath, 'w+b') as saveIconFile: + saveIconFile.write(iconData) + except: + traceback.print_exc() + print("Error, show defult icon") + shutil.copy(programPath + "/defult.png", iconSavePath) def saveicon(): global temppath @@ -412,7 +417,7 @@ def get_home()->"获取用户主目录": # 程序信息 ########################### programUrl = "https://gitee.com/gfdgd-xi/uengine-runner" -version = "1.3.0" +version = "1.3.1" goodRunSystem = "Linux(deepin/UOS)" aaptVersion = GetCommandReturn("aapt version") about = ''' 一个基于 Python3 的 tkinter 制作的 uengine APK 安装器 @@ -449,7 +454,11 @@ tips = ''' 新版本Deepin/UOS发布后,可以在应用商店安装部分 4、如果报错是有关产生 .deksotp 文件有关,一般可以打开程序列表运行。如果想要连接其他手机,请使用 1.2.0 以前的版本,可以使用 adb 连接。 ''' -updateThingsString = '''V1.3.0: +updateThingsString = '''V1.3.1: +※1、修复打包问题,防止部分用户安装出错的问题; +※2、修复了程序无法提取图标时可以提取默认图标使用; + +V1.3.0: ※1、修改了界面布局; ※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs; 3、删除少量冗余代码,调整代码顺序; @@ -468,16 +477,11 @@ V1.2.1: ※1、进行了安装方式的修改(不使用 adb),修复原无法安装和卸载的问题; 2、进行了部分优化; 3、进行了功能缩水; -4、修复 deb 打包错误。 - -V1.2.0: -1、支持安装自动添加快捷方式、卸载删除快捷方式; -2、支持使用包名或 APK 文件卸载程序; -3、支持查看安装的所有包名; -4、进行了部分优化''' +4、修复 deb 打包错误。''' title = "uengine 安装器 {}".format(version) updateTime = "2021年08月08日" updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y")) +programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0]) desktop = "/opt/apps/uengine-runner/UengineAndroidProgramList.desktop" desktopName = "UengineAndroidProgramList.desktop" diff --git a/spark-uengine-runner.deb b/spark-uengine-runner.deb index 8279207..b525f34 100644 Binary files a/spark-uengine-runner.deb and b/spark-uengine-runner.deb differ