UEngine运行器1.8.1

This commit is contained in:
gfdgd_xi 2022-08-30 21:26:04 +08:00
parent 531690fa4a
commit 05eefcfe9b
21 changed files with 289 additions and 296 deletions

View File

@ -19,6 +19,8 @@ build:
cp -rv uengine-app-setting.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ cp -rv uengine-app-setting.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv uengine-app-install new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ cp -rv uengine-app-install new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv uengine_logo.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ cp -rv uengine_logo.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv defult.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv runner.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ cp -rv runner.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv root-uengine.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ cp -rv root-uengine.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
cp -rv menu.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/ cp -rv menu.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
@ -35,7 +37,7 @@ install:
make build make build
echo "Install..." echo "Install..."
sudo apt update sudo apt update
sudo dpkg -i com.gitee.uengine.runner.spark.deb sudo dpkg -i com.gitee.uengine.runner.spark.deb ; true
sudo apt install -f sudo apt install -f
depend: depend:

View File

@ -0,0 +1,2 @@
#!/bin/bash
/usr/bin/uengine launch.sh --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

Binary file not shown.

View File

@ -28,6 +28,7 @@
"※2、修复 APK 路径带空格无法正常安装的问题", "※2、修复 APK 路径带空格无法正常安装的问题",
"3、修复打包器打包的 APK 带下划线“_”无法正常打包的问题", "3、修复打包器打包的 APK 带下划线“_”无法正常打包的问题",
"4、修复打包器下方命令返回过多空白行的问题", "4、修复打包器下方命令返回过多空白行的问题",
"5、修复程序生成的默认图标任然是旧版图标的问题",
"", "",
"<b>V1.8.0</b>", "<b>V1.8.0</b>",
"※1、程序界面大部分由 Tkinter 转 PyQt5", "※1、程序界面大部分由 Tkinter 转 PyQt5",
@ -184,7 +185,7 @@
"11、deepin 终端", "11、deepin 终端",
"……" "……"
], ],
"Time": "2022年08月01日", "Time": "2022年08月29日",
"Contribute": [ "Contribute": [
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>", "<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
"<hr>", "<hr>",
@ -202,6 +203,7 @@
"感谢 通天灵宝https://bbs.deepin.org/user/137230、wuhaiou123https://bbs.chinauos.com/zh/user/309117 反馈的 图标生成错误导致无法生成 .desktop 文件的问题", "感谢 通天灵宝https://bbs.deepin.org/user/137230、wuhaiou123https://bbs.chinauos.com/zh/user/309117 反馈的 图标生成错误导致无法生成 .desktop 文件的问题",
"感谢 潜伏https://bbs.chinauos.com/zh/user/303339 反馈的右键支持安装/卸载的建议", "感谢 潜伏https://bbs.chinauos.com/zh/user/303339 反馈的右键支持安装/卸载的建议",
"感谢 z***g@gmx.dehttps://bbs.chinauos.com/zh/user/312017 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题", "感谢 z***g@gmx.dehttps://bbs.chinauos.com/zh/user/312017 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题",
"参考 忘记、过去https://bbs.deepin.org/user/154730 的帖子《如何更优雅地使用 pkexec》https://bbs.deepin.org/post/202966" "参考 忘记、过去https://bbs.deepin.org/user/154730 的帖子《如何更优雅地使用 pkexec》https://bbs.deepin.org/post/202966",
"感谢 U+解答组们 反馈的 1.8.0 带路径无法正常安装 APK 的问题"
] ]
} }

View File

@ -491,11 +491,11 @@ def SaveApkIcon(apkFilePath, iconSavePath)->"保存 apk 文件的图标":
saveIconFile.write(iconData) saveIconFile.write(iconData)
return return
print("None Icon! Show defult icon") print("None Icon! Show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath) shutil.copy(programPath + "/defult.svg", iconSavePath)
except: except:
traceback.print_exc() traceback.print_exc()
print("Error, show defult icon") print("Error, show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath) shutil.copy(programPath + "/defult.svg", iconSavePath)
def saveicon(): def saveicon():
global temppath global temppath
@ -1078,7 +1078,7 @@ class UpdateWindow():
cancel = QtWidgets.QPushButton("取消") cancel = QtWidgets.QPushButton("取消")
cancel.clicked.connect(UpdateWindow.update.close) cancel.clicked.connect(UpdateWindow.update.close)
try: try:
UpdateWindow.data = json.loads(requests.get("http://120.25.153.144/uengine-runner/update.json").text) UpdateWindow.data = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/update.json").text)
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:") versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:")
if UpdateWindow.data["Version"] == version: if UpdateWindow.data["Version"] == version:
updateText.setText("此为最新版本,无需更新") updateText.setText("此为最新版本,无需更新")
@ -1217,7 +1217,7 @@ class ApkInformation():
if choose == None or choose == 7: if choose == None or choose == 7:
return return
try: try:
QtWidgets.QMessageBox.critical(widget, "提示", requests.post("http://120.25.153.144/uengine-runner/app/check/add.php", {"Package": GetApkPackageName(path), "Type": choose}).text) QtWidgets.QMessageBox.information(widget, "提示", requests.post("https://304626p927.goho.co/uengine-runner/app/check/add.php", {"Package": GetApkPackageName(path), "Type": choose}).text)
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"]) QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"])
@ -1229,7 +1229,7 @@ class ApkInformation():
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"]) QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"])
return return
try: try:
data = json.loads(requests.get("http://120.25.153.144/uengine-runner/app/check/" + package +"/data.json").text) data = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/app/check/" + package +"/data.json").text)
print(data) print(data)
except: except:
QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!") QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!")
@ -1569,7 +1569,7 @@ findApkNameHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runn
findApkActivityHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json")).values()) findApkActivityHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json")).values())
try: try:
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL29wZW4vSW5zdGFsbC5waHA=").decode("utf-8")) + "?Version=" + version]).start() threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vdWVuZ2luZS1ydW5uZXIvb3Blbi9JbnN0YWxsLnBocA==").decode("utf-8")) + "?Version=" + version]).start()
except: except:
pass pass
# add sub window # add sub window
@ -1577,10 +1577,10 @@ except:
windowflag = "close" windowflag = "close"
def Egg(): def Egg():
try: try:
lists = json.loads(requests.get("http://120.25.153.144/uengine-runner/VersionList.json").text) lists = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/VersionList.json").text)
data = [] data = []
for i in lists: for i in lists:
data.append(int(requests.get("http://120.25.153.144/uengine-runner/{}/data.txt".format(i)).text)) data.append(int(requests.get("https://304626p927.goho.co/uengine-runner/{}/data.txt".format(i)).text))
except: except:
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!") QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
return return

View File

@ -1,22 +1,19 @@
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: 1.8.0 Version: 1.8.1
Architecture: all Architecture: all
Section: utils Section: utils
Installed-Size: 1600
Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>, 柚子<https://gitee.com/Limexb>, 为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>, 星空露光<https://gitee.com/Cynorkyle>, shenmo<jifengshenmo@outlook.com> Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>, 柚子<https://gitee.com/Limexb>, 为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>, 星空露光<https://gitee.com/Cynorkyle>, shenmo<jifengshenmo@outlook.com>
Depends: python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, inotify-tools, aria2, python3-pyqt5 Depends: python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, inotify-tools, aria2, python3-pyqt5
Recommends: python3-matplotlib, uengine, deepin-elf-verify (>= 0.0.16.7-1) Recommends: python3-matplotlib, uengine, deepin-elf-verify (>= 0.0.16.7-1)
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, https://github.com/gfdgd-xi/uengine-runner, https://www.gitlink.org.cn/gfdgd_xi/uengine-runner] Homepage: [https://gitee.com/gfdgd-xi/uengine-runner, https://github.com/gfdgd-xi/uengine-runner, https://www.gitlink.org.cn/gfdgd_xi/uengine-runner]
Description: UEngine 运行器1.8.0 更新内容: Description: UEngine 运行器1.8.1 更新内容:
※1、程序界面大部分由 Tkinter 转 PyQt5 ※1、修复在 APK 详细信息中图标可能过大导致无法正常使用的问题
※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root ※2、修复 APK 路径带空格无法正常安装的问题
※3、增加了安装/卸载失败后的提示 3、修复打包器打包的 APK 带下划线“_”无法正常打包的问题
※4、补回谢明名单 4、修复打包器下方命令返回过多空白行的问题
※5、支持免密安装/卸载 APK
6、pip 更换华为源,提升下载速度
7、新增主题功能
8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)
开发/参与者gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>, 柚子<https://gitee.com/Limexb>, 为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>, 星空露光<https://gitee.com/Cynorkyle>, shenmo<jifengshenmo@outlook.com> 开发/参与者gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>, 柚子<https://gitee.com/Limexb>, 为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>, 星空露光<https://gitee.com/Cynorkyle>, shenmo<jifengshenmo@outlook.com>

View File

@ -21,4 +21,4 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-laun
# 因为 Ubuntu 的问题,省略 # 因为 Ubuntu 的问题,省略
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
# 向服务器返回安装数加1不显示内容且忽略错误 # 向服务器返回安装数加1不显示内容且忽略错误
curl http://120.25.153.144/uengine-runner/Install.php?Version=1.8.0 -s > /dev/null | true curl https://304626p927.goho.co/uengine-runner/Install.php?Version=1.8.1 -s > /dev/null | true

View File

@ -1,19 +1,19 @@
#!/bin/sh #!/bin/sh
# 删除软链接 # 删除软链接
rm -fv /usr/bin/uengine-runner rm -f /usr/bin/uengine-runner
rm -fv /usr/bin/uengine-apk-builder rm -f /usr/bin/uengine-apk-builder
rm -fv /usr/bin/uengine-app-uninstall rm -f /usr/bin/uengine-app-uninstall
rm -fv /usr/bin/uengine-app-install rm -f /usr/bin/uengine-app-install
rm -fv /usr/bin/uengine-clean rm -f /usr/bin/uengine-clean
rm -fv /usr/bin/uengine-runner-about rm -f /usr/bin/uengine-runner-about
rm -fv /usr/bin/uengine-keyboard rm -f /usr/bin/uengine-keyboard
rm -fv /usr/bin/uengine-useadb rm -f /usr/bin/uengine-useadb
rm -fv /usr/bin/uengine-runner-launch.sh rm -f /usr/bin/uengine-runner-launch.sh
rm -fv /usr/bin/uengine-runner-update-bug rm -f /usr/bin/uengine-runner-update-bug
rm -fv /usr/bin/uengine-root rm -f /usr/bin/uengine-root
rm -frv /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__ rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__
rm -frv /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__ rm -fr /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__
rm -fv /usr/bin/uengine-runner-applist-launch.sh rm -f /usr/bin/uengine-runner-applist-launch.sh
# 刷新图标缓存 # 刷新图标缓存
# 因为 Ubuntu 的问题,省略 # 因为 Ubuntu 的问题,省略
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true

View File

@ -7,6 +7,6 @@ Icon=/opt/apps/com.gitee.uengine.runner.spark/files/menu.svg
MimeType= MimeType=
Name=UEngine App List Name=UEngine App List
Name[zh]=UEngine 程序菜单 Name[zh]=UEngine 程序菜单
StartupWMClass=UEngine 程序菜单 StartupWMClass=uengine-runner-applist-launch.sh
Terminal=false Terminal=false
Type=Application Type=Application

View File

@ -1,165 +1,190 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'> <meta charset='UTF-8'>
<title>index</title> <meta name='viewport' content='width=device-width initial-scale=1'>
<link rel="shortcut icon" href="../runner.svg">
<title>UEngine 程序帮助</title>
</head> </head>
<body><h1 id='uengine-运行器帮助'>UEngine 运行器帮助</h1>
<hr />
<h2 id='帮助简述'>帮助简述</h2>
<blockquote><p>安装APK点浏览按钮选中需要安装的APK然后点安装按钮<br/>卸载APK在卸载APK下面的输入框内输入需要卸载的APK包名点卸载按钮如果无法获取包名可以通过浏览APK文件程序自动获取包名进行卸载。<br/>保存APK图标在安装APK下面的输入框浏览或输入APK的路径然后点击“保存图标”按钮选择保存位置即可<br/>重置删除UEngine数据点击菜单栏的“UEngine”的“清空UEngine数据”输入密码重启即可<br/>注意如果任何安卓一遍打不开多打开几遍应该就可以重新加载UEngine配置了<br/>打开UEngine应用列表打开系统已安装的应用列表安卓界面<br/><strong>提示:</strong> <br/><strong>※1、近期升级的 UEngine 安装时会自动把要安装的 apk 删除,如果这个 apk 文件非常重要请拷贝一个备份版并安装这个备份版</strong> <br/><strong>2、需要你有使用 root 权限的能力;</strong><br/><strong>3、需要安装 UEngine 才能使用;</strong><br/><strong>4、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;</strong><br/><strong>5、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁</strong> </p>
</blockquote>
<hr />
<h2 id='详细帮助'>详细帮助</h2>
<h3 id='如何安装自己的-apk'>如何安装自己的 Apk</h3>
<p><em>请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限</em></p>
<h4 id='方法一-1'>方法一</h4>
<ol start='' >
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
<li>点击浏览按钮找到想要安装的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
<li>点击安装按钮,输入密码
<img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-1-5.png" referrerpolicy="no-referrer"> </li>
</ol> <body onload="UpdateTime();">
<h4 id='方法二-1'>方法二</h4> <h1 id='uengine-运行器帮助'>UEngine 运行器帮助</h1>
<ol start='' > <hr />
<li>打开要安装的Apk所在目录右击=&gt;打开方式=&gt;安装或卸载 APKUEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer"> </li> <h2 id='帮助简述'>帮助简述</h2>
<li>点击安装按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li> <blockquote>
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-2-2.png" referrerpolicy="no-referrer"> </li> <p>安装APK点浏览按钮选中需要安装的APK然后点安装按钮<br/>卸载APK在卸载APK下面的输入框内输入需要卸载的APK包名点卸载按钮如果无法获取包名可以通过浏览APK文件程序自动获取包名进行卸载。<br/>保存APK图标在安装APK下面的输入框浏览或输入APK的路径然后点击“保存图标”按钮选择保存位置即可<br/>重置删除UEngine数据点击菜单栏的“UEngine”的“清空UEngine数据”输入密码重启即可<br/>注意如果任何安卓一遍打不开多打开几遍应该就可以重新加载UEngine配置了<br/>打开UEngine应用列表打开系统已安装的应用列表安卓界面<br/><strong>提示:</strong>
<br/><strong>※1、近期升级的 UEngine 安装时会自动把要安装的 apk 删除,如果这个 apk 文件非常重要请拷贝一个备份版并安装这个备份版</strong>
<br/><strong>2、需要你有使用 root 权限的能力;</strong><br/><strong>3、需要安装 UEngine 才能使用;</strong><br/><strong>4、提取 apk
图标的 apk 路径以“安装 apk”那栏为准;</strong><br/><strong>5、如果想要使用adb连接UEngine或其他手机请使用 1.2.0
以前的版本。如需连接UEngine请安装adb补丁</strong> </p>
</blockquote>
<hr />
<h2 id='详细帮助'>详细帮助</h2>
<h3 id='如何安装自己的-apk'>如何安装自己的 Apk</h3>
<p><em>请保证您已经把要安装的Apk下载到电脑本地并保证Apk完整且有权限</em></p>
<h4 id='方法一-1'>方法一</h4>
<ol start=''>
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
<li>点击浏览按钮找到想要安装的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
<li>点击安装按钮,输入密码<br>
<img src="1-1-3.png" referrerpolicy="no-referrer">
</li>
<li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-1-5.png"
referrerpolicy="no-referrer"> </li>
</ol> </ol>
<h3 id='卸载apk'>卸载Apk</h3> <h4 id='方法二-1'>方法二</h4>
<h4 id='方法一-2'>方法一</h4> <ol start=''>
<ol start='' > <li>打开要安装的Apk所在目录右击=&gt;打开方式=&gt;安装或卸载 APKUEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer">
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li> </li>
<li>点击浏览按钮找到想要卸载的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li> <li>点击安装按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li> <li>提示“操作完成”,在启动器找到新安装的图标启动即可<br/><img src="1-1-4.png" referrerpolicy="no-referrer"><br/><img src="1-2-2.png"
<li>提示“操作完成”,卸载完成 <br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li> referrerpolicy="no-referrer"> </li>
</ol> </ol>
<h4 id='方法二-2'>方法二</h4> <h3 id='卸载apk'>卸载Apk</h3>
<ol start='' > <h4 id='方法一-2'>方法一</h4>
<li>打开要安装的Apk所在目录右击=&gt;打开方式=&gt;安装或卸载 APKUEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer"> </li> <ol start=''>
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li> <li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
<li>提示“操作完成”,卸载完成<br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li> <li>点击浏览按钮找到想要卸载的Apk<br/><img src="1-1-2.png" referrerpolicy="no-referrer"> </li>
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
<li>提示“操作完成”,卸载完成 <br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li>
</ol> </ol>
<h3 id='查询apk信息'>查询Apk信息</h3> <h4 id='方法二-2'>方法二</h4>
<ol start='' > <ol start=''>
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li> <li>打开要安装的Apk所在目录右击=&gt;打开方式=&gt;安装或卸载 APKUEngine 运行器)<br/><img src="1-2-1.png" referrerpolicy="no-referrer">
<li>点击“Apk 信息” 按钮即可查询Apk信息</li> </li>
<li>点击卸载按钮,输入密码<br/><img src="1-1-3.png" referrerpolicy="no-referrer"> </li>
<li>提示“操作完成”,卸载完成<br/><img src="1-1-4.png" referrerpolicy="no-referrer"> </li>
</ol> </ol>
<p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p> <h3 id='查询apk信息'>查询Apk信息</h3>
<h3 id='查看程序评分'>查看程序评分</h3> <ol start=''>
<ol start='' > <li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li> <li>点击“Apk 信息” 按钮即可查询Apk信息</li>
<li>点击“Apk 信息” 按钮即可查询Apk信息
<img src="1-3-1.png" referrerpolicy="no-referrer"></li>
<li>点击“查看程序评分情况”即可查看其他用户对程序的评分</li>
</ol> </ol>
<p> <img src="1-4-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p>
<h3 id='上传用户评分'>上传用户评分</h3> <h3 id='查看程序评分'>查看程序评分</h3>
<ol start='' > <ol start=''>
<li>打开 UEngine 运行器 </li> <li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"> </li>
<li>点击“Apk 信息” 按钮即可查询Apk信息
<br>
<img src="1-3-1.png" referrerpolicy="no-referrer">
</li>
<li>点击“查看程序评分情况”即可查看其他用户对程序的评分</li>
</ol> </ol>
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"> </p> <p> <img src="1-4-1.png" referrerpolicy="no-referrer"></p>
<ol start='2' > <h3 id='上传用户评分'>上传用户评分</h3>
<li>点击“Apk 信息” 按钮即可查询Apk信息</li> <ol start=''>
<li>打开 UEngine 运行器 </li>
</ol> </ol>
<p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-1-1.png" referrerpolicy="no-referrer"> </p>
<ol start='3' > <ol start='2'>
<li>点击“上传程序评分情况”,按照要求进行评分</li> <li>点击“Apk 信息” 按钮即可查询Apk信息</li>
</ol> </ol>
<p> <img src="1-5-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-3-1.png" referrerpolicy="no-referrer"></p>
<ol start='4' > <ol start='3'>
<li>如果提示“提交成功!感谢您的提交”就代表评分成功</li> <li>点击“上传程序评分情况”,按照要求进行评分</li>
</ol> </ol>
<p> <img src="1-5-2.png" referrerpolicy="no-referrer"></p> <p> <img src="1-5-1.png" referrerpolicy="no-referrer"></p>
<h3 id='更新程序'>更新程序</h3> <ol start='4'>
<ol start='' > <li>如果提示“提交成功!感谢您的提交”就代表评分成功</li>
<li>打开 UEngine 运行器 </li>
</ol> </ol>
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-5-2.png" referrerpolicy="no-referrer"></p>
<ol start='2' > <h3 id='更新程序'>更新程序</h3>
<li>点击“关于”=&gt;“检查更新”,打开更新窗口</li> <ol start=''>
<li>打开 UEngine 运行器 </li>
</ol> </ol>
<p> <img src="1-6-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p>
<ol start='3' > <ol start='2'>
<li><strong>保证您的电脑没有运行其它Python应用以及本程序所有工作都已经完成</strong>再点击“更新更新过程中会关闭所有Python应用包括这个应用输入密码以进行更新</li> <li>点击“关于”=&gt;“检查更新”,打开更新窗口</li>
</ol> </ol>
<p> <img src="1-6-2.png" referrerpolicy="no-referrer"></p> <p> <img src="1-6-1.png" referrerpolicy="no-referrer"></p>
<ol start='4' > <ol start='3'>
<li>提示“更新完毕!”后重新启动 UEngine 运行器就更新完毕了</li> <li><strong>保证您的电脑没有运行其它Python应用以及本程序所有工作都已经完成</strong>再点击“更新更新过程中会关闭所有Python应用包括这个应用输入密码以进行更新</li>
</ol> </ol>
<p> <img src="1-6-3.png" referrerpolicy="no-referrer"></p> <p> <img src="1-6-2.png" referrerpolicy="no-referrer"></p>
<h3 id='保存图标'>保存图标</h3> <ol start='4'>
<ol start='' > <li>提示“更新完毕!”后重新启动 UEngine 运行器就更新完毕了</li>
<li>打开 UEngine 运行器 </li>
</ol> </ol>
<p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-6-3.png" referrerpolicy="no-referrer"></p>
<ol start='2' > <h3 id='保存图标'>保存图标</h3>
<li>选择要保存图标的Apk点击“保存图标”按钮选择要保存的位置即可</li> <ol start=''>
<li>打开 UEngine 运行器 </li>
</ol> </ol>
<p> <img src="1-7-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-1-1.png" referrerpolicy="no-referrer"></p>
<h3 id='打开已安装的程序列表'>打开已安装的程序列表</h3> <ol start='2'>
<h4 id='方法一-3'>方法一</h4> <li>选择要保存图标的Apk点击“保存图标”按钮选择要保存的位置即可</li>
<p>打开启动器=&gt;UEngine 程序菜单 即可</p>
<h4 id='方法二-3'>方法二</h4>
<ol start='' >
<li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"></li>
<li>点击“打开 UEngine 应用列表”即可</li>
</ol> </ol>
<p> <img src="1-8-1.png" referrerpolicy="no-referrer"></p> <p> <img src="1-7-1.png" referrerpolicy="no-referrer"></p>
<h3 id='将-apk-打包成可以无需本应用即可安装的-deb-包'>将 Apk 打包成可以无需本应用即可安装的 deb 包</h3> <h3 id='打开已安装的程序列表'>打开已安装的程序列表</h3>
<h4 id='打开-uengine-打包器的三种方法'>打开 UEngine 打包器的三种方法</h4> <h4 id='方法一-3'>方法一</h4>
<h5 id='方法一-4'>方法一</h5> <p>打开启动器=&gt;UEngine 程序菜单 即可</p>
<p>启动器=&gt;UEngine 应用打包器</p> <h4 id='方法二-3'>方法二</h4>
<h5 id='方法二-4'>方法二</h5> <ol start=''>
<p>打开要打包的 Apk 所在目录,右击=&gt;“打开方式”=&gt;“打包 debUEngine 运行器)”(接下来可以略过步骤一)</p> <li>打开 UEngine 运行器 <br/><img src="1-1-1.png" referrerpolicy="no-referrer"></li>
<p><img src="1-9-1.png" referrerpolicy="no-referrer"></p> <li>点击“打开 UEngine 应用列表”即可</li>
<h5 id='方式三'>方式三</h5>
<p>打开 UEngine 运行器点击菜单栏的“UEngine”=&gt;“UEngine 应用打包”</p>
<p><img src="1-9-2.png" referrerpolicy="no-referrer"></p>
<h4 id='打包-deb'>打包 deb</h4>
<ol start='' >
<li>打开“UEngine Apk 应用打包器”点击“浏览按钮”选择apk</li>
</ol> </ol>
<p> <img src="1-9-3.png" referrerpolicy="no-referrer"></p> <p> <img src="1-8-1.png" referrerpolicy="no-referrer"></p>
<ol start='2' > <h3 id='将-apk-打包成可以无需本应用即可安装的-deb-包'>将 Apk 打包成可以无需本应用即可安装的 deb 包</h3>
<li>根据实际情况勾选选项,然后点击“打包”进行打包</li> <h4 id='打开-uengine-打包器的三种方法'>打开 UEngine 打包器的三种方法</h4>
<h5 id='方法一-4'>方法一</h5>
<p>启动器=&gt;UEngine 应用打包器</p>
<h5 id='方法二-4'>方法二</h5>
<p>打开要打包的 Apk 所在目录,右击=&gt;“打开方式”=&gt;“打包 debUEngine 运行器)”(接下来可以略过步骤一)</p>
<p><img src="1-9-1.png" referrerpolicy="no-referrer"></p>
<h5 id='方式三'>方式三</h5>
<p>打开 UEngine 运行器点击菜单栏的“UEngine”=&gt;“UEngine 应用打包”</p>
<p><img src="1-9-2.png" referrerpolicy="no-referrer"></p>
<h4 id='打包-deb'>打包 deb</h4>
<ol start=''>
<li>打开“UEngine Apk 应用打包器”点击“浏览按钮”选择apk</li>
</ol> </ol>
<p> <img src="1-9-4.png" referrerpolicy="no-referrer"></p> <p> <img src="1-9-3.png" referrerpolicy="no-referrer"></p>
<ol start='3' > <ol start='2'>
<li>当提示“打包完成”时,打包完成,可以在桌面(一般是<code>/home/XXX/Desktop</code>)找到您打包的 deb 包,可以双击安装</li> <li>根据实际情况勾选选项,然后点击“打包”进行打包</li>
</ol> </ol>
<p> <img src="1-9-5.png" referrerpolicy="no-referrer"></p> <p> <img src="1-9-4.png" referrerpolicy="no-referrer"></p>
<p> <img src="1-9-6.png" referrerpolicy="no-referrer"></p> <ol start='3'>
<p> <img src="1-9-7.png" referrerpolicy="no-referrer"></p> <li>当提示“打包完成”时,打包完成,可以在桌面(一般是<code>/home/XXX/Desktop</code>)找到您打包的 deb 包,可以双击安装</li>
<p> </p>
<p> </p> </ol>
<p> </p> <p> <img src="1-9-5.png" referrerpolicy="no-referrer"></p>
<p> </p> <p> <img src="1-9-6.png" referrerpolicy="no-referrer"></p>
<p> </p> <p> <img src="1-9-7.png" referrerpolicy="no-referrer"></p>
<p> </p> <p> </p>
<p> </p> <p> </p>
<p> </p> <p> </p>
<p> ©2021-2022</p> <p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<script>
function UpdateTime() {
var d = new Date();
document.getElementById("time").innerHTML = "©2021~" + d.getFullYear() + " gfdgd xi、为什么您不喜欢熊出没和阿布呢";
}
</script>
<hr>
<h1 id="time"> ©2021-2022</h1>
</body> </body>
</html> </html>

View File

@ -160,6 +160,7 @@
"button2": "浏览", "button2": "浏览",
"button3": " 打包", "button3": " 打包",
"check": "使用前缀“uengine-dc”", "check": "使用前缀“uengine-dc”",
"size": "从 UEngine 导入程序大小设置(如果有设置)",
"Menu": [ "Menu": [
{ {
"Name": "程序", "Name": "程序",
@ -330,6 +331,7 @@
"button2": "Find", "button2": "Find",
"button3": " Build", "button3": " Build",
"check": "Use Prefix With \"uengine-dc\"", "check": "Use Prefix With \"uengine-dc\"",
"size": "Add Android Program Size Setting From UEngine (If you're setting)",
"Menu": [ "Menu": [
{ {
"Name": "Program", "Name": "Program",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

View File

@ -2,9 +2,10 @@
"Package": "com.gitee.uengine.runner.spark", "Package": "com.gitee.uengine.runner.spark",
"Url": [ "Url": [
"https://gitee.com/gfdgd-xi/uengine-runner", "https://gitee.com/gfdgd-xi/uengine-runner",
"https://github.com/gfdgd-xi/uengine-runner" "https://github.com/gfdgd-xi/uengine-runner",
"https://gitlink.org.cn/gfdgd_xi/uengine-runner"
], ],
"Version": "1.8.0", "Version": "1.8.1",
"System": "Linuxdeepin/UOS", "System": "Linuxdeepin/UOS",
"Tips": [ "Tips": [
"更多可见https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助", "更多可见https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
@ -22,6 +23,13 @@
"5、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁" "5、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁"
], ],
"Update": [ "Update": [
"<b>V1.8.1</b>",
"※1、修复在 APK 详细信息中图标可能过大导致无法正常使用的问题",
"※2、修复 APK 路径带空格无法正常安装的问题",
"3、修复打包器打包的 APK 带下划线“_”无法正常打包的问题",
"4、修复打包器下方命令返回过多空白行的问题",
"5、修复程序生成的默认图标任然是旧版图标的问题",
"",
"<b>V1.8.0</b>", "<b>V1.8.0</b>",
"※1、程序界面大部分由 Tkinter 转 PyQt5", "※1、程序界面大部分由 Tkinter 转 PyQt5",
"※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root", "※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root",
@ -166,7 +174,7 @@
"Use": [ "Use": [
"1、UEngine相关软件包基于anbox开发", "1、UEngine相关软件包基于anbox开发",
"2、Python3", "2、Python3",
"3、tkintertkinter.tk、ttkthemes、tkinter.messagebox、tkinter.simpledialog、tkinter.filedialog 和 tkinter.ttk", "3、PyQt5",
"4、aapt", "4、aapt",
"5、dpkg", "5、dpkg",
"6、tree", "6、tree",
@ -177,7 +185,7 @@
"11、deepin 终端", "11、deepin 终端",
"……" "……"
], ],
"Time": "2021年08月30日", "Time": "2022年08月29日",
"Contribute": [ "Contribute": [
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>", "<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
"<hr>", "<hr>",
@ -195,6 +203,7 @@
"感谢 通天灵宝https://bbs.deepin.org/user/137230、wuhaiou123https://bbs.chinauos.com/zh/user/309117 反馈的 图标生成错误导致无法生成 .desktop 文件的问题", "感谢 通天灵宝https://bbs.deepin.org/user/137230、wuhaiou123https://bbs.chinauos.com/zh/user/309117 反馈的 图标生成错误导致无法生成 .desktop 文件的问题",
"感谢 潜伏https://bbs.chinauos.com/zh/user/303339 反馈的右键支持安装/卸载的建议", "感谢 潜伏https://bbs.chinauos.com/zh/user/303339 反馈的右键支持安装/卸载的建议",
"感谢 z***g@gmx.dehttps://bbs.chinauos.com/zh/user/312017 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题", "感谢 z***g@gmx.dehttps://bbs.chinauos.com/zh/user/312017 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题",
"参考 忘记、过去https://bbs.deepin.org/user/154730 的帖子《如何更优雅地使用 pkexec》https://bbs.deepin.org/post/202966" "参考 忘记、过去https://bbs.deepin.org/user/154730 的帖子《如何更优雅地使用 pkexec》https://bbs.deepin.org/post/202966",
"感谢 U+解答组们 反馈的 1.8.0 带路径无法正常安装 APK 的问题"
] ]
} }

View File

@ -2,10 +2,10 @@
# 使用系统默认的 python3 运行 # 使用系统默认的 python3 运行
########################################################################################### ###########################################################################################
# 作者gfdgd xi # 作者gfdgd xi
# 版本1.7.0 # 版本1.8.1
# 更新时间2022年07月23 # 更新时间2022年08月01
# 感谢anbox、deepin 和 统信 # 感谢anbox、deepin 和 统信
# 基于 Python3 的 tkinter 构建 # 基于 Python3 的 PyQt5 构建
########################################################################################### ###########################################################################################
################# #################
# 引入所需的库 # 引入所需的库
@ -17,7 +17,6 @@ import shutil
import random import random
import zipfile import zipfile
import traceback import traceback
import threading
import subprocess import subprocess
import PyQt5.QtGui as QtGui import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore
@ -89,9 +88,9 @@ class BuildApkDeb(QtCore.QThread):
self.RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'") self.RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
apkPackageName = GetApkPackageName(apkPath, False) apkPackageName = GetApkPackageName(apkPath, False)
if check.isChecked(): if check.isChecked():
apkPackageNameNew = GetApkPackageName(apkPath, True).lower() apkPackageNameNew = GetApkPackageName(apkPath, True).lower().replace("_", "-")
else: else:
apkPackageNameNew = GetApkPackageName(apkPath, False).lower() apkPackageNameNew = GetApkPackageName(apkPath, False).lower().replace("_", "-")
apkPackageVersion = GetApkVersion(apkPath) apkPackageVersion = GetApkVersion(apkPath)
if apkPackageVersion[0].upper() == "V": if apkPackageVersion[0].upper() == "V":
package = list(apkPackageVersion) package = list(apkPackageVersion)
@ -99,6 +98,9 @@ class BuildApkDeb(QtCore.QThread):
apkPackageVersion = "".join(package) apkPackageVersion = "".join(package)
apkChineseLabel = GetApkChineseLabel(apkPath) apkChineseLabel = GetApkChineseLabel(apkPath)
apkActivityName = GetApkActivityName(apkPath) apkActivityName = GetApkActivityName(apkPath)
if sizes.isChecked() and os.path.exists(f"/usr/share/uengine/appetc/{apkPackageName}.txt"):
os.makedirs(f"{tempPath}/usr/share/uengine/appetc")
shutil.copy(f"/usr/share/uengine/appetc/{apkPackageName}.txt", f"{tempPath}/usr/share/uengine/appetc/{apkPackageName}.txt")
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageNameNew) iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageNameNew)
debControl = '''Package: {} debControl = '''Package: {}
Version: {} Version: {}
@ -373,7 +375,9 @@ def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
def TextboxAddText1(message): def TextboxAddText1(message):
global textbox1 global textbox1
textbox1.append(message) if message.replace(" ", "").replace("\n", "") == "":
return
textbox1.append(message.replace("\n", ""))
# 获取用户桌面目录 # 获取用户桌面目录
def get_desktop_path(): def get_desktop_path():
@ -442,6 +446,7 @@ button3 = QtWidgets.QPushButton(langFile[lang]["Uengine Apk Builder"]["button3"]
textbox1 = QtWidgets.QTextBrowser() textbox1 = QtWidgets.QTextBrowser()
frame2 = QtWidgets.QHBoxLayout() frame2 = QtWidgets.QHBoxLayout()
check = QtWidgets.QCheckBox(langFile[lang]["Uengine Apk Builder"]["check"]) check = QtWidgets.QCheckBox(langFile[lang]["Uengine Apk Builder"]["check"])
sizes = QtWidgets.QCheckBox(langFile[lang]["Uengine Apk Builder"]["size"])
label1.setSizePolicy(size) label1.setSizePolicy(size)
button2.setSizePolicy(size) button2.setSizePolicy(size)
check.setSizePolicy(size) check.setSizePolicy(size)
@ -454,7 +459,7 @@ button3.clicked.connect(BuildDeb)
widgetLayout.addWidget(label1, 0, 0, 1, 1) widgetLayout.addWidget(label1, 0, 0, 1, 1)
widgetLayout.addWidget(combobox1, 0, 1, 1, 1) widgetLayout.addWidget(combobox1, 0, 1, 1, 1)
widgetLayout.addWidget(button2, 0, 2, 1, 1) widgetLayout.addWidget(button2, 0, 2, 1, 1)
widgetLayout.addLayout(frame2, 1, 0, 1, 3) widgetLayout.addLayout(frame2, 1, 1, 1, 1)
widgetLayout.addWidget(textbox1, 2, 0, 1, 3) widgetLayout.addWidget(textbox1, 2, 0, 1, 3)
# 菜单栏 # 菜单栏
menu = window.menuBar() menu = window.menuBar()
@ -464,6 +469,7 @@ exitProgram.triggered.connect(window.close)
programmenu.addAction(exitProgram) programmenu.addAction(exitProgram)
# #
frame2.addWidget(check) frame2.addWidget(check)
frame2.addWidget(sizes)
frame2.addWidget(button3) frame2.addWidget(button3)
widget.setLayout(widgetLayout) widget.setLayout(widgetLayout)
window.setWindowTitle(title) window.setWindowTitle(title)
@ -472,55 +478,3 @@ window.setWindowIcon(QtGui.QIcon(iconPath))
window.resize(window.frameSize().width() * 1.3, window.frameSize().height() * 1.1) window.resize(window.frameSize().width() * 1.3, window.frameSize().height() * 1.1)
window.show() window.show()
sys.exit(app.exec_()) sys.exit(app.exec_())
# 读取主题
try:
theme = not ("dark" in readtxt(get_home() + "/.gtkrc-2.0") and "gtk-theme-name=" in readtxt(get_home() + "/.gtkrc-2.0"))
except:
print("主题读取错误,默认使用浅色主题")
theme = True
if theme:
win = tk.Tk()
themes = ttkthemes.ThemedStyle(win)
themes.set_theme("breeze")
else:
import ttkbootstrap
style = ttkbootstrap.Style(theme="darkly")
win = style.master # 创建窗口
qianZhui = tk.BooleanVar()
window = ttk.Frame(win)
frame2 = ttk.Frame(window)
label1 = ttk.Label(window, text=langFile[lang]["Uengine Apk Builder"]["label1"])
combobox1 = ttk.Combobox(window, width=100)
button2 = ttk.Button(window, text=langFile[lang]["Uengine Apk Builder"]["button2"], command=FindApk)
button3 = ttk.Button(frame2, text=langFile[lang]["Uengine Apk Builder"]["button3"], command=BuildDeb)
check = ttk.Checkbutton(frame2, variable=qianZhui,text=langFile[lang]["Uengine Apk Builder"]["check"])
textbox1 = tk.Text(window, width=100)
menu = tk.Menu(window, background="white") # 设置菜单栏
programmenu = tk.Menu(menu, tearoff=0, background="white") # 设置“程序”菜单栏
menu.add_cascade(label=langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Name"], menu=programmenu)
programmenu.add_command(label=langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Menu"][0], command=window.quit) # 设置“退出程序”项
# 设置控件
combobox1['value'] = findApkHistory
textbox1.configure(state=tk.DISABLED)
textbox1.config(foreground='white', background='black')
# 如果有参数
if len(sys.argv) > 1:
combobox1.set(sys.argv[1])
# 设置窗口
win.title(title)
win.resizable(0, 0)
win.iconphoto(False, tk.PhotoImage(file=iconPath))
#
win.config(menu=menu) # 显示菜单栏
label1.grid(row=2, column=0)
combobox1.grid(row=2, column=1)
button2.grid(row=2, column=2)
button3.grid(row=0, column=1)
check.grid(row=0, column=0)
frame2.grid(row=3, columnspa=3)
textbox1.grid(row=4, columnspa=3)
window.pack()
win.mainloop()

View File

@ -25,13 +25,11 @@ import traceback
import threading import threading
import webbrowser import webbrowser
import subprocess import subprocess
try: map = True
import matplotlib import matplotlib
import matplotlib.figure import matplotlib.figure
import matplotlib.pylab import matplotlib.pylab
import matplotlib.font_manager import matplotlib.font_manager
except:
pass
import urllib.parse as parse import urllib.parse as parse
import PyQt5.QtGui as QtGui import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore import PyQt5.QtCore as QtCore
@ -138,6 +136,7 @@ class InstallApk(QtCore.QThread):
def run(self): def run(self):
path = self.path path = self.path
quit = self.quit quit = self.quit
# 将会强制改为拷贝安装安装拷贝后的APK
try: try:
if not os.path.exists("/tmp/uengine-runner"): if not os.path.exists("/tmp/uengine-runner"):
os.makedirs("/tmp/uengine-runner") os.makedirs("/tmp/uengine-runner")
@ -158,20 +157,19 @@ class InstallApk(QtCore.QThread):
os.makedirs(iconSaveDir,exist_ok=True) os.makedirs(iconSaveDir,exist_ok=True)
SaveApkIcon(path, iconSavePath) SaveApkIcon(path, iconSavePath)
try: try:
if setting["SaveApk"]:
shutil.copy(path, "/tmp/uengine-runner/bak.apk") shutil.copy(path, "/tmp/uengine-runner/bak.apk")
except: except:
if QtWidgets.QMessageBox.critical(widget, "错误", "无法备份安装包,是否不备份安装包继续安装?\n提示新版UEngine安装后会自动删除安装包") == QtWidgets.QMessageBox.No: QtWidgets.QMessageBox.critical(widget, "错误", "无法备份安装包,无法继续安装!")
DisabledAndEnbled(False) DisabledAndEnbled(False)
return return
setting["SaveApk"] = False print(f"uengine install --apk='/tmp/uengine-runner/bak.apk'")
print("start install apk2") commandReturn = os.system(f"uengine install --apk='/tmp/uengine-runner/bak.apk'")
commandReturn = os.system("uengine install --apk='{}'".format(path)) # 因为安装的是备份包,所以不需要再拷贝回去了(应该也没了)
try: #try:
if setting["SaveApk"]: # if setting["SaveApk"]:
shutil.copy("/tmp/uengine-runner/bak.apk", path) # shutil.copy("/tmp/uengine-runner/bak.apk", path)
except: #except:
self.error.emit(langFile[lang]["Main"]["MainWindow"]["Error"]["BackApkError"]) # self.error.emit(langFile[lang]["Main"]["MainWindow"]["Error"]["BackApkError"])
if commandReturn != 0: if commandReturn != 0:
self.error.emit("疑似 APK 安装失败,请检查 UEngine 是否正常安装、运行以及 APK 文件是否正确、完整") self.error.emit("疑似 APK 安装失败,请检查 UEngine 是否正常安装、运行以及 APK 文件是否正确、完整")
DisabledAndEnbled(False) DisabledAndEnbled(False)
@ -493,11 +491,11 @@ def SaveApkIcon(apkFilePath, iconSavePath)->"保存 apk 文件的图标":
saveIconFile.write(iconData) saveIconFile.write(iconData)
return return
print("None Icon! Show defult icon") print("None Icon! Show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath) shutil.copy(programPath + "/defult.svg", iconSavePath)
except: except:
traceback.print_exc() traceback.print_exc()
print("Error, show defult icon") print("Error, show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath) shutil.copy(programPath + "/defult.svg", iconSavePath)
def saveicon(): def saveicon():
global temppath global temppath
@ -1005,8 +1003,8 @@ class SettingWindow():
cancalButton = QtWidgets.QPushButton("取消") cancalButton = QtWidgets.QPushButton("取消")
okButton = QtWidgets.QPushButton("保存") okButton = QtWidgets.QPushButton("保存")
settingLayout.addWidget(QtWidgets.QLabel("APK 安装模式:"), 0, 0, 1, 1) #settingLayout.addWidget(QtWidgets.QLabel("APK 安装模式:"), 0, 0, 1, 1)
settingLayout.addWidget(SettingWindow.saveApkOption, 0, 1, 1, 1) #settingLayout.addWidget(SettingWindow.saveApkOption, 0, 1, 1, 1)
settingLayout.addWidget(QtWidgets.QLabel("窗口大小策略:"), 1, 0, 1, 1) settingLayout.addWidget(QtWidgets.QLabel("窗口大小策略:"), 1, 0, 1, 1)
settingLayout.addWidget(SettingWindow.autoScreenConfig, 1, 1, 1, 1) settingLayout.addWidget(SettingWindow.autoScreenConfig, 1, 1, 1, 1)
settingLayout.addWidget(QtWidgets.QLabel("程序分类策略:"), 2, 0, 1, 1) settingLayout.addWidget(QtWidgets.QLabel("程序分类策略:"), 2, 0, 1, 1)
@ -1080,7 +1078,7 @@ class UpdateWindow():
cancel = QtWidgets.QPushButton("取消") cancel = QtWidgets.QPushButton("取消")
cancel.clicked.connect(UpdateWindow.update.close) cancel.clicked.connect(UpdateWindow.update.close)
try: try:
UpdateWindow.data = json.loads(requests.get("http://120.25.153.144/uengine-runner/update.json").text) UpdateWindow.data = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/update.json").text)
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本{UpdateWindow.data['Version']}\n更新内容") versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本{UpdateWindow.data['Version']}\n更新内容")
if UpdateWindow.data["Version"] == version: if UpdateWindow.data["Version"] == version:
updateText.setText("此为最新版本,无需更新") updateText.setText("此为最新版本,无需更新")
@ -1151,7 +1149,7 @@ class ApkInformation():
tab1Layout = QtWidgets.QGridLayout() tab1Layout = QtWidgets.QGridLayout()
SaveApkIcon(path, "/tmp/uengine-runner-android-app-icon.png") SaveApkIcon(path, "/tmp/uengine-runner-android-app-icon.png")
simpleInformation = QtWidgets.QLabel(f""" simpleInformation = QtWidgets.QLabel(f"""
<p align='center'><img src='/tmp/uengine-runner-android-app-icon.png'></p> <p align='center'><img width='256' src='/tmp/uengine-runner-android-app-icon.png'></p>
<p>包名:{GetApkPackageName(path)}</p> <p>包名:{GetApkPackageName(path)}</p>
<p>中文名:{GetApkChineseLabel(path)}</p> <p>中文名:{GetApkChineseLabel(path)}</p>
<p>Activity{GetApkActivityName(path)}</p> <p>Activity{GetApkActivityName(path)}</p>
@ -1159,6 +1157,7 @@ class ApkInformation():
seeFen = QtWidgets.QPushButton("查看程序评分情况") seeFen = QtWidgets.QPushButton("查看程序评分情况")
updFen = QtWidgets.QPushButton("上传程序评分情况") updFen = QtWidgets.QPushButton("上传程序评分情况")
seeFen.setEnabled(map)
seeFen.clicked.connect(ApkInformation.ShowMap) seeFen.clicked.connect(ApkInformation.ShowMap)
updFen.clicked.connect(ApkInformation.UpdateMark) updFen.clicked.connect(ApkInformation.UpdateMark)
tab1Layout.addWidget(simpleInformation, 0, 0, 1, 3) tab1Layout.addWidget(simpleInformation, 0, 0, 1, 3)
@ -1218,7 +1217,7 @@ class ApkInformation():
if choose == None or choose == 7: if choose == None or choose == 7:
return return
try: try:
QtWidgets.QMessageBox.critical(widget, "提示", requests.post("http://120.25.153.144/uengine-runner/app/check/add.php", {"Package": GetApkPackageName(path), "Type": choose}).text) QtWidgets.QMessageBox.information(widget, "提示", requests.post("https://304626p927.goho.co/uengine-runner/app/check/add.php", {"Package": GetApkPackageName(path), "Type": choose}).text)
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"]) QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ConnectServerStarError"])
@ -1230,7 +1229,7 @@ class ApkInformation():
QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"]) QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ApkFileError"])
return return
try: try:
data = json.loads(requests.get("http://120.25.153.144/uengine-runner/app/check/" + package +"/data.json").text) data = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/app/check/" + package +"/data.json").text)
print(data) print(data)
except: except:
QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!") QtWidgets.QMessageBox.information(widget, "提示", "此程序暂时没有评分,欢迎您贡献第一个评分!")
@ -1520,25 +1519,26 @@ if not os.path.exists(get_home() + "/.config/uengine-runner/SaveApkIcon.json"):
if not os.path.exists(get_home() + "/.config/uengine-runner/SaveApk.json"): # 如果没有配置文件 if not os.path.exists(get_home() + "/.config/uengine-runner/SaveApk.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/SaveApk.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件 write_txt(get_home() + "/.config/uengine-runner/SaveApk.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/setting.json"): if not os.path.exists(get_home() + "/.config/uengine-runner/setting.json"):
choosemsg = QtWidgets.QMessageBox() write_txt(get_home() + "/.config/uengine-runner/setting.json", json.dumps({"SaveApk": int(1)}))
choosemsg.setText("""在使用本程序前请选择安装Apk包的设置以便更好的运行下列选项的详细介绍 # choosemsg = QtWidgets.QMessageBox()
# choosemsg.setText("""在使用本程序前请选择安装Apk包的设置以便更好的运行下列选项的详细介绍
不备份Apk包直接安装适用于Deepin旧版UEngine安装较快不受/tmp大小所限但Deepin23和UOS新版UEngine不推荐此选项因为安装后会自动删除Apk安装包 #
备份Apk包然后在安装后自动拷贝原先目录适用于Deepin23和UOS新版UEngine安装较慢受/tmp大小所限安装后不会丢失ApkDeepin旧版UEngine不推荐使用该选项 #不备份Apk包直接安装适用于Deepin旧版UEngine安装较快不受/tmp大小所限但Deepin23和UOS新版UEngine不推荐此选项因为安装后会自动删除Apk安装包
#备份Apk包然后在安装后自动拷贝原先目录适用于Deepin23和UOS新版UEngine安装较慢受/tmp大小所限安装后不会丢失ApkDeepin旧版UEngine不推荐使用该选项
#
后期可以在程序主界面的菜单栏的“程序”=>“设置”里进行修改, #
如果不知道正在使用的系统是什么版本可以打开系统设置查看。 #后期可以在程序主界面的菜单栏的“程序”=>“设置”里进行修改,
""") #如果不知道正在使用的系统是什么版本可以打开系统设置查看。
choosemsg.setWindowTitle("设置") #""")
choose = None # choosemsg.setWindowTitle("设置")
choosemsg.addButton("不备份Apk包直接安装", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: BackAPK(0)) # choose = None
choosemsg.addButton("备份Apk包然后在安装后自动拷贝原先目录", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: BackAPK(1)) # choosemsg.addButton("不备份Apk包直接安装", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: BackAPK(0))
choosemsg.exec_() # choosemsg.addButton("备份Apk包然后在安装后自动拷贝原先目录", QtWidgets.QMessageBox.ActionRole).clicked.connect(lambda: BackAPK(1))
if choose == None: # choosemsg.exec_()
QtWidgets.QMessageBox.information(None, "提示", "必须选择一个选项!否则无法进入程序!") # if choose == None:
sys.exit() # QtWidgets.QMessageBox.information(None, "提示", "必须选择一个选项!否则无法进入程序!")
write_txt(get_home() + "/.config/uengine-runner/setting.json", json.dumps({"SaveApk": int(choose)})) # sys.exit()
# write_txt(get_home() + "/.config/uengine-runner/setting.json", json.dumps({"SaveApk": int(choose)}))
defultProgramList = { defultProgramList = {
"SaveApk": 1, "SaveApk": 1,
"AutoScreenConfig": False, "AutoScreenConfig": False,
@ -1569,7 +1569,7 @@ findApkNameHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runn
findApkActivityHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json")).values()) findApkActivityHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json")).values())
try: try:
threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3VlbmdpbmUtcnVubmVyL29wZW4vSW5zdGFsbC5waHA=").decode("utf-8")) + "?Version=" + version]).start() threading.Thread(target=requests.get, args=[parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vdWVuZ2luZS1ydW5uZXIvb3Blbi9JbnN0YWxsLnBocA==").decode("utf-8")) + "?Version=" + version]).start()
except: except:
pass pass
# add sub window # add sub window
@ -1577,10 +1577,10 @@ except:
windowflag = "close" windowflag = "close"
def Egg(): def Egg():
try: try:
lists = json.loads(requests.get("http://120.25.153.144/uengine-runner/VersionList.json").text) lists = json.loads(requests.get("https://304626p927.goho.co/uengine-runner/VersionList.json").text)
data = [] data = []
for i in lists: for i in lists:
data.append(int(requests.get("http://120.25.153.144/uengine-runner/{}/data.txt".format(i)).text)) data.append(int(requests.get("https://304626p927.goho.co/uengine-runner/{}/data.txt".format(i)).text))
except: except:
QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!") QtWidgets.QMessageBox.critical(widget, "错误", "服务器出错!数据获取失败!")
return return
@ -1643,7 +1643,7 @@ def showhelp():
helpWidget.setLayout(helpLayout) helpWidget.setLayout(helpLayout)
helpWindow.setCentralWidget(helpWidget) helpWindow.setCentralWidget(helpWidget)
helpWindow.setFixedSize(helpWindow.frameSize().width() * 0.9, helpWindow.frameSize().height() * 1.5) helpWindow.setFixedSize(int(helpWindow.frameSize().width() * 0.9), int(helpWindow.frameSize().height() * 1.5))
helpWindow.setWindowTitle("帮助") helpWindow.setWindowTitle("帮助")
helpWindow.setWindowIcon(QtGui.QIcon(iconPath)) helpWindow.setWindowIcon(QtGui.QIcon(iconPath))
helpWindow.show() helpWindow.show()

View File

@ -27,7 +27,7 @@ def Update(name, stars, contact, things, version):
"Version": version "Version": version
} }
try: try:
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text) QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text)
print(data) print(data)
except: except:
traceback.print_exc() traceback.print_exc()

View File

@ -27,7 +27,7 @@ def Update(name, stars, contact, things, version):
"Version": version "Version": version
} }
try: try:
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text) QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cHM6Ly8zMDQ2MjZwOTI3LmdvaG8uY28vdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text)
print(data) print(data)
except: except:
traceback.print_exc() traceback.print_exc()