Compare commits
9 Commits
1.6.2-ubun
...
1.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
| ae6c233239 | |||
| 6bf4202cc2 | |||
| 88ca313779 | |||
| 27c39d96a9 | |||
| b34877538a | |||
| eb44817201 | |||
| 7f18273cca | |||
| d3970b8b28 | |||
| 293b382e9b |
2
.idea/misc.xml
generated
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (uengine-runner)" project-jdk-type="Python SDK" />
|
||||||
</project>
|
</project>
|
||||||
@@ -37,7 +37,8 @@
|
|||||||
"你确定要启用 UEngine 可以安装以及使用默认的更新程序升级应用?(即允许未知来源)",
|
"你确定要启用 UEngine 可以安装以及使用默认的更新程序升级应用?(即允许未知来源)",
|
||||||
"你确定要禁用 UEngine 可以安装以及使用默认的更新程序升级应用?(即禁止未知来源)"
|
"你确定要禁用 UEngine 可以安装以及使用默认的更新程序升级应用?(即禁止未知来源)"
|
||||||
],
|
],
|
||||||
"UseAdbPackageAnswer": "你没有安装 adb 补丁,必须安装才能继续。是否安装?"
|
"UseAdbPackageAnswer": "你没有安装 adb 补丁,必须安装才能继续。是否安装?",
|
||||||
|
"CompleteInformation": "设置完毕"
|
||||||
},
|
},
|
||||||
"Menu": [
|
"Menu": [
|
||||||
{
|
{
|
||||||
@@ -133,8 +134,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"在 Ubuntu 上安装 UEngine",
|
"在 Ubuntu 上安装 UEngine",
|
||||||
"启动/禁用UEngine安装的安卓程序程序更新",
|
"启动/禁用UEngine安装的安卓程序程序更新(需要安装 adb 补丁)",
|
||||||
"在 Ubuntu 上安装 UEngine"
|
"在 Ubuntu 上安装 UEngine",
|
||||||
|
"设置 UEngine 代理(需要安装 adb 补丁)",
|
||||||
|
"设置 UEngine 指定应用窗口大小"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -144,7 +147,8 @@
|
|||||||
"关于",
|
"关于",
|
||||||
"反馈程序问题和建议",
|
"反馈程序问题和建议",
|
||||||
"检查更新",
|
"检查更新",
|
||||||
"更多帮助"
|
"更多帮助",
|
||||||
|
"关于 Qt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -203,7 +207,8 @@
|
|||||||
"Are you sure to allow UEngine to install or update other android program? (Allow )(即允许未知来源)",
|
"Are you sure to allow UEngine to install or update other android program? (Allow )(即允许未知来源)",
|
||||||
"Are you sure to disallow UEngine to install or update other android program? (Allow )(即允许未知来源)"
|
"Are you sure to disallow UEngine to install or update other android program? (Allow )(即允许未知来源)"
|
||||||
],
|
],
|
||||||
"UseAdbPackageAnswer": "You don't install adb package with UEngine, you must install, and after install you can connect to set.\nDo you want to install?"
|
"UseAdbPackageAnswer": "You don't install adb package with UEngine, you must install, and after install you can connect to set.\nDo you want to install?",
|
||||||
|
"CompleteInformation": "Set Completed"
|
||||||
},
|
},
|
||||||
"Menu": [
|
"Menu": [
|
||||||
{
|
{
|
||||||
@@ -299,8 +304,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Install UEngine On Ubuntu",
|
"Install UEngine On Ubuntu",
|
||||||
"Allow/Disallow UEngine To Install Or Update Other Android Program",
|
"Allow/Disallow UEngine To Install Or Update Other Android Program (Need Install Adb Patch)",
|
||||||
"Install UEngine On Ubuntu"
|
"Install UEngine On Ubuntu",
|
||||||
|
"Set UEngine Http Proxy (Need Install Adb Patch)",
|
||||||
|
"Set UEngine Some Android Windows Size"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -310,7 +317,8 @@
|
|||||||
"About This Program",
|
"About This Program",
|
||||||
"Upload Problem And Advice",
|
"Upload Problem And Advice",
|
||||||
"Update This Program",
|
"Update This Program",
|
||||||
"More Help"
|
"More Help",
|
||||||
|
"About Qt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
52
Makefile
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
build:
|
||||||
|
echo "Build DEB..."
|
||||||
|
cp -rv information.json new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv mainwindow.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner
|
||||||
|
cp -rv Language.json new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-window-size-setting.py new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-keyboard new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-apk-builder new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-useadb new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-runner-update-bug new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-runner-applist-launch.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv launch.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-installer new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv LICENSE new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-runner-launch.sh new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-runner-about new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-clean new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv uengine-app-uninstall 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_logo.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 menu.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv icon.png new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv getxmlimg.py 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 builer.svg new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv api new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv Help new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/
|
||||||
|
cp -rv pkexec/* new-deb-build/usr/share/polkit-1/actions
|
||||||
|
dpkg -b new-deb-build com.gitee.uengine.runner.spark.deb
|
||||||
|
|
||||||
|
install:
|
||||||
|
make build
|
||||||
|
echo "Install..."
|
||||||
|
sudo apt update
|
||||||
|
sudo dpkg -i com.gitee.uengine.runner.spark.deb
|
||||||
|
sudo apt install -f
|
||||||
|
|
||||||
|
depend:
|
||||||
|
sudo apt install python3 python3-tk python3-pip aapt \
|
||||||
|
python3-setuptools deepin-terminal curl python3-pil\
|
||||||
|
python3-requests adb fonts-noto-cjk python3-numpy\
|
||||||
|
python3-matplotlib wget inotify-tools aria2 python3-pyqt5
|
||||||
|
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
|
||||||
|
|
||||||
|
run:
|
||||||
|
python3 mainwindow.py
|
||||||
49
README.md
@@ -1,13 +1,14 @@
|
|||||||
# UEngine 运行器 1.6.1
|
# UEngine 运行器 1.8.0
|
||||||
|
|
||||||
### 介绍
|
### 介绍
|
||||||
新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
新版本Deepin/UOS发布后,可以在应用商店安装部分官方已适配的安卓应用,对爱好者来说,不能自己安装APK软件包始终差点意思,本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包,并能发送安装的APK包启动菜单到桌面或系统菜单。
|
||||||

|

|
||||||
(测试平台:UOS 家庭版 21.1,deepin 20.6,UOS 专业版 1040)
|
|
||||||
|
(测试平台:UOS 家庭版 21.3,deepin 20.6,UOS 专业版 1040)
|
||||||
|
|
||||||
## 安装前必读
|
## 安装前必读
|
||||||
+ **UEngine 安装时会自动把要安装的 apk 删除**,如果这个 apk 文件非常重要请**拷贝一个备份版并安装这个备份版或者在程序设置里面选择“备份APK包然后在安装后自动拷贝原先目录”选项**
|
+ **UEngine 安装时会自动把要安装的 apk 删除**,如果这个 apk 文件非常重要请**拷贝一个备份版并安装这个备份版或者在程序设置里面选择“备份APK包然后在安装后自动拷贝原先目录”选项**
|
||||||

|

|
||||||
|
|
||||||
## 如何升级至最新版本
|
## 如何升级至最新版本
|
||||||
### 一、使用星火应用商店更新到最新版本
|
### 一、使用星火应用商店更新到最新版本
|
||||||
@@ -34,6 +35,25 @@ sudo apt upgrade
|
|||||||
|
|
||||||
|
|
||||||
### 更新内容
|
### 更新内容
|
||||||
|
#### V1.8.0(2022年07月27日)
|
||||||
|
**※1、程序界面大部分由 Tkinter 转 PyQt5**
|
||||||
|
**※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)**
|
||||||
|
**※3、增加了安装/卸载失败后的提示**
|
||||||
|
**※4、补回谢明名单**
|
||||||
|
**※5、支持免密安装/卸载 APK**
|
||||||
|
6、pip 更换华为源,提升下载速度
|
||||||
|
7、新增主题功能
|
||||||
|
8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)
|
||||||
|

|
||||||
|
|
||||||
|
#### V1.7.0(2022年07月08日,暑假开始)
|
||||||
|
**※1、新增暗黑主题**
|
||||||
|
**※2、优化 deepin-terminal 在其它发行版显示奇奇怪怪的问题**
|
||||||
|
**※3、修复 UEngine 安装脚本在安装时不让用户选择,直接默认 N 无法安装的问题**
|
||||||
|
4、新增设置 UEngine 代理的功能
|
||||||
|
5、将执行命令和打包器的返回输出从命令结束后显示输出内容改为实时显示内容
|
||||||
|

|
||||||
|
|
||||||
#### V1.6.2(2022年06月21日,中考假期+即将期末考试)
|
#### V1.6.2(2022年06月21日,中考假期+即将期末考试)
|
||||||
**※1、优化了 UEngine 运行器的英语翻译**
|
**※1、优化了 UEngine 运行器的英语翻译**
|
||||||
**※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)**
|
**※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)**
|
||||||
@@ -211,16 +231,7 @@ FileNotFoundError: [Errno 2] No such file or directory: '/home/gfdgd_xi/.local/s
|
|||||||
1. 安装所需依赖
|
1. 安装所需依赖
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install python3 python3-tk python3-pip aapt uengine
|
sudo apt install make
|
||||||
sudo apt install python3-setuptools deepin-terminal curl python3-pil
|
|
||||||
sudo apt install python3-pil.imagetk python3-requests adb
|
|
||||||
sudo apt install translate-shell python3-xlib fonts-noto-cjk
|
|
||||||
sudo apt install python3-numpy python3-matplotlib wget inotify-tools aria2
|
|
||||||
python3 -m pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
python3 -m pip install --upgrade ttkthemes -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
python3 -m pip install --upgrade pyautogui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
python3 -m pip install --upgrade keyboard -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
python3 -m pip install --upgrade easygui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. 下载本程序
|
2. 下载本程序
|
||||||
@@ -232,10 +243,16 @@ git clone https://gitee.com/gfdgd-xi/uengine-runner.git
|
|||||||
3. 运行本程序
|
3. 运行本程序
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chmod 777 uengine-runner/main.py
|
cd uengine-runner
|
||||||
./uengine-runner/main.py
|
make run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
如果你想要安装到系统,只需要输入:
|
||||||
|
```bash
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
即可
|
||||||
|
|
||||||
### 使用说明
|
### 使用说明
|
||||||
1、需要你有使用 root 权限的能力;
|
1、需要你有使用 root 权限的能力;
|
||||||
2、需要安装 UEngine 才能使用,UOS建议在商店安装一个安卓应用,让系统自动安装 UEngine 及相关的依赖包;
|
2、需要安装 UEngine 才能使用,UOS建议在商店安装一个安卓应用,让系统自动安装 UEngine 及相关的依赖包;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -4,10 +4,10 @@
|
|||||||
"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"
|
||||||
],
|
],
|
||||||
"Version": "1.6.2",
|
"Version": "1.8.0",
|
||||||
"System": "Linux(deepin/UOS)",
|
"System": "Linux(deepin/UOS)",
|
||||||
"Tips": [
|
"Tips": [
|
||||||
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis",
|
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
|
||||||
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
||||||
"卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。",
|
"卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。",
|
||||||
"保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可",
|
"保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可",
|
||||||
@@ -22,6 +22,23 @@
|
|||||||
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
||||||
],
|
],
|
||||||
"Update": [
|
"Update": [
|
||||||
|
"<b>V1.8.0:</b>",
|
||||||
|
"※1、程序界面大部分由 Tkinter 转 PyQt5",
|
||||||
|
"※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)",
|
||||||
|
"※3、增加了安装/卸载失败后的提示",
|
||||||
|
"※4、补回谢明名单",
|
||||||
|
"※5、支持免密安装/卸载 APK",
|
||||||
|
"6、pip 更换华为源,提升下载速度",
|
||||||
|
"7、新增主题功能",
|
||||||
|
"8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)",
|
||||||
|
"",
|
||||||
|
"V1.7.0:",
|
||||||
|
"※1、新增暗黑主题",
|
||||||
|
"※2、优化 deepin-terminal 在其它发行版显示奇奇怪怪的问题",
|
||||||
|
"※3、修复 UEngine 安装脚本在安装时不让用户选择,直接默认 N 无法安装的问题",
|
||||||
|
"4、新增设置 UEngine 代理的功能",
|
||||||
|
"5、将执行命令和打包器的返回输出从命令结束后显示输出内容改为实时显示内容",
|
||||||
|
"",
|
||||||
"V1.6.2:",
|
"V1.6.2:",
|
||||||
"※1、优化了 UEngine 运行器的英语翻译",
|
"※1、优化了 UEngine 运行器的英语翻译",
|
||||||
"※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)",
|
"※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)",
|
||||||
@@ -29,6 +46,7 @@
|
|||||||
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
||||||
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
||||||
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
||||||
|
"",
|
||||||
"V1.6.1:",
|
"V1.6.1:",
|
||||||
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
||||||
"※2、提供新版本的 UEngine Root 镜像",
|
"※2、提供新版本的 UEngine Root 镜像",
|
||||||
@@ -37,6 +55,7 @@
|
|||||||
"5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)",
|
"5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)",
|
||||||
"6、提供了 UEngine 运行器的 API(可以从项目地址中获取)",
|
"6、提供了 UEngine 运行器的 API(可以从项目地址中获取)",
|
||||||
"7、补上遗漏的项目参与者“星空露光”,新加项目参与者“为什么您不喜欢熊出没和阿布呢”",
|
"7、补上遗漏的项目参与者“星空露光”,新加项目参与者“为什么您不喜欢熊出没和阿布呢”",
|
||||||
|
"",
|
||||||
"V1.6.0:",
|
"V1.6.0:",
|
||||||
"※1、更换了新的图标",
|
"※1、更换了新的图标",
|
||||||
"※2、支持程序的评分和查看分数详情的功能(如果炸了我的服务器,这个就作废了)",
|
"※2、支持程序的评分和查看分数详情的功能(如果炸了我的服务器,这个就作废了)",
|
||||||
@@ -160,11 +179,22 @@
|
|||||||
],
|
],
|
||||||
"Time": "2021年08月30日",
|
"Time": "2021年08月30日",
|
||||||
"Contribute": [
|
"Contribute": [
|
||||||
"gfdgd xi<3025613752@qq.com>",
|
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
|
||||||
"actionchen<917981399@qq.com>",
|
"<hr>",
|
||||||
"柚子<https://gitee.com/Limexb>",
|
"感谢 麻木法师(1312580754) 在星火应用商店QQ交流群展示的接口及其原理",
|
||||||
"为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>",
|
"感谢 actionchen(917981399@qq.com) 提供了新版页面布局(1.3.0 ~ 最新版本)以及布局代码(1.3.0 ~ 1.7.0)",
|
||||||
"星空露光<https://gitee.com/Cynorkyle>",
|
"感谢 柚子(https://gitee.com/Limexb) 提供了 UEngine 构建 Root 镜像脚本",
|
||||||
"shenmo<jifengshenmo@outlook.com>"
|
"感谢 星空露光(https://gitee.com/Cynorkyle) 制作了 UEngine 新版图标和安装应用时能选择应用分类的建议",
|
||||||
|
"感谢 shenmo(jifengshenmo@outlook.com) 反馈了许多程序的问题以及提供了 UEngine 在 Ubuntu 上的安装脚本",
|
||||||
|
"感谢 desert(https://gitee.com/desert741) 提供了给软件增加启动成功后自动调整分辨率的功能的建议",
|
||||||
|
"感谢 云思浮(https://gitee.com/foresee_io) 反馈的 1.3.0 依赖缺失问题",
|
||||||
|
"感谢 miaoys(https://bbs.deepin.org/user/271467)、zccrs(https://bbs.deepin.org/user/277780) 等用户反馈希望程序能和与系统 DTK 主题协调的建议",
|
||||||
|
"感谢 jiutian123(https://bbs.deepin.org/user/258825) 反馈的 1.5.2、1.5.3 存在问题",
|
||||||
|
"感谢 kero990(https://bbs.deepin.org/user/277932) 反馈的 README 表示不清的问题",
|
||||||
|
"感谢 wang(https://gitee.com/wang1279476881) 反馈的 1.6.0 左键打不开 “安装与卸载APK”和打包时 APK 版本号开头带 V 无法正常打包的问题",
|
||||||
|
"感谢 通天灵宝(https://bbs.deepin.org/user/137230)、wuhaiou123(https://bbs.chinauos.com/zh/user/309117) 反馈的 图标生成错误导致无法生成 .desktop 文件的问题",
|
||||||
|
"感谢 潜伏(https://bbs.chinauos.com/zh/user/303339) 反馈的右键支持安装/卸载的建议",
|
||||||
|
"感谢 z***g@gmx.de(https://bbs.chinauos.com/zh/user/312017) 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题",
|
||||||
|
"参考 忘记、过去(https://bbs.deepin.org/user/154730) 的帖子《如何更优雅地使用 pkexec》(https://bbs.deepin.org/post/202966)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
3
launch.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
XDG_CURRENT_DESKTOP="Deepin"
|
||||||
|
$1 -platformtheme deepin "$@"
|
||||||
1926
mainwindow.py
Executable file
@@ -1,18 +1,22 @@
|
|||||||
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
|
Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu
|
||||||
Version: 1.6.2
|
Version: 1.8.0
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Section: utils
|
Section: utils
|
||||||
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: deepin-elf-verify (>= 0.0.16.7-1), python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal, curl, python3-pil, python3-pil.imagetk, python3-requests, adb, translate-shell, python3-xlib, fonts-noto-cjk, python3-numpy, python3-matplotlib, wget, inotify-tools, aria2, uengine
|
Depends: python3, python3-tk, python3-pip, aapt, python3-setuptools, deepin-terminal, curl, python3-pil, python3-requests, adb, fonts-noto-cjk, python3-numpy, python3-matplotlib, wget, inotify-tools, aria2, python3-pyqt5
|
||||||
|
Recommends: uengine, deepin-elf-verify (>= 0.0.16.7-1)
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Conflicts: spark-uengine-apk-builder
|
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]
|
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.6.2 更新内容:
|
Description: UEngine 运行器,1.8.0 更新内容:
|
||||||
※1、优化了 UEngine 运行器的英语翻译
|
※1、程序界面大部分由 Tkinter 转 PyQt5
|
||||||
※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)
|
※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)
|
||||||
※3、新增加了 UEngine 的 Ubuntu 安装程序
|
※3、增加了安装/卸载失败后的提示
|
||||||
※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)
|
※4、补回谢明名单
|
||||||
5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题
|
※5、支持免密安装/卸载 APK
|
||||||
6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题
|
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>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# 使用 pip 安装所需库
|
# 使用 pip 安装所需库
|
||||||
python3 -m pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 easygui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
# 建立软链接
|
# 建立软链接
|
||||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
|
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
|
||||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder /usr/bin/uengine-apk-builder
|
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder /usr/bin/uengine-apk-builder
|
||||||
@@ -20,6 +19,6 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/root-uengine
|
|||||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh /usr/bin/uengine-runner-applist-launch.sh
|
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh /usr/bin/uengine-runner-applist-launch.sh
|
||||||
# 刷新图标缓存
|
# 刷新图标缓存
|
||||||
# 因为 Ubuntu 的问题,省略
|
# 因为 Ubuntu 的问题,省略
|
||||||
gtk-update-icon-cache /usr/share/icons/bloom | 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.6.2 -s > /dev/null | true
|
curl http://120.25.153.144/uengine-runner/Install.php?Version=1.8.0 -s > /dev/null | true
|
||||||
@@ -11,7 +11,9 @@ rm -fv /usr/bin/uengine-useadb
|
|||||||
rm -fv /usr/bin/uengine-runner-launch.sh
|
rm -fv /usr/bin/uengine-runner-launch.sh
|
||||||
rm -fv /usr/bin/uengine-runner-update-bug
|
rm -fv /usr/bin/uengine-runner-update-bug
|
||||||
rm -fv /usr/bin/uengine-root
|
rm -fv /usr/bin/uengine-root
|
||||||
rm -fv /opt/apps/com.gitee.uengine.runner.spark/files/
|
rm -frv /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__
|
||||||
|
rm -frv /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__
|
||||||
|
rm -fv /usr/bin/uengine-runner-applist-launch.sh
|
||||||
# 刷新图标缓存
|
# 刷新图标缓存
|
||||||
# 因为 Ubuntu 的问题,省略
|
# 因为 Ubuntu 的问题,省略
|
||||||
gtk-update-icon-cache /usr/share/icons/bloom | true
|
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
|
||||||
@@ -37,7 +37,8 @@
|
|||||||
"你确定要启用 UEngine 可以安装以及使用默认的更新程序升级应用?(即允许未知来源)",
|
"你确定要启用 UEngine 可以安装以及使用默认的更新程序升级应用?(即允许未知来源)",
|
||||||
"你确定要禁用 UEngine 可以安装以及使用默认的更新程序升级应用?(即禁止未知来源)"
|
"你确定要禁用 UEngine 可以安装以及使用默认的更新程序升级应用?(即禁止未知来源)"
|
||||||
],
|
],
|
||||||
"UseAdbPackageAnswer": "你没有安装 adb 补丁,必须安装才能继续。是否安装?"
|
"UseAdbPackageAnswer": "你没有安装 adb 补丁,必须安装才能继续。是否安装?",
|
||||||
|
"CompleteInformation": "设置完毕"
|
||||||
},
|
},
|
||||||
"Menu": [
|
"Menu": [
|
||||||
{
|
{
|
||||||
@@ -133,8 +134,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"在 Ubuntu 上安装 UEngine",
|
"在 Ubuntu 上安装 UEngine",
|
||||||
"启动/禁用UEngine安装的安卓程序程序更新",
|
"启动/禁用UEngine安装的安卓程序程序更新(需要安装 adb 补丁)",
|
||||||
"在 Ubuntu 上安装 UEngine"
|
"在 Ubuntu 上安装 UEngine",
|
||||||
|
"设置 UEngine 代理(需要安装 adb 补丁)",
|
||||||
|
"设置 UEngine 指定应用窗口大小"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -144,7 +147,8 @@
|
|||||||
"关于",
|
"关于",
|
||||||
"反馈程序问题和建议",
|
"反馈程序问题和建议",
|
||||||
"检查更新",
|
"检查更新",
|
||||||
"更多帮助"
|
"更多帮助",
|
||||||
|
"关于 Qt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -203,7 +207,8 @@
|
|||||||
"Are you sure to allow UEngine to install or update other android program? (Allow )(即允许未知来源)",
|
"Are you sure to allow UEngine to install or update other android program? (Allow )(即允许未知来源)",
|
||||||
"Are you sure to disallow UEngine to install or update other android program? (Allow )(即允许未知来源)"
|
"Are you sure to disallow UEngine to install or update other android program? (Allow )(即允许未知来源)"
|
||||||
],
|
],
|
||||||
"UseAdbPackageAnswer": "You don't install adb package with UEngine, you must install, and after install you can connect to set.\nDo you want to install?"
|
"UseAdbPackageAnswer": "You don't install adb package with UEngine, you must install, and after install you can connect to set.\nDo you want to install?",
|
||||||
|
"CompleteInformation": "Set Completed"
|
||||||
},
|
},
|
||||||
"Menu": [
|
"Menu": [
|
||||||
{
|
{
|
||||||
@@ -299,8 +304,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Install UEngine On Ubuntu",
|
"Install UEngine On Ubuntu",
|
||||||
"Allow/Disallow UEngine To Install Or Update Other Android Program",
|
"Allow/Disallow UEngine To Install Or Update Other Android Program (Need Install Adb Patch)",
|
||||||
"Install UEngine On Ubuntu"
|
"Install UEngine On Ubuntu",
|
||||||
|
"Set UEngine Http Proxy (Need Install Adb Patch)",
|
||||||
|
"Set UEngine Some Android Windows Size"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -310,7 +317,8 @@
|
|||||||
"About This Program",
|
"About This Program",
|
||||||
"Upload Problem And Advice",
|
"Upload Problem And Advice",
|
||||||
"Update This Program",
|
"Update This Program",
|
||||||
"More Help"
|
"More Help",
|
||||||
|
"About Qt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -362,11 +362,10 @@ class UengineRunner:
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print("本 API 不支持直接运行,请通过引入的方式使用此 API")
|
print("本 API 不支持直接运行,请通过引入的方式使用此 API")
|
||||||
#adb = Adb("192.168.250.2:5555")
|
adb = Adb("192.168.250.2:5555")
|
||||||
#print(adb.boolAndroidInstallOtherAppSetting())
|
print(adb.boolAndroidInstallOtherAppSetting())
|
||||||
|
|
||||||
#quit()
|
quit()
|
||||||
|
|
||||||
if not ROOT.GetRoot():
|
if not ROOT.GetRoot():
|
||||||
pass
|
print("请获取 ROOT 权限以便更好的使用该 API")
|
||||||
#print("请获取 ROOT 权限以便更好的使用该 API")
|
|
||||||
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 36 KiB |
@@ -4,10 +4,10 @@
|
|||||||
"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"
|
||||||
],
|
],
|
||||||
"Version": "1.6.2",
|
"Version": "1.8.0",
|
||||||
"System": "Linux(deepin/UOS)",
|
"System": "Linux(deepin/UOS)",
|
||||||
"Tips": [
|
"Tips": [
|
||||||
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis",
|
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
|
||||||
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
||||||
"卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。",
|
"卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。",
|
||||||
"保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可",
|
"保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可",
|
||||||
@@ -22,6 +22,23 @@
|
|||||||
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
||||||
],
|
],
|
||||||
"Update": [
|
"Update": [
|
||||||
|
"<b>V1.8.0:</b>",
|
||||||
|
"※1、程序界面大部分由 Tkinter 转 PyQt5",
|
||||||
|
"※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)",
|
||||||
|
"※3、增加了安装/卸载失败后的提示",
|
||||||
|
"※4、补回谢明名单",
|
||||||
|
"※5、支持免密安装/卸载 APK",
|
||||||
|
"6、pip 更换华为源,提升下载速度",
|
||||||
|
"7、新增主题功能",
|
||||||
|
"8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)",
|
||||||
|
"",
|
||||||
|
"V1.7.0:",
|
||||||
|
"※1、新增暗黑主题",
|
||||||
|
"※2、优化 deepin-terminal 在其它发行版显示奇奇怪怪的问题",
|
||||||
|
"※3、修复 UEngine 安装脚本在安装时不让用户选择,直接默认 N 无法安装的问题",
|
||||||
|
"4、新增设置 UEngine 代理的功能",
|
||||||
|
"5、将执行命令和打包器的返回输出从命令结束后显示输出内容改为实时显示内容",
|
||||||
|
"",
|
||||||
"V1.6.2:",
|
"V1.6.2:",
|
||||||
"※1、优化了 UEngine 运行器的英语翻译",
|
"※1、优化了 UEngine 运行器的英语翻译",
|
||||||
"※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)",
|
"※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)",
|
||||||
@@ -29,6 +46,7 @@
|
|||||||
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
||||||
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
||||||
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
||||||
|
"",
|
||||||
"V1.6.1:",
|
"V1.6.1:",
|
||||||
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
||||||
"※2、提供新版本的 UEngine Root 镜像",
|
"※2、提供新版本的 UEngine Root 镜像",
|
||||||
@@ -37,6 +55,7 @@
|
|||||||
"5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)",
|
"5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)",
|
||||||
"6、提供了 UEngine 运行器的 API(可以从项目地址中获取)",
|
"6、提供了 UEngine 运行器的 API(可以从项目地址中获取)",
|
||||||
"7、补上遗漏的项目参与者“星空露光”,新加项目参与者“为什么您不喜欢熊出没和阿布呢”",
|
"7、补上遗漏的项目参与者“星空露光”,新加项目参与者“为什么您不喜欢熊出没和阿布呢”",
|
||||||
|
"",
|
||||||
"V1.6.0:",
|
"V1.6.0:",
|
||||||
"※1、更换了新的图标",
|
"※1、更换了新的图标",
|
||||||
"※2、支持程序的评分和查看分数详情的功能(如果炸了我的服务器,这个就作废了)",
|
"※2、支持程序的评分和查看分数详情的功能(如果炸了我的服务器,这个就作废了)",
|
||||||
@@ -160,11 +179,22 @@
|
|||||||
],
|
],
|
||||||
"Time": "2021年08月30日",
|
"Time": "2021年08月30日",
|
||||||
"Contribute": [
|
"Contribute": [
|
||||||
"gfdgd xi<3025613752@qq.com>",
|
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
|
||||||
"actionchen<917981399@qq.com>",
|
"<hr>",
|
||||||
"柚子<https://gitee.com/Limexb>",
|
"感谢 麻木法师(1312580754) 在星火应用商店QQ交流群展示的接口及其原理",
|
||||||
"为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>",
|
"感谢 actionchen(917981399@qq.com) 提供了新版页面布局(1.3.0 ~ 最新版本)以及布局代码(1.3.0 ~ 1.7.0)",
|
||||||
"星空露光<https://gitee.com/Cynorkyle>",
|
"感谢 柚子(https://gitee.com/Limexb) 提供了 UEngine 构建 Root 镜像脚本",
|
||||||
"shenmo<jifengshenmo@outlook.com>"
|
"感谢 星空露光(https://gitee.com/Cynorkyle) 制作了 UEngine 新版图标和安装应用时能选择应用分类的建议",
|
||||||
|
"感谢 shenmo(jifengshenmo@outlook.com) 反馈了许多程序的问题以及提供了 UEngine 在 Ubuntu 上的安装脚本",
|
||||||
|
"感谢 desert(https://gitee.com/desert741) 提供了给软件增加启动成功后自动调整分辨率的功能的建议",
|
||||||
|
"感谢 云思浮(https://gitee.com/foresee_io) 反馈的 1.3.0 依赖缺失问题",
|
||||||
|
"感谢 miaoys(https://bbs.deepin.org/user/271467)、zccrs(https://bbs.deepin.org/user/277780) 等用户反馈希望程序能和与系统 DTK 主题协调的建议",
|
||||||
|
"感谢 jiutian123(https://bbs.deepin.org/user/258825) 反馈的 1.5.2、1.5.3 存在问题",
|
||||||
|
"感谢 kero990(https://bbs.deepin.org/user/277932) 反馈的 README 表示不清的问题",
|
||||||
|
"感谢 wang(https://gitee.com/wang1279476881) 反馈的 1.6.0 左键打不开 “安装与卸载APK”和打包时 APK 版本号开头带 V 无法正常打包的问题",
|
||||||
|
"感谢 通天灵宝(https://bbs.deepin.org/user/137230)、wuhaiou123(https://bbs.chinauos.com/zh/user/309117) 反馈的 图标生成错误导致无法生成 .desktop 文件的问题",
|
||||||
|
"感谢 潜伏(https://bbs.chinauos.com/zh/user/303339) 反馈的右键支持安装/卸载的建议",
|
||||||
|
"感谢 z***g@gmx.de(https://bbs.chinauos.com/zh/user/312017) 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题",
|
||||||
|
"参考 忘记、过去(https://bbs.deepin.org/user/154730) 的帖子《如何更优雅地使用 pkexec》(https://bbs.deepin.org/post/202966)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
3
new-deb-build/opt/apps/com.gitee.uengine.runner.spark/files/launch.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
XDG_CURRENT_DESKTOP="Deepin"
|
||||||
|
$1 -platformtheme deepin "$@"
|
||||||
|
Before Width: | Height: | Size: 111 KiB |
@@ -0,0 +1,22 @@
|
|||||||
|
Package: com.gitee.uengine.runner.spark
|
||||||
|
Source: com.gitee.uengine.runner.spark
|
||||||
|
Replaces: spark-uengine-runner, com.gitee.uengine.runner.spark.ubuntu
|
||||||
|
Version: 1.8.0
|
||||||
|
Architecture: all
|
||||||
|
Section: utils
|
||||||
|
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, python3-matplotlib, wget, inotify-tools, aria2, python3-pyqt5
|
||||||
|
Recommends: uengine, deepin-elf-verify (>= 0.0.16.7-1)
|
||||||
|
Priority: optional
|
||||||
|
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]
|
||||||
|
Description: UEngine 运行器,1.8.0 更新内容:
|
||||||
|
※1、程序界面大部分由 Tkinter 转 PyQt5
|
||||||
|
※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)
|
||||||
|
※3、增加了安装/卸载失败后的提示
|
||||||
|
※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>
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# 使用 pip 安装所需库
|
# 使用 pip 安装所需库
|
||||||
python3 -m pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
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 easygui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
|
||||||
# 建立软链接
|
# 建立软链接
|
||||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
|
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
|
||||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder /usr/bin/uengine-apk-builder
|
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder /usr/bin/uengine-apk-builder
|
||||||
@@ -20,6 +19,6 @@ ln -s /opt/apps/com.gitee.uengine.runner.spark/files/root-uengine
|
|||||||
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh /usr/bin/uengine-runner-applist-launch.sh
|
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh /usr/bin/uengine-runner-applist-launch.sh
|
||||||
# 刷新图标缓存
|
# 刷新图标缓存
|
||||||
# 因为 Ubuntu 的问题,省略
|
# 因为 Ubuntu 的问题,省略
|
||||||
gtk-update-icon-cache /usr/share/icons/bloom | 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.6.2 -s > /dev/null | true
|
curl http://120.25.153.144/uengine-runner/Install.php?Version=1.8.0 -s > /dev/null | true
|
||||||
@@ -11,7 +11,9 @@ rm -fv /usr/bin/uengine-useadb
|
|||||||
rm -fv /usr/bin/uengine-runner-launch.sh
|
rm -fv /usr/bin/uengine-runner-launch.sh
|
||||||
rm -fv /usr/bin/uengine-runner-update-bug
|
rm -fv /usr/bin/uengine-runner-update-bug
|
||||||
rm -fv /usr/bin/uengine-root
|
rm -fv /usr/bin/uengine-root
|
||||||
rm -fv /opt/apps/com.gitee.uengine.runner.spark/files/
|
rm -frv /opt/apps/com.gitee.uengine.runner.spark/files/api/__pycache__
|
||||||
|
rm -frv /opt/apps/com.gitee.uengine.runner.spark/files/__pycache__
|
||||||
|
rm -fv /usr/bin/uengine-runner-applist-launch.sh
|
||||||
# 刷新图标缓存
|
# 刷新图标缓存
|
||||||
# 因为 Ubuntu 的问题,省略
|
# 因为 Ubuntu 的问题,省略
|
||||||
gtk-update-icon-cache /usr/share/icons/bloom | true
|
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
|
||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -37,7 +37,8 @@
|
|||||||
"你确定要启用 UEngine 可以安装以及使用默认的更新程序升级应用?(即允许未知来源)",
|
"你确定要启用 UEngine 可以安装以及使用默认的更新程序升级应用?(即允许未知来源)",
|
||||||
"你确定要禁用 UEngine 可以安装以及使用默认的更新程序升级应用?(即禁止未知来源)"
|
"你确定要禁用 UEngine 可以安装以及使用默认的更新程序升级应用?(即禁止未知来源)"
|
||||||
],
|
],
|
||||||
"UseAdbPackageAnswer": "你没有安装 adb 补丁,必须安装才能继续。是否安装?"
|
"UseAdbPackageAnswer": "你没有安装 adb 补丁,必须安装才能继续。是否安装?",
|
||||||
|
"CompleteInformation": "设置完毕"
|
||||||
},
|
},
|
||||||
"Menu": [
|
"Menu": [
|
||||||
{
|
{
|
||||||
@@ -133,8 +134,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"在 Ubuntu 上安装 UEngine",
|
"在 Ubuntu 上安装 UEngine",
|
||||||
"启动/禁用UEngine安装的安卓程序程序更新",
|
"启动/禁用UEngine安装的安卓程序程序更新(需要安装 adb 补丁)",
|
||||||
"在 Ubuntu 上安装 UEngine"
|
"在 Ubuntu 上安装 UEngine",
|
||||||
|
"设置 UEngine 代理(需要安装 adb 补丁)",
|
||||||
|
"设置 UEngine 指定应用窗口大小"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -144,7 +147,8 @@
|
|||||||
"关于",
|
"关于",
|
||||||
"反馈程序问题和建议",
|
"反馈程序问题和建议",
|
||||||
"检查更新",
|
"检查更新",
|
||||||
"更多帮助"
|
"更多帮助",
|
||||||
|
"关于 Qt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -203,7 +207,8 @@
|
|||||||
"Are you sure to allow UEngine to install or update other android program? (Allow )(即允许未知来源)",
|
"Are you sure to allow UEngine to install or update other android program? (Allow )(即允许未知来源)",
|
||||||
"Are you sure to disallow UEngine to install or update other android program? (Allow )(即允许未知来源)"
|
"Are you sure to disallow UEngine to install or update other android program? (Allow )(即允许未知来源)"
|
||||||
],
|
],
|
||||||
"UseAdbPackageAnswer": "You don't install adb package with UEngine, you must install, and after install you can connect to set.\nDo you want to install?"
|
"UseAdbPackageAnswer": "You don't install adb package with UEngine, you must install, and after install you can connect to set.\nDo you want to install?",
|
||||||
|
"CompleteInformation": "Set Completed"
|
||||||
},
|
},
|
||||||
"Menu": [
|
"Menu": [
|
||||||
{
|
{
|
||||||
@@ -299,8 +304,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Install UEngine On Ubuntu",
|
"Install UEngine On Ubuntu",
|
||||||
"Allow/Disallow UEngine To Install Or Update Other Android Program",
|
"Allow/Disallow UEngine To Install Or Update Other Android Program (Need Install Adb Patch)",
|
||||||
"Install UEngine On Ubuntu"
|
"Install UEngine On Ubuntu",
|
||||||
|
"Set UEngine Http Proxy (Need Install Adb Patch)",
|
||||||
|
"Set UEngine Some Android Windows Size"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -310,7 +317,8 @@
|
|||||||
"About This Program",
|
"About This Program",
|
||||||
"Upload Problem And Advice",
|
"Upload Problem And Advice",
|
||||||
"Update This Program",
|
"Update This Program",
|
||||||
"More Help"
|
"More Help",
|
||||||
|
"About Qt"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -4,10 +4,10 @@
|
|||||||
"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"
|
||||||
],
|
],
|
||||||
"Version": "1.6.2",
|
"Version": "1.8.0",
|
||||||
"System": "Linux(deepin/UOS)",
|
"System": "Linux(deepin/UOS)",
|
||||||
"Tips": [
|
"Tips": [
|
||||||
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis",
|
"更多可见:https://gitee.com/gfdgd-xi/uengine-runner/wikis 或程序的更多帮助",
|
||||||
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
"安装APK:点浏览按钮,选中需要安装的APK,然后点安装按钮",
|
||||||
"卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。",
|
"卸载APK:在卸载APK下面的输入框内输入需要卸载的APK包名,点卸载按钮,如果无法获取包名,可以通过浏览APK文件程序自动获取包名进行卸载。",
|
||||||
"保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可",
|
"保存APK图标:在安装APK下面的输入框浏览或输入APK的路径,然后点击“保存图标”按钮,选择保存位置即可",
|
||||||
@@ -22,6 +22,23 @@
|
|||||||
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
"5、如果想要使用adb连接UEngine或其他手机,请使用 1.2.0 以前的版本。(如需连接UEngine请安装adb补丁)"
|
||||||
],
|
],
|
||||||
"Update": [
|
"Update": [
|
||||||
|
"<b>V1.8.0:</b>",
|
||||||
|
"※1、程序界面大部分由 Tkinter 转 PyQt5",
|
||||||
|
"※2、添加了自动/手动配置 UEngine 窗口大小文件(自动需要在设置里手动开启,配置窗口的配置文件需要 Root)",
|
||||||
|
"※3、增加了安装/卸载失败后的提示",
|
||||||
|
"※4、补回谢明名单",
|
||||||
|
"※5、支持免密安装/卸载 APK",
|
||||||
|
"6、pip 更换华为源,提升下载速度",
|
||||||
|
"7、新增主题功能",
|
||||||
|
"8、支持在安装 APK 后手动指定分类(手动指定需要在设置里手动开启)",
|
||||||
|
"",
|
||||||
|
"V1.7.0:",
|
||||||
|
"※1、新增暗黑主题",
|
||||||
|
"※2、优化 deepin-terminal 在其它发行版显示奇奇怪怪的问题",
|
||||||
|
"※3、修复 UEngine 安装脚本在安装时不让用户选择,直接默认 N 无法安装的问题",
|
||||||
|
"4、新增设置 UEngine 代理的功能",
|
||||||
|
"5、将执行命令和打包器的返回输出从命令结束后显示输出内容改为实时显示内容",
|
||||||
|
"",
|
||||||
"V1.6.2:",
|
"V1.6.2:",
|
||||||
"※1、优化了 UEngine 运行器的英语翻译",
|
"※1、优化了 UEngine 运行器的英语翻译",
|
||||||
"※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)",
|
"※2、新增加了可以打开或关闭第三方应用安装的功能(使用此功能后在UEngine里可以使用默认的APK安装程序安装应用,此操作需要使用程序的Adb补丁)",
|
||||||
@@ -29,6 +46,7 @@
|
|||||||
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
||||||
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
||||||
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
||||||
|
"",
|
||||||
"V1.6.1:",
|
"V1.6.1:",
|
||||||
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
||||||
"※2、提供新版本的 UEngine Root 镜像",
|
"※2、提供新版本的 UEngine Root 镜像",
|
||||||
@@ -37,6 +55,7 @@
|
|||||||
"5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)",
|
"5、把构建 UEngine Root 镜像修改为多线程下载(wget=>aria2)",
|
||||||
"6、提供了 UEngine 运行器的 API(可以从项目地址中获取)",
|
"6、提供了 UEngine 运行器的 API(可以从项目地址中获取)",
|
||||||
"7、补上遗漏的项目参与者“星空露光”,新加项目参与者“为什么您不喜欢熊出没和阿布呢”",
|
"7、补上遗漏的项目参与者“星空露光”,新加项目参与者“为什么您不喜欢熊出没和阿布呢”",
|
||||||
|
"",
|
||||||
"V1.6.0:",
|
"V1.6.0:",
|
||||||
"※1、更换了新的图标",
|
"※1、更换了新的图标",
|
||||||
"※2、支持程序的评分和查看分数详情的功能(如果炸了我的服务器,这个就作废了)",
|
"※2、支持程序的评分和查看分数详情的功能(如果炸了我的服务器,这个就作废了)",
|
||||||
@@ -160,11 +179,22 @@
|
|||||||
],
|
],
|
||||||
"Time": "2021年08月30日",
|
"Time": "2021年08月30日",
|
||||||
"Contribute": [
|
"Contribute": [
|
||||||
"gfdgd xi<3025613752@qq.com>",
|
"<b>感谢以下用户提供的问题、建议、图标、代码等,如果有遗漏,请及时与开发者联系添加,以及如果侵犯到您的合法权益,也及时与开发者联系:</p>",
|
||||||
"actionchen<917981399@qq.com>",
|
"<hr>",
|
||||||
"柚子<https://gitee.com/Limexb>",
|
"感谢 麻木法师(1312580754) 在星火应用商店QQ交流群展示的接口及其原理",
|
||||||
"为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>",
|
"感谢 actionchen(917981399@qq.com) 提供了新版页面布局(1.3.0 ~ 最新版本)以及布局代码(1.3.0 ~ 1.7.0)",
|
||||||
"星空露光<https://gitee.com/Cynorkyle>",
|
"感谢 柚子(https://gitee.com/Limexb) 提供了 UEngine 构建 Root 镜像脚本",
|
||||||
"shenmo<jifengshenmo@outlook.com>"
|
"感谢 星空露光(https://gitee.com/Cynorkyle) 制作了 UEngine 新版图标和安装应用时能选择应用分类的建议",
|
||||||
|
"感谢 shenmo(jifengshenmo@outlook.com) 反馈了许多程序的问题以及提供了 UEngine 在 Ubuntu 上的安装脚本",
|
||||||
|
"感谢 desert(https://gitee.com/desert741) 提供了给软件增加启动成功后自动调整分辨率的功能的建议",
|
||||||
|
"感谢 云思浮(https://gitee.com/foresee_io) 反馈的 1.3.0 依赖缺失问题",
|
||||||
|
"感谢 miaoys(https://bbs.deepin.org/user/271467)、zccrs(https://bbs.deepin.org/user/277780) 等用户反馈希望程序能和与系统 DTK 主题协调的建议",
|
||||||
|
"感谢 jiutian123(https://bbs.deepin.org/user/258825) 反馈的 1.5.2、1.5.3 存在问题",
|
||||||
|
"感谢 kero990(https://bbs.deepin.org/user/277932) 反馈的 README 表示不清的问题",
|
||||||
|
"感谢 wang(https://gitee.com/wang1279476881) 反馈的 1.6.0 左键打不开 “安装与卸载APK”和打包时 APK 版本号开头带 V 无法正常打包的问题",
|
||||||
|
"感谢 通天灵宝(https://bbs.deepin.org/user/137230)、wuhaiou123(https://bbs.chinauos.com/zh/user/309117) 反馈的 图标生成错误导致无法生成 .desktop 文件的问题",
|
||||||
|
"感谢 潜伏(https://bbs.chinauos.com/zh/user/303339) 反馈的右键支持安装/卸载的建议",
|
||||||
|
"感谢 z***g@gmx.de(https://bbs.chinauos.com/zh/user/312017) 反馈的 UEngine 更新后 uengine-launch.sh 的社区版检测问题",
|
||||||
|
"参考 忘记、过去(https://bbs.deepin.org/user/154730) 的帖子《如何更优雅地使用 pkexec》(https://bbs.deepin.org/post/202966)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
XDG_CURRENT_DESKTOP="Deepin"
|
||||||
|
$1 -platformtheme deepin "$@"
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,8 +2,8 @@
|
|||||||
# 使用系统默认的 python3 运行
|
# 使用系统默认的 python3 运行
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
# 作者:gfdgd xi
|
# 作者:gfdgd xi
|
||||||
# 版本:1.6.1
|
# 版本:1.7.0
|
||||||
# 更新时间:2022年04月30日(五一了)
|
# 更新时间:2022年07月23日
|
||||||
# 感谢:anbox、deepin 和 统信
|
# 感谢:anbox、deepin 和 统信
|
||||||
# 基于 Python3 的 tkinter 构建
|
# 基于 Python3 的 tkinter 构建
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
@@ -19,67 +19,88 @@ import zipfile
|
|||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import subprocess
|
import subprocess
|
||||||
import ttkthemes
|
import PyQt5.QtGui as QtGui
|
||||||
import tkinter as tk
|
import PyQt5.QtCore as QtCore
|
||||||
import tkinter.ttk as ttk
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
import tkinter.messagebox as messagebox
|
|
||||||
import tkinter.filedialog as filedialog
|
|
||||||
from getxmlimg import getsavexml
|
from getxmlimg import getsavexml
|
||||||
|
|
||||||
def FindApk():
|
def FindApk():
|
||||||
path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"])
|
path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 APK", json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"], "APK 可执行文件(*.apk);;所有文件(*.*)")
|
||||||
if path != "" and path != "()":
|
if path != "" and path != "()":
|
||||||
try:
|
try:
|
||||||
combobox1.set(path)
|
combobox1.setEditText(path[0])
|
||||||
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
|
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": os.path.dirname(path[0])})) # 写入配置文件
|
||||||
except:
|
except:
|
||||||
pass
|
traceback.print_exc()
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||||
|
|
||||||
|
class QT:
|
||||||
|
run = None
|
||||||
|
|
||||||
def BuildDeb():
|
def BuildDeb():
|
||||||
if combobox1.get() == "":
|
if combobox1.currentText() == "":
|
||||||
messagebox.showerror(title="提示", message="信息没有填写完整,无法继续打包 APK")
|
QtWidgets.QMessageBox.critical(None, "提示", "信息没有填写完整,无法继续打包 APK")
|
||||||
return
|
return
|
||||||
if not os.path.exists(combobox1.get()):
|
if not os.path.exists(combobox1.currentText()):
|
||||||
messagebox.showerror(title="提示", message="信息填写错误,无法继续打包 APK")
|
QtWidgets.QMessageBox.critical(None, "提示", "信息填写错误,无法继续打包 APK")
|
||||||
return
|
return
|
||||||
DisabledAndEnbled(True)
|
DisabledAndEnbled(True)
|
||||||
threading.Thread(target=GetBuildApkDebError, args=(combobox1.get(),)).start()
|
QT.run = BuildApkDeb(combobox1.currentText())
|
||||||
|
QT.run.signal.connect(TextboxAddText1)
|
||||||
|
QT.run.labelChange.connect(ChangeItems)
|
||||||
|
QT.run.tips.connect(TipsMessagebox)
|
||||||
|
QT.run.start()
|
||||||
|
|
||||||
def RunCommandShow(command):
|
class BuildApkDeb(QtCore.QThread):
|
||||||
TextboxAddText1("$> {}".format(command))
|
signal = QtCore.pyqtSignal(str)
|
||||||
TextboxAddText1(GetCommandReturn(command))
|
labelChange = QtCore.pyqtSignal(str)
|
||||||
|
tips = QtCore.pyqtSignal(str)
|
||||||
|
|
||||||
def GetBuildApkDebError(apkPath):
|
def __init__(self, apkPath) -> None:
|
||||||
try:
|
self.apkPath = apkPath
|
||||||
BuildApkDeb(apkPath)
|
super().__init__()
|
||||||
except:
|
|
||||||
traceback.print_exc()
|
|
||||||
messagebox.showerror(title="错误", message=traceback.format_exc())
|
|
||||||
DisabledAndEnbled(False)
|
|
||||||
|
|
||||||
def BuildApkDeb(apkPath):
|
def RunCommandShow(self, command):
|
||||||
tempPath = "/tmp/uengine-apk-builder-{}".format(int(random.randint(0, 1024)))
|
if command.replace(" ", "").replace("\n", "") == "":
|
||||||
RunCommandShow("echo '======================================New===================================='")
|
return
|
||||||
RunCommandShow("echo '创建目录'")
|
self.signal.emit("$> {}".format(command))
|
||||||
RunCommandShow("mkdir -pv '{}/DEBIAN'".format(tempPath))
|
res = subprocess.Popen([command], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
RunCommandShow("mkdir -pv '{}/usr/share/applications'".format(tempPath))
|
# 实时读取程序返回
|
||||||
RunCommandShow("mkdir -pv '{}/usr/share/uengine/apk'".format(tempPath))
|
while res.poll() is None:
|
||||||
RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
|
try:
|
||||||
RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
|
texts = res.stdout.readline().decode("utf8")
|
||||||
apkPackageName = GetApkPackageName(apkPath, False)
|
except:
|
||||||
if qianZhui.get():
|
texts = ""
|
||||||
apkPackageNameNew = GetApkPackageName(apkPath, True).lower()
|
print(texts, end="")
|
||||||
else:
|
self.signal.emit(texts)
|
||||||
apkPackageNameNew = GetApkPackageName(apkPath, False).lower()
|
# 已废弃
|
||||||
apkPackageVersion = GetApkVersion(apkPath)
|
# TextboxAddText1(GetCommandReturn(command))
|
||||||
if apkPackageVersion[0].upper() == "V":
|
|
||||||
package = list(apkPackageVersion)
|
def run(self):
|
||||||
package.pop(0)
|
try:
|
||||||
apkPackageVersion = "".join(package)
|
apkPath = self.apkPath
|
||||||
apkChineseLabel = GetApkChineseLabel(apkPath)
|
tempPath = "/tmp/uengine-apk-builder-{}".format(int(random.randint(0, 1024)))
|
||||||
apkActivityName = GetApkActivityName(apkPath)
|
self.RunCommandShow("echo '======================================New===================================='")
|
||||||
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageNameNew)
|
self.RunCommandShow("echo '创建目录'")
|
||||||
debControl = '''Package: {}
|
self.RunCommandShow("mkdir -pv '{}/DEBIAN'".format(tempPath))
|
||||||
|
self.RunCommandShow("mkdir -pv '{}/usr/share/applications'".format(tempPath))
|
||||||
|
self.RunCommandShow("mkdir -pv '{}/usr/share/uengine/apk'".format(tempPath))
|
||||||
|
self.RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
|
||||||
|
self.RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
|
||||||
|
apkPackageName = GetApkPackageName(apkPath, False)
|
||||||
|
if check.isChecked():
|
||||||
|
apkPackageNameNew = GetApkPackageName(apkPath, True).lower()
|
||||||
|
else:
|
||||||
|
apkPackageNameNew = GetApkPackageName(apkPath, False).lower()
|
||||||
|
apkPackageVersion = GetApkVersion(apkPath)
|
||||||
|
if apkPackageVersion[0].upper() == "V":
|
||||||
|
package = list(apkPackageVersion)
|
||||||
|
package.pop(0)
|
||||||
|
apkPackageVersion = "".join(package)
|
||||||
|
apkChineseLabel = GetApkChineseLabel(apkPath)
|
||||||
|
apkActivityName = GetApkActivityName(apkPath)
|
||||||
|
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageNameNew)
|
||||||
|
debControl = '''Package: {}
|
||||||
Version: {}
|
Version: {}
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: {}
|
Maintainer: {}
|
||||||
@@ -87,7 +108,7 @@ Depends: deepin-elf-verify (>= 0.0.16.7-1), uengine (>= 1.0.1)
|
|||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Description: {}\n'''.format(apkPackageNameNew, apkPackageVersion, apkChineseLabel, apkChineseLabel)
|
Description: {}\n'''.format(apkPackageNameNew, apkPackageVersion, apkChineseLabel, apkChineseLabel)
|
||||||
debPostinst = '''#!/bin/sh
|
debPostinst = '''#!/bin/sh
|
||||||
|
|
||||||
APK_DIR="/usr/share/uengine/apk"
|
APK_DIR="/usr/share/uengine/apk"
|
||||||
APK_NAME="{}"
|
APK_NAME="{}"
|
||||||
@@ -124,7 +145,7 @@ fi
|
|||||||
/usr/bin/uengine-session-launch-helper -- uengine install --apk="$APK_PATH"
|
/usr/bin/uengine-session-launch-helper -- uengine install --apk="$APK_PATH"
|
||||||
|
|
||||||
exit 0'''.format(apkPackageNameNew + ".apk", "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
exit 0'''.format(apkPackageNameNew + ".apk", "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
||||||
debPrerm = '''#!/bin/sh
|
debPrerm = '''#!/bin/sh
|
||||||
|
|
||||||
APP_NAME="{}"
|
APP_NAME="{}"
|
||||||
DESKTOP_FILE="{}"
|
DESKTOP_FILE="{}"
|
||||||
@@ -146,7 +167,7 @@ echo "Uninstalling $APP_NAME"
|
|||||||
/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"
|
/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"
|
||||||
|
|
||||||
exit 0'''.format(apkPackageName, "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
exit 0'''.format(apkPackageName, "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
||||||
desktopFile = '''[Desktop Entry]
|
desktopFile = '''[Desktop Entry]
|
||||||
Categories=Other;
|
Categories=Other;
|
||||||
Exec=uengine launch --action=android.intent.action.MAIN --package={} --component={}
|
Exec=uengine launch --action=android.intent.action.MAIN --package={} --component={}
|
||||||
Icon=/usr/share/uengine/icons/{}.png
|
Icon=/usr/share/uengine/icons/{}.png
|
||||||
@@ -155,54 +176,63 @@ Type=Application
|
|||||||
GenericName={}
|
GenericName={}
|
||||||
Name={}
|
Name={}
|
||||||
'''
|
'''
|
||||||
#RunCommandShow("echo '{}' > '{}/DEBIAN/control'".format(debControl, tempPath))
|
#self.RunCommandShow("echo '{}' > '{}/DEBIAN/control'".format(debControl, tempPath))
|
||||||
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/control'".format(tempPath))
|
self.RunCommandShow("echo 正在写入文件:'{}/DEBIAN/control'".format(tempPath))
|
||||||
write_txt("{}/DEBIAN/control".format(tempPath), debControl)
|
write_txt("{}/DEBIAN/control".format(tempPath), debControl)
|
||||||
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/postinst'".format(tempPath))
|
self.RunCommandShow("echo 正在写入文件:'{}/DEBIAN/postinst'".format(tempPath))
|
||||||
write_txt("{}/DEBIAN/postinst".format(tempPath), debPostinst)
|
write_txt("{}/DEBIAN/postinst".format(tempPath), debPostinst)
|
||||||
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/prerm'".format(tempPath))
|
self.RunCommandShow("echo 正在写入文件:'{}/DEBIAN/prerm'".format(tempPath))
|
||||||
write_txt("{}/DEBIAN/prerm".format(tempPath), debPrerm)
|
write_txt("{}/DEBIAN/prerm".format(tempPath), debPrerm)
|
||||||
RunCommandShow("echo 正在写入文件:'/usr/share/applications/{}.desktop'".format(apkPackageNameNew))
|
self.RunCommandShow("echo 正在写入文件:'/usr/share/applications/{}.desktop'".format(apkPackageNameNew))
|
||||||
#write_txt("{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew), desktopFile)
|
#write_txt("{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew), desktopFile)
|
||||||
BuildUengineDesktop(apkPackageName, apkActivityName, apkChineseLabel, "/usr/share/uengine/icons/{}.png".format(apkPackageNameNew),
|
BuildUengineDesktop(apkPackageName, apkActivityName, apkChineseLabel, "/usr/share/uengine/icons/{}.png".format(apkPackageNameNew),
|
||||||
"{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew))
|
"{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew))
|
||||||
RunCommandShow("echo '复制文件'")
|
self.RunCommandShow("echo '复制文件'")
|
||||||
RunCommandShow("echo '写入 APK 软件图标'")
|
self.RunCommandShow("echo '写入 APK 软件图标'")
|
||||||
SaveApkIcon(apkPath, iconSavePath)
|
SaveApkIcon(apkPath, iconSavePath)
|
||||||
RunCommandShow("echo '复制 APK 文件'")
|
self.RunCommandShow("echo '复制 APK 文件'")
|
||||||
RunCommandShow("cp -rv '{}' '{}/usr/share/uengine/apk/{}.apk'".format(apkPath, tempPath, apkPackageNameNew))
|
self.RunCommandShow("cp -rv '{}' '{}/usr/share/uengine/apk/{}.apk'".format(apkPath, tempPath, apkPackageNameNew))
|
||||||
RunCommandShow("echo '正在设置文件权限……'")
|
self.RunCommandShow("echo '正在设置文件权限……'")
|
||||||
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
||||||
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
||||||
RunCommandShow("echo '打包 deb 到桌面……'")
|
self.RunCommandShow("echo '打包 deb 到桌面……'")
|
||||||
RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
self.RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
||||||
RunCommandShow("echo '正在删除临时目录……'")
|
self.RunCommandShow("echo '正在删除临时目录……'")
|
||||||
RunCommandShow("rm -rfv '{}'".format(tempPath))
|
self.RunCommandShow("rm -rfv '{}'".format(tempPath))
|
||||||
RunCommandShow("echo '完成!'")
|
self.RunCommandShow("echo '完成!'")
|
||||||
findApkHistory.append(apkPath)
|
findApkHistory.append(apkPath)
|
||||||
combobox1['value'] = findApkHistory
|
self.labelChange.emit("")
|
||||||
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
|
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
|
||||||
messagebox.showinfo(title="提示", message="打包完成")
|
DisabledAndEnbled(False)
|
||||||
DisabledAndEnbled(False)
|
self.tips.emit("打包完成")
|
||||||
|
|
||||||
|
except:
|
||||||
|
DisabledAndEnbled(False)
|
||||||
|
traceback.print_exc()
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||||
|
|
||||||
|
def TipsMessagebox(tips):
|
||||||
|
QtWidgets.QMessageBox.information(widget, "提示", tips)
|
||||||
|
|
||||||
|
def ChangeItems(self):
|
||||||
|
combobox1.clear()
|
||||||
|
combobox1.addItems(findApkHistory)
|
||||||
|
#combobox1.setEditText("")
|
||||||
|
|
||||||
def DisabledAndEnbled(choose):
|
def DisabledAndEnbled(choose):
|
||||||
userChoose = {True: tk.DISABLED, False: tk.NORMAL}
|
combobox1.setDisabled(choose)
|
||||||
a = userChoose[choose]
|
check.setDisabled(choose)
|
||||||
combobox1.configure(state=a)
|
button2.setDisabled(choose)
|
||||||
check.configure(state=a)
|
button3.setDisabled(choose)
|
||||||
button2.configure(state=a)
|
|
||||||
button3.configure(state=a)
|
|
||||||
|
|
||||||
# 需引入 subprocess
|
|
||||||
def GetCommandReturn(cmd):
|
|
||||||
# cmd 是要获取输出的命令
|
|
||||||
return subprocess.getoutput(cmd)
|
|
||||||
|
|
||||||
# 重启本应用程序
|
# 重启本应用程序
|
||||||
def ReStartProgram():
|
def ReStartProgram():
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
os.execl(python, python, * sys.argv)
|
os.execl(python, python, * sys.argv)
|
||||||
|
|
||||||
|
def GetCommandReturn(command):
|
||||||
|
return subprocess.getoutput(command)
|
||||||
|
|
||||||
# 获取用户主目录
|
# 获取用户主目录
|
||||||
def get_home():
|
def get_home():
|
||||||
return os.path.expanduser('~')
|
return os.path.expanduser('~')
|
||||||
@@ -343,9 +373,7 @@ def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
|
|||||||
|
|
||||||
def TextboxAddText1(message):
|
def TextboxAddText1(message):
|
||||||
global textbox1
|
global textbox1
|
||||||
textbox1.configure(state=tk.NORMAL)
|
textbox1.append(message)
|
||||||
textbox1.insert(tk.END,message + "\n")
|
|
||||||
textbox1.configure(state=tk.DISABLED)
|
|
||||||
|
|
||||||
# 获取用户桌面目录
|
# 获取用户桌面目录
|
||||||
def get_desktop_path():
|
def get_desktop_path():
|
||||||
@@ -377,7 +405,7 @@ if not lang in langFile.keys():
|
|||||||
information = json.loads(readtxt(programPath + "/information.json"))
|
information = json.loads(readtxt(programPath + "/information.json"))
|
||||||
version = information["Version"]
|
version = information["Version"]
|
||||||
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
|
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
|
||||||
iconPath = "{}/builer.png".format(os.path.split(os.path.realpath(__file__))[0])
|
iconPath = "{}/builer.svg".format(os.path.split(os.path.realpath(__file__))[0])
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# 加载配置
|
# 加载配置
|
||||||
@@ -397,7 +425,67 @@ findApkHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/F
|
|||||||
###########################
|
###########################
|
||||||
# 窗口创建
|
# 窗口创建
|
||||||
###########################
|
###########################
|
||||||
win = tk.Tk()
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
# 权重
|
||||||
|
size = QtWidgets.QSizePolicy()
|
||||||
|
size.setHorizontalPolicy(0)
|
||||||
|
widgetSize = QtWidgets.QSizePolicy()
|
||||||
|
widgetSize.setVerticalPolicy(0)
|
||||||
|
#
|
||||||
|
window = QtWidgets.QMainWindow()
|
||||||
|
widget = QtWidgets.QWidget()
|
||||||
|
widgetLayout = QtWidgets.QGridLayout()
|
||||||
|
combobox1 = QtWidgets.QComboBox()
|
||||||
|
label1 = QtWidgets.QLabel(langFile[lang]["Uengine Apk Builder"]["label1"])
|
||||||
|
button2 = QtWidgets.QPushButton(langFile[lang]["Uengine Apk Builder"]["button2"])
|
||||||
|
button3 = QtWidgets.QPushButton(langFile[lang]["Uengine Apk Builder"]["button3"])
|
||||||
|
textbox1 = QtWidgets.QTextBrowser()
|
||||||
|
frame2 = QtWidgets.QHBoxLayout()
|
||||||
|
check = QtWidgets.QCheckBox(langFile[lang]["Uengine Apk Builder"]["check"])
|
||||||
|
label1.setSizePolicy(size)
|
||||||
|
button2.setSizePolicy(size)
|
||||||
|
check.setSizePolicy(size)
|
||||||
|
button3.setSizePolicy(size)
|
||||||
|
combobox1.setEditable(True)
|
||||||
|
combobox1.addItems(findApkHistory)
|
||||||
|
combobox1.setEditText("")
|
||||||
|
button2.clicked.connect(FindApk)
|
||||||
|
button3.clicked.connect(BuildDeb)
|
||||||
|
widgetLayout.addWidget(label1, 0, 0, 1, 1)
|
||||||
|
widgetLayout.addWidget(combobox1, 0, 1, 1, 1)
|
||||||
|
widgetLayout.addWidget(button2, 0, 2, 1, 1)
|
||||||
|
widgetLayout.addLayout(frame2, 1, 0, 1, 3)
|
||||||
|
widgetLayout.addWidget(textbox1, 2, 0, 1, 3)
|
||||||
|
# 菜单栏
|
||||||
|
menu = window.menuBar()
|
||||||
|
programmenu = menu.addMenu(langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Name"])
|
||||||
|
exitProgram = QtWidgets.QAction(langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Menu"][0])
|
||||||
|
exitProgram.triggered.connect(window.close)
|
||||||
|
programmenu.addAction(exitProgram)
|
||||||
|
#
|
||||||
|
frame2.addWidget(check)
|
||||||
|
frame2.addWidget(button3)
|
||||||
|
widget.setLayout(widgetLayout)
|
||||||
|
window.setWindowTitle(title)
|
||||||
|
window.setCentralWidget(widget)
|
||||||
|
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||||
|
window.resize(window.frameSize().width() * 1.3, window.frameSize().height() * 1.1)
|
||||||
|
window.show()
|
||||||
|
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()
|
qianZhui = tk.BooleanVar()
|
||||||
|
|
||||||
@@ -422,9 +510,6 @@ textbox1.config(foreground='white', background='black')
|
|||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
combobox1.set(sys.argv[1])
|
combobox1.set(sys.argv[1])
|
||||||
# 设置窗口
|
# 设置窗口
|
||||||
style = ttkthemes.ThemedStyle(win)
|
|
||||||
style.set_theme("breeze")
|
|
||||||
#win.attributes('-alpha', 0.5)
|
|
||||||
win.title(title)
|
win.title(title)
|
||||||
win.resizable(0, 0)
|
win.resizable(0, 0)
|
||||||
win.iconphoto(False, tk.PhotoImage(file=iconPath))
|
win.iconphoto(False, tk.PhotoImage(file=iconPath))
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#########################################
|
###############################################################
|
||||||
# 版本:1.6.1
|
# 版本:1.8.0
|
||||||
# 更新时间:2022年10月06日
|
# 更新时间:2022年07月26日
|
||||||
# Need: unix, python3-tk, python3-pip, pymouse, keyboard
|
# Need: unix, python3-tk, python3-pip, pymouse, keyboard
|
||||||
#########################################
|
###############################################################
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
@@ -18,8 +18,6 @@ import tkinter as tk
|
|||||||
import tkinter.ttk as ttk
|
import tkinter.ttk as ttk
|
||||||
import tkinter.messagebox as messagebox
|
import tkinter.messagebox as messagebox
|
||||||
import tkinter.filedialog as filedialog
|
import tkinter.filedialog as filedialog
|
||||||
import Xlib.threaded as threaded
|
|
||||||
#import pymouse.unix as pymouse
|
|
||||||
########################
|
########################
|
||||||
#
|
#
|
||||||
########################
|
########################
|
||||||
@@ -30,7 +28,6 @@ def Inputt(key):
|
|||||||
Setting(key)
|
Setting(key)
|
||||||
else:
|
else:
|
||||||
Mouse(key)
|
Mouse(key)
|
||||||
#Mouse(key)
|
|
||||||
|
|
||||||
def Open():
|
def Open():
|
||||||
path = filedialog.askopenfilename(title="打开", filetypes=[["json 文件", "*.json"], ["全部文件", ["*.*"]]])
|
path = filedialog.askopenfilename(title="打开", filetypes=[["json 文件", "*.json"], ["全部文件", ["*.*"]]])
|
||||||
@@ -56,13 +53,12 @@ def Mouse(key):
|
|||||||
if keybo.__contains__(key.name):
|
if keybo.__contains__(key.name):
|
||||||
print(keybo[key.name]["MousePlace"])
|
print(keybo[key.name]["MousePlace"])
|
||||||
pyautogui.FAILSAFE = False
|
pyautogui.FAILSAFE = False
|
||||||
#os.system(programPath + "/mouse.py {} {}".format(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1]))
|
|
||||||
try:
|
try:
|
||||||
|
print((keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1]))
|
||||||
pyautogui.click(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1])
|
pyautogui.click(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1])
|
||||||
|
|
||||||
except:
|
except:
|
||||||
pass
|
traceback.print_exc()
|
||||||
#pyautogui.click(1500, 800)
|
|
||||||
#m.click(keybo[key.name]["MousePlace"][0],keybo[key.name]["MousePlace"][1])
|
|
||||||
|
|
||||||
def Setting(key):
|
def Setting(key):
|
||||||
if key.event_type == 'up':
|
if key.event_type == 'up':
|
||||||
@@ -105,11 +101,8 @@ def ShowTips():
|
|||||||
def Closing():
|
def Closing():
|
||||||
global close
|
global close
|
||||||
close = True
|
close = True
|
||||||
window.destroy()
|
# 偷懒了,直接强制关闭进程
|
||||||
#key.close()
|
os.system(f"kill {os.getpid()}")
|
||||||
#stop_thread(keys)
|
|
||||||
keyboard.unhook(Inputt)
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
|
|
||||||
def Key():
|
def Key():
|
||||||
@@ -145,6 +138,20 @@ def Clean():
|
|||||||
def About():
|
def About():
|
||||||
threading.Thread(target=os.system, args=["{}/uengine-runner-about".format(programPath)]).start()
|
threading.Thread(target=os.system, args=["{}/uengine-runner-about".format(programPath)]).start()
|
||||||
|
|
||||||
|
lock = False
|
||||||
|
def ThreadCheck():
|
||||||
|
global lock
|
||||||
|
lock = True
|
||||||
|
pyautogui.position()
|
||||||
|
lock = False
|
||||||
|
|
||||||
|
def RestartProgramTimer():
|
||||||
|
threading.Thread(target=ThreadCheck).start()
|
||||||
|
time.sleep(0.1)
|
||||||
|
if lock:
|
||||||
|
ReStartProgram()
|
||||||
|
RestartProgramTimer()
|
||||||
|
|
||||||
###################
|
###################
|
||||||
#
|
#
|
||||||
###################
|
###################
|
||||||
@@ -226,16 +233,9 @@ settingMouseToKeyboard.grid(row=0, column=0)
|
|||||||
settingButton.grid(row=0, column=1)
|
settingButton.grid(row=0, column=1)
|
||||||
|
|
||||||
win.pack(fill="both", expand="yes")
|
win.pack(fill="both", expand="yes")
|
||||||
#threaded.lock.allocate_lock()
|
|
||||||
keys = threading.Thread(target=Key)
|
keys = threading.Thread(target=Key)
|
||||||
keys.start()
|
keys.start()
|
||||||
threading.Thread(target=ShowTips).start()
|
threading.Thread(target=ShowTips).start()
|
||||||
pyautogui.FAILSAFE = False
|
pyautogui.FAILSAFE = False
|
||||||
'''def B(key):
|
threading.Thread(target=RestartProgramTimer).start()
|
||||||
if key.event_type == "up":
|
|
||||||
print(pyautogui.position())
|
|
||||||
print(key.name)
|
|
||||||
pyautogui.click(1500, 800)
|
|
||||||
keyboard.hook(B)
|
|
||||||
keyboard.wait()'''
|
|
||||||
window.mainloop()
|
window.mainloop()
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
cd `dirname $0`
|
||||||
|
dir=`pwd`
|
||||||
FILE=/usr/bin/uengine
|
FILE=/usr/bin/uengine
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "$FILE 存在,正常打开菜单"
|
echo "$FILE 存在,正常打开菜单"
|
||||||
@@ -13,7 +15,7 @@ else
|
|||||||
echo "此系统为 Deepin/UOS,使用 apt 安装"
|
echo "此系统为 Deepin/UOS,使用 apt 安装"
|
||||||
zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap
|
zenity --question --text="您还未安装 UEngine,是否现在安装?" --no-wrap
|
||||||
if [[ $? = 0 ]]; then
|
if [[ $? = 0 ]]; then
|
||||||
deepin-terminal -C "pkexec apt install uengine"
|
"$dir/uengine-runner-applist-launch.sh" deepin-terminal -C "pkexec apt install uengine -y"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
|
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
import base64
|
||||||
|
import requests
|
||||||
|
import traceback
|
||||||
|
import webbrowser
|
||||||
|
import urllib.parse as parse
|
||||||
|
import PyQt5.QtGui as QtGui
|
||||||
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
|
|
||||||
|
# 读取文本文档
|
||||||
|
def readtxt(path: "路径")->"读取文本文档":
|
||||||
|
f = open(path, "r") # 设置文件对象
|
||||||
|
str = f.read() # 获取内容
|
||||||
|
f.close() # 关闭文本对象
|
||||||
|
return str # 返回结果
|
||||||
|
|
||||||
|
def Update(name, stars, contact, things, version):
|
||||||
|
# post 内容
|
||||||
|
data = {
|
||||||
|
"Name": name,
|
||||||
|
"Starts": stars,
|
||||||
|
"Contact": contact,
|
||||||
|
"Things": things,
|
||||||
|
"Version": version
|
||||||
|
}
|
||||||
|
try:
|
||||||
|
QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text)
|
||||||
|
print(data)
|
||||||
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", f"服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{traceback.format_exc()}")
|
||||||
|
|
||||||
|
def UpdateButtonClick():
|
||||||
|
#判断是否为空
|
||||||
|
if nameThings.text() == "" or starMenu.currentText() == "" or contactThings.text() == "" or updateThings.toPlainText().replace(" ", "").replace("\n", "") == "":
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", "反馈信息未填写完整!")
|
||||||
|
return
|
||||||
|
Update(name=nameThings.text(), stars=starMenu.currentText(), contact=contactThings.text(), things=updateThings.toPlainText(), version=version)
|
||||||
|
|
||||||
|
def OpenGiteeIssues():
|
||||||
|
webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/uengine-runner/issues")
|
||||||
|
|
||||||
|
def OpenGithubIssues():
|
||||||
|
webbrowser.open_new_tab("https://github.com/gfdgd-xi/uengine-runner/issues")
|
||||||
|
|
||||||
|
def OpenGitlinkIssues():
|
||||||
|
webbrowser.open_new_tab("https://www.gitlink.org.cn/gfdgd_xi/uengine-runner/issues")
|
||||||
|
|
||||||
|
# 获取用户主目录
|
||||||
|
def get_home()->"获取用户主目录":
|
||||||
|
return os.path.expanduser('~')
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# 程序信息
|
||||||
|
###########################
|
||||||
|
iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0])
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
information = json.loads(readtxt(programPath + "/information.json"))
|
||||||
|
version = information["Version"]
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# 窗口创建
|
||||||
|
###########################
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
window = QtWidgets.QMainWindow()
|
||||||
|
widget = QtWidgets.QWidget()
|
||||||
|
widgetLayout = QtWidgets.QGridLayout()
|
||||||
|
nameThings = QtWidgets.QLineEdit()
|
||||||
|
contactThings = QtWidgets.QLineEdit()
|
||||||
|
starMenu = QtWidgets.QComboBox()
|
||||||
|
updateThings = QtWidgets.QTextEdit()
|
||||||
|
updateButton = QtWidgets.QPushButton("提交")
|
||||||
|
otherUpload = QtWidgets.QHBoxLayout()
|
||||||
|
giteeButton = QtWidgets.QPushButton("Gitee Issues")
|
||||||
|
githubButton = QtWidgets.QPushButton("Github Issues")
|
||||||
|
gitlinkButton = QtWidgets.QPushButton("Gitlink Issues")
|
||||||
|
otherUpload.addWidget(QtWidgets.QLabel("如果无法正常反馈,可以用其他方式反馈:"))
|
||||||
|
otherUpload.addWidget(giteeButton)
|
||||||
|
otherUpload.addWidget(githubButton)
|
||||||
|
otherUpload.addWidget(gitlinkButton)
|
||||||
|
otherUpload.addSpacerItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||||
|
starMenu.addItems(["5分", "4分", "3分", "2分", "1分"])
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("你的昵称:"), 0, 0, 1, 1)
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("联系方式(电子邮箱):"), 0, 2, 1, 1)
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("评分:"), 0, 4, 1, 1)
|
||||||
|
widgetLayout.addWidget(QtWidgets.QLabel("反馈内容(支持 Markdown 格式):"), 1, 0, 1, 2)
|
||||||
|
widgetLayout.addWidget(nameThings, 0, 1, 1, 1)
|
||||||
|
widgetLayout.addWidget(contactThings, 0, 3, 1, 1)
|
||||||
|
widgetLayout.addWidget(starMenu, 0, 5, 1, 1)
|
||||||
|
widgetLayout.addWidget(updateThings, 2, 0, 1, 6)
|
||||||
|
widgetLayout.addLayout(otherUpload, 3, 0, 1, 5)
|
||||||
|
widgetLayout.addWidget(updateButton, 3, 5, 1, 1)
|
||||||
|
giteeButton.clicked.connect(OpenGiteeIssues)
|
||||||
|
githubButton.clicked.connect(OpenGithubIssues)
|
||||||
|
gitlinkButton.clicked.connect(OpenGitlinkIssues)
|
||||||
|
updateButton.clicked.connect(UpdateButtonClick)
|
||||||
|
widget.setLayout(widgetLayout)
|
||||||
|
window.setCentralWidget(widget)
|
||||||
|
window.setWindowTitle(f"UEngine 运行器 {version} 问题/建议反馈")
|
||||||
|
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||||
|
window.show()
|
||||||
|
sys.exit(app.exec_())
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
#########################################
|
#########################################
|
||||||
# 版本:1.6.2
|
# 版本:1.8.0
|
||||||
# 更新时间:2022年06月19日
|
# 更新时间:2022年07月23日
|
||||||
#########################################
|
#########################################
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
import ttkthemes
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
import tkinter as tk
|
|
||||||
import tkinter.ttk as ttk
|
|
||||||
import tkinter.messagebox as messagebox
|
|
||||||
########################
|
########################
|
||||||
#
|
#
|
||||||
########################
|
########################
|
||||||
@@ -29,40 +26,34 @@ def readtxt(path: "路径")->"读取文本文档":
|
|||||||
###################
|
###################
|
||||||
# 判断是不是 root
|
# 判断是不是 root
|
||||||
###################
|
###################
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
if os.geteuid() != 0:
|
if os.geteuid() != 0:
|
||||||
print("不是以 root 权限运行本程序!")
|
print("不是以 root 权限运行本程序!")
|
||||||
root = tk.Tk()
|
QtWidgets.QMessageBox.critical(None, "错误", "不是以 root 权限运行本程序!")
|
||||||
root.overrideredirect(1)
|
|
||||||
root.withdraw()
|
|
||||||
messagebox.showerror(title="错误", message="不是以 root 权限运行本程序!")
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
###################
|
###################
|
||||||
#
|
#
|
||||||
###################
|
###################
|
||||||
window = tk.Tk()
|
|
||||||
style = ttkthemes.ThemedStyle(window)
|
|
||||||
style.set_theme("breeze")
|
|
||||||
window.withdraw()
|
|
||||||
try:
|
try:
|
||||||
if sys.argv[1] == "1" and messagebox.askokcancel(title="提示", message="你确定要删除吗?"):
|
if sys.argv[1] == "1" and QtWidgets.QMessageBox.question(None, "提示", "你确定要删除吗?", QtWidgets.QMessageBox.Ok, QtWidgets.QMessageBox.Cancel) == QtWidgets.QMessageBox.Ok:
|
||||||
os.remove("/data/uengine/data/data/misc/adb/adb_keys")
|
os.remove("/data/uengine/data/data/misc/adb/adb_keys")
|
||||||
messagebox.showinfo(title="提示", message="完成")
|
QtWidgets.QMessageBox.information(None, "提示", "完成")
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
messagebox.showerror(title="错误", message=traceback.format_exc())
|
QtWidgets.QMessageBox.critical(None, "错误", traceback.format_exc())
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
if sys.argv[1] == "1":
|
if sys.argv[1] == "1":
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
if not messagebox.askyesno(title="提示", message='''请阅读以下提示然后确定是否继续:
|
if QtWidgets.QMessageBox.question(None, "提示", '''请阅读以下提示然后确定是否继续:
|
||||||
1、安装后即可使用 adb 连接 UEngine;
|
1、安装后即可使用 adb 连接 UEngine;
|
||||||
2、重置 UEngine 或 adb 就需要重新设置该支持补丁;
|
2、重置 UEngine 或 adb 就需要重新设置该支持补丁;
|
||||||
3、需要 root 权限;'''):
|
3、需要 root 权限;''') == QtWidgets.QMessageBox.No:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
# 写入(需要 root)
|
# 写入(需要 root)
|
||||||
if not os.path.exists("/data/uengine/data/data/misc/adb"):
|
if not os.path.exists("/data/uengine/data/data/misc/adb"):
|
||||||
messagebox.showerror(title="错误", message="无法读取 UEngine 数据!")
|
QtWidgets.QMessageBox.critical(None, "错误", "无法读取 UEngine 数据!")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
try:
|
try:
|
||||||
things = readtxt(sys.argv[2])
|
things = readtxt(sys.argv[2])
|
||||||
@@ -74,8 +65,8 @@ try:
|
|||||||
if os.path.exists("/data/uengine/data/data/misc/adb/adb_keys"):
|
if os.path.exists("/data/uengine/data/data/misc/adb/adb_keys"):
|
||||||
old = readtxt("/data/uengine/data/data/misc/adb/adb_keys") + "\n"
|
old = readtxt("/data/uengine/data/data/misc/adb/adb_keys") + "\n"
|
||||||
write_txt("/data/uengine/data/data/misc/adb/adb_keys", old + "\n".join(adbKey))
|
write_txt("/data/uengine/data/data/misc/adb/adb_keys", old + "\n".join(adbKey))
|
||||||
messagebox.showinfo(title="提示", message="完成")
|
QtWidgets.QMessageBox.information(None, "提示", "完成")
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
messagebox.showerror(title="错误", message=traceback.format_exc())
|
QtWidgets.QMessageBox.information(None, "错误", traceback.format_exc())
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import shutil
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
def Add():
|
||||||
|
try:
|
||||||
|
shutil.copy(f"/tmp/{sys.argv[2]}.txt", f"/usr/share/uengine/appetc/{sys.argv[2]}.txt")
|
||||||
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
def Del():
|
||||||
|
try:
|
||||||
|
os.remove(f"/usr/share/uengine/appetc/{sys.argv[2]}.txt")
|
||||||
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
def Help():
|
||||||
|
print("帮助:")
|
||||||
|
print("-?/--help 查看程序帮助")
|
||||||
|
print("-a/--add 设置程序显示配置(参数后面要加包名,配置需要先保存到 /tmp 下,文件名为“APK包名.txt”,需要 Root 权限)")
|
||||||
|
print("-d/--del 删除程序显示配置(参数后面要加包名,需要 Root 权限)")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if len(sys.argv) < 3:
|
||||||
|
print("至少要三个参数,输入 --help 获取帮助")
|
||||||
|
sys.exit(0)
|
||||||
|
if "-?" in sys.argv[1] or "--help" in sys.argv:
|
||||||
|
Help()
|
||||||
|
sys.exit(0)
|
||||||
|
if os.geteuid() != 0:
|
||||||
|
print("不是以 root 权限运行本程序!")
|
||||||
|
sys.exit(1)
|
||||||
|
if sys.argv[1] == "-a" or sys.argv[1] == "--add":
|
||||||
|
Add()
|
||||||
|
sys.exit(0)
|
||||||
|
if sys.argv[1] == "-d" or sys.argv[1] == "--del":
|
||||||
|
Del()
|
||||||
|
sys.exit(0)
|
||||||
|
print("参数错误!")
|
||||||
|
sys.exit(1)
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 36 KiB |
@@ -2,8 +2,8 @@
|
|||||||
# 使用系统默认的 python3 运行
|
# 使用系统默认的 python3 运行
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
# 作者:gfdgd xi
|
# 作者:gfdgd xi
|
||||||
# 版本:1.6.1
|
# 版本:1.7.0
|
||||||
# 更新时间:2022年04月30日(五一了)
|
# 更新时间:2022年07月23日
|
||||||
# 感谢:anbox、deepin 和 统信
|
# 感谢:anbox、deepin 和 统信
|
||||||
# 基于 Python3 的 tkinter 构建
|
# 基于 Python3 的 tkinter 构建
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
@@ -19,67 +19,88 @@ import zipfile
|
|||||||
import traceback
|
import traceback
|
||||||
import threading
|
import threading
|
||||||
import subprocess
|
import subprocess
|
||||||
import ttkthemes
|
import PyQt5.QtGui as QtGui
|
||||||
import tkinter as tk
|
import PyQt5.QtCore as QtCore
|
||||||
import tkinter.ttk as ttk
|
import PyQt5.QtWidgets as QtWidgets
|
||||||
import tkinter.messagebox as messagebox
|
|
||||||
import tkinter.filedialog as filedialog
|
|
||||||
from getxmlimg import getsavexml
|
from getxmlimg import getsavexml
|
||||||
|
|
||||||
def FindApk():
|
def FindApk():
|
||||||
path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"])
|
path = QtWidgets.QFileDialog.getOpenFileName(widget, "选择 APK", json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"], "APK 可执行文件(*.apk);;所有文件(*.*)")
|
||||||
if path != "" and path != "()":
|
if path != "" and path != "()":
|
||||||
try:
|
try:
|
||||||
combobox1.set(path)
|
combobox1.setEditText(path[0])
|
||||||
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
|
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": os.path.dirname(path[0])})) # 写入配置文件
|
||||||
except:
|
except:
|
||||||
pass
|
traceback.print_exc()
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||||
|
|
||||||
|
class QT:
|
||||||
|
run = None
|
||||||
|
|
||||||
def BuildDeb():
|
def BuildDeb():
|
||||||
if combobox1.get() == "":
|
if combobox1.currentText() == "":
|
||||||
messagebox.showerror(title="提示", message="信息没有填写完整,无法继续打包 APK")
|
QtWidgets.QMessageBox.critical(None, "提示", "信息没有填写完整,无法继续打包 APK")
|
||||||
return
|
return
|
||||||
if not os.path.exists(combobox1.get()):
|
if not os.path.exists(combobox1.currentText()):
|
||||||
messagebox.showerror(title="提示", message="信息填写错误,无法继续打包 APK")
|
QtWidgets.QMessageBox.critical(None, "提示", "信息填写错误,无法继续打包 APK")
|
||||||
return
|
return
|
||||||
DisabledAndEnbled(True)
|
DisabledAndEnbled(True)
|
||||||
threading.Thread(target=GetBuildApkDebError, args=(combobox1.get(),)).start()
|
QT.run = BuildApkDeb(combobox1.currentText())
|
||||||
|
QT.run.signal.connect(TextboxAddText1)
|
||||||
|
QT.run.labelChange.connect(ChangeItems)
|
||||||
|
QT.run.tips.connect(TipsMessagebox)
|
||||||
|
QT.run.start()
|
||||||
|
|
||||||
def RunCommandShow(command):
|
class BuildApkDeb(QtCore.QThread):
|
||||||
TextboxAddText1("$> {}".format(command))
|
signal = QtCore.pyqtSignal(str)
|
||||||
TextboxAddText1(GetCommandReturn(command))
|
labelChange = QtCore.pyqtSignal(str)
|
||||||
|
tips = QtCore.pyqtSignal(str)
|
||||||
|
|
||||||
def GetBuildApkDebError(apkPath):
|
def __init__(self, apkPath) -> None:
|
||||||
try:
|
self.apkPath = apkPath
|
||||||
BuildApkDeb(apkPath)
|
super().__init__()
|
||||||
except:
|
|
||||||
traceback.print_exc()
|
|
||||||
messagebox.showerror(title="错误", message=traceback.format_exc())
|
|
||||||
DisabledAndEnbled(False)
|
|
||||||
|
|
||||||
def BuildApkDeb(apkPath):
|
def RunCommandShow(self, command):
|
||||||
tempPath = "/tmp/uengine-apk-builder-{}".format(int(random.randint(0, 1024)))
|
if command.replace(" ", "").replace("\n", "") == "":
|
||||||
RunCommandShow("echo '======================================New===================================='")
|
return
|
||||||
RunCommandShow("echo '创建目录'")
|
self.signal.emit("$> {}".format(command))
|
||||||
RunCommandShow("mkdir -pv '{}/DEBIAN'".format(tempPath))
|
res = subprocess.Popen([command], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
RunCommandShow("mkdir -pv '{}/usr/share/applications'".format(tempPath))
|
# 实时读取程序返回
|
||||||
RunCommandShow("mkdir -pv '{}/usr/share/uengine/apk'".format(tempPath))
|
while res.poll() is None:
|
||||||
RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
|
try:
|
||||||
RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
|
texts = res.stdout.readline().decode("utf8")
|
||||||
apkPackageName = GetApkPackageName(apkPath, False)
|
except:
|
||||||
if qianZhui.get():
|
texts = ""
|
||||||
apkPackageNameNew = GetApkPackageName(apkPath, True).lower()
|
print(texts, end="")
|
||||||
else:
|
self.signal.emit(texts)
|
||||||
apkPackageNameNew = GetApkPackageName(apkPath, False).lower()
|
# 已废弃
|
||||||
apkPackageVersion = GetApkVersion(apkPath)
|
# TextboxAddText1(GetCommandReturn(command))
|
||||||
if apkPackageVersion[0].upper() == "V":
|
|
||||||
package = list(apkPackageVersion)
|
def run(self):
|
||||||
package.pop(0)
|
try:
|
||||||
apkPackageVersion = "".join(package)
|
apkPath = self.apkPath
|
||||||
apkChineseLabel = GetApkChineseLabel(apkPath)
|
tempPath = "/tmp/uengine-apk-builder-{}".format(int(random.randint(0, 1024)))
|
||||||
apkActivityName = GetApkActivityName(apkPath)
|
self.RunCommandShow("echo '======================================New===================================='")
|
||||||
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageNameNew)
|
self.RunCommandShow("echo '创建目录'")
|
||||||
debControl = '''Package: {}
|
self.RunCommandShow("mkdir -pv '{}/DEBIAN'".format(tempPath))
|
||||||
|
self.RunCommandShow("mkdir -pv '{}/usr/share/applications'".format(tempPath))
|
||||||
|
self.RunCommandShow("mkdir -pv '{}/usr/share/uengine/apk'".format(tempPath))
|
||||||
|
self.RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
|
||||||
|
self.RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
|
||||||
|
apkPackageName = GetApkPackageName(apkPath, False)
|
||||||
|
if check.isChecked():
|
||||||
|
apkPackageNameNew = GetApkPackageName(apkPath, True).lower()
|
||||||
|
else:
|
||||||
|
apkPackageNameNew = GetApkPackageName(apkPath, False).lower()
|
||||||
|
apkPackageVersion = GetApkVersion(apkPath)
|
||||||
|
if apkPackageVersion[0].upper() == "V":
|
||||||
|
package = list(apkPackageVersion)
|
||||||
|
package.pop(0)
|
||||||
|
apkPackageVersion = "".join(package)
|
||||||
|
apkChineseLabel = GetApkChineseLabel(apkPath)
|
||||||
|
apkActivityName = GetApkActivityName(apkPath)
|
||||||
|
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageNameNew)
|
||||||
|
debControl = '''Package: {}
|
||||||
Version: {}
|
Version: {}
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Maintainer: {}
|
Maintainer: {}
|
||||||
@@ -87,7 +108,7 @@ Depends: deepin-elf-verify (>= 0.0.16.7-1), uengine (>= 1.0.1)
|
|||||||
Section: utils
|
Section: utils
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Description: {}\n'''.format(apkPackageNameNew, apkPackageVersion, apkChineseLabel, apkChineseLabel)
|
Description: {}\n'''.format(apkPackageNameNew, apkPackageVersion, apkChineseLabel, apkChineseLabel)
|
||||||
debPostinst = '''#!/bin/sh
|
debPostinst = '''#!/bin/sh
|
||||||
|
|
||||||
APK_DIR="/usr/share/uengine/apk"
|
APK_DIR="/usr/share/uengine/apk"
|
||||||
APK_NAME="{}"
|
APK_NAME="{}"
|
||||||
@@ -124,7 +145,7 @@ fi
|
|||||||
/usr/bin/uengine-session-launch-helper -- uengine install --apk="$APK_PATH"
|
/usr/bin/uengine-session-launch-helper -- uengine install --apk="$APK_PATH"
|
||||||
|
|
||||||
exit 0'''.format(apkPackageNameNew + ".apk", "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
exit 0'''.format(apkPackageNameNew + ".apk", "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
||||||
debPrerm = '''#!/bin/sh
|
debPrerm = '''#!/bin/sh
|
||||||
|
|
||||||
APP_NAME="{}"
|
APP_NAME="{}"
|
||||||
DESKTOP_FILE="{}"
|
DESKTOP_FILE="{}"
|
||||||
@@ -146,7 +167,7 @@ echo "Uninstalling $APP_NAME"
|
|||||||
/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"
|
/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"
|
||||||
|
|
||||||
exit 0'''.format(apkPackageName, "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
exit 0'''.format(apkPackageName, "/usr/share/applications/{}.desktop".format(apkPackageNameNew))
|
||||||
desktopFile = '''[Desktop Entry]
|
desktopFile = '''[Desktop Entry]
|
||||||
Categories=Other;
|
Categories=Other;
|
||||||
Exec=uengine launch --action=android.intent.action.MAIN --package={} --component={}
|
Exec=uengine launch --action=android.intent.action.MAIN --package={} --component={}
|
||||||
Icon=/usr/share/uengine/icons/{}.png
|
Icon=/usr/share/uengine/icons/{}.png
|
||||||
@@ -155,54 +176,63 @@ Type=Application
|
|||||||
GenericName={}
|
GenericName={}
|
||||||
Name={}
|
Name={}
|
||||||
'''
|
'''
|
||||||
#RunCommandShow("echo '{}' > '{}/DEBIAN/control'".format(debControl, tempPath))
|
#self.RunCommandShow("echo '{}' > '{}/DEBIAN/control'".format(debControl, tempPath))
|
||||||
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/control'".format(tempPath))
|
self.RunCommandShow("echo 正在写入文件:'{}/DEBIAN/control'".format(tempPath))
|
||||||
write_txt("{}/DEBIAN/control".format(tempPath), debControl)
|
write_txt("{}/DEBIAN/control".format(tempPath), debControl)
|
||||||
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/postinst'".format(tempPath))
|
self.RunCommandShow("echo 正在写入文件:'{}/DEBIAN/postinst'".format(tempPath))
|
||||||
write_txt("{}/DEBIAN/postinst".format(tempPath), debPostinst)
|
write_txt("{}/DEBIAN/postinst".format(tempPath), debPostinst)
|
||||||
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/prerm'".format(tempPath))
|
self.RunCommandShow("echo 正在写入文件:'{}/DEBIAN/prerm'".format(tempPath))
|
||||||
write_txt("{}/DEBIAN/prerm".format(tempPath), debPrerm)
|
write_txt("{}/DEBIAN/prerm".format(tempPath), debPrerm)
|
||||||
RunCommandShow("echo 正在写入文件:'/usr/share/applications/{}.desktop'".format(apkPackageNameNew))
|
self.RunCommandShow("echo 正在写入文件:'/usr/share/applications/{}.desktop'".format(apkPackageNameNew))
|
||||||
#write_txt("{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew), desktopFile)
|
#write_txt("{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew), desktopFile)
|
||||||
BuildUengineDesktop(apkPackageName, apkActivityName, apkChineseLabel, "/usr/share/uengine/icons/{}.png".format(apkPackageNameNew),
|
BuildUengineDesktop(apkPackageName, apkActivityName, apkChineseLabel, "/usr/share/uengine/icons/{}.png".format(apkPackageNameNew),
|
||||||
"{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew))
|
"{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageNameNew))
|
||||||
RunCommandShow("echo '复制文件'")
|
self.RunCommandShow("echo '复制文件'")
|
||||||
RunCommandShow("echo '写入 APK 软件图标'")
|
self.RunCommandShow("echo '写入 APK 软件图标'")
|
||||||
SaveApkIcon(apkPath, iconSavePath)
|
SaveApkIcon(apkPath, iconSavePath)
|
||||||
RunCommandShow("echo '复制 APK 文件'")
|
self.RunCommandShow("echo '复制 APK 文件'")
|
||||||
RunCommandShow("cp -rv '{}' '{}/usr/share/uengine/apk/{}.apk'".format(apkPath, tempPath, apkPackageNameNew))
|
self.RunCommandShow("cp -rv '{}' '{}/usr/share/uengine/apk/{}.apk'".format(apkPath, tempPath, apkPackageNameNew))
|
||||||
RunCommandShow("echo '正在设置文件权限……'")
|
self.RunCommandShow("echo '正在设置文件权限……'")
|
||||||
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
|
||||||
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
self.RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
|
||||||
RunCommandShow("echo '打包 deb 到桌面……'")
|
self.RunCommandShow("echo '打包 deb 到桌面……'")
|
||||||
RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
self.RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageNameNew, apkPackageVersion))
|
||||||
RunCommandShow("echo '正在删除临时目录……'")
|
self.RunCommandShow("echo '正在删除临时目录……'")
|
||||||
RunCommandShow("rm -rfv '{}'".format(tempPath))
|
self.RunCommandShow("rm -rfv '{}'".format(tempPath))
|
||||||
RunCommandShow("echo '完成!'")
|
self.RunCommandShow("echo '完成!'")
|
||||||
findApkHistory.append(apkPath)
|
findApkHistory.append(apkPath)
|
||||||
combobox1['value'] = findApkHistory
|
self.labelChange.emit("")
|
||||||
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
|
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
|
||||||
messagebox.showinfo(title="提示", message="打包完成")
|
DisabledAndEnbled(False)
|
||||||
DisabledAndEnbled(False)
|
self.tips.emit("打包完成")
|
||||||
|
|
||||||
|
except:
|
||||||
|
DisabledAndEnbled(False)
|
||||||
|
traceback.print_exc()
|
||||||
|
QtWidgets.QMessageBox.critical(widget, "错误", traceback.format_exc())
|
||||||
|
|
||||||
|
def TipsMessagebox(tips):
|
||||||
|
QtWidgets.QMessageBox.information(widget, "提示", tips)
|
||||||
|
|
||||||
|
def ChangeItems(self):
|
||||||
|
combobox1.clear()
|
||||||
|
combobox1.addItems(findApkHistory)
|
||||||
|
#combobox1.setEditText("")
|
||||||
|
|
||||||
def DisabledAndEnbled(choose):
|
def DisabledAndEnbled(choose):
|
||||||
userChoose = {True: tk.DISABLED, False: tk.NORMAL}
|
combobox1.setDisabled(choose)
|
||||||
a = userChoose[choose]
|
check.setDisabled(choose)
|
||||||
combobox1.configure(state=a)
|
button2.setDisabled(choose)
|
||||||
check.configure(state=a)
|
button3.setDisabled(choose)
|
||||||
button2.configure(state=a)
|
|
||||||
button3.configure(state=a)
|
|
||||||
|
|
||||||
# 需引入 subprocess
|
|
||||||
def GetCommandReturn(cmd):
|
|
||||||
# cmd 是要获取输出的命令
|
|
||||||
return subprocess.getoutput(cmd)
|
|
||||||
|
|
||||||
# 重启本应用程序
|
# 重启本应用程序
|
||||||
def ReStartProgram():
|
def ReStartProgram():
|
||||||
python = sys.executable
|
python = sys.executable
|
||||||
os.execl(python, python, * sys.argv)
|
os.execl(python, python, * sys.argv)
|
||||||
|
|
||||||
|
def GetCommandReturn(command):
|
||||||
|
return subprocess.getoutput(command)
|
||||||
|
|
||||||
# 获取用户主目录
|
# 获取用户主目录
|
||||||
def get_home():
|
def get_home():
|
||||||
return os.path.expanduser('~')
|
return os.path.expanduser('~')
|
||||||
@@ -343,9 +373,7 @@ def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
|
|||||||
|
|
||||||
def TextboxAddText1(message):
|
def TextboxAddText1(message):
|
||||||
global textbox1
|
global textbox1
|
||||||
textbox1.configure(state=tk.NORMAL)
|
textbox1.append(message)
|
||||||
textbox1.insert(tk.END,message + "\n")
|
|
||||||
textbox1.configure(state=tk.DISABLED)
|
|
||||||
|
|
||||||
# 获取用户桌面目录
|
# 获取用户桌面目录
|
||||||
def get_desktop_path():
|
def get_desktop_path():
|
||||||
@@ -377,7 +405,7 @@ if not lang in langFile.keys():
|
|||||||
information = json.loads(readtxt(programPath + "/information.json"))
|
information = json.loads(readtxt(programPath + "/information.json"))
|
||||||
version = information["Version"]
|
version = information["Version"]
|
||||||
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
|
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
|
||||||
iconPath = "{}/builer.png".format(os.path.split(os.path.realpath(__file__))[0])
|
iconPath = "{}/builer.svg".format(os.path.split(os.path.realpath(__file__))[0])
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# 加载配置
|
# 加载配置
|
||||||
@@ -397,7 +425,67 @@ findApkHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/F
|
|||||||
###########################
|
###########################
|
||||||
# 窗口创建
|
# 窗口创建
|
||||||
###########################
|
###########################
|
||||||
win = tk.Tk()
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
# 权重
|
||||||
|
size = QtWidgets.QSizePolicy()
|
||||||
|
size.setHorizontalPolicy(0)
|
||||||
|
widgetSize = QtWidgets.QSizePolicy()
|
||||||
|
widgetSize.setVerticalPolicy(0)
|
||||||
|
#
|
||||||
|
window = QtWidgets.QMainWindow()
|
||||||
|
widget = QtWidgets.QWidget()
|
||||||
|
widgetLayout = QtWidgets.QGridLayout()
|
||||||
|
combobox1 = QtWidgets.QComboBox()
|
||||||
|
label1 = QtWidgets.QLabel(langFile[lang]["Uengine Apk Builder"]["label1"])
|
||||||
|
button2 = QtWidgets.QPushButton(langFile[lang]["Uengine Apk Builder"]["button2"])
|
||||||
|
button3 = QtWidgets.QPushButton(langFile[lang]["Uengine Apk Builder"]["button3"])
|
||||||
|
textbox1 = QtWidgets.QTextBrowser()
|
||||||
|
frame2 = QtWidgets.QHBoxLayout()
|
||||||
|
check = QtWidgets.QCheckBox(langFile[lang]["Uengine Apk Builder"]["check"])
|
||||||
|
label1.setSizePolicy(size)
|
||||||
|
button2.setSizePolicy(size)
|
||||||
|
check.setSizePolicy(size)
|
||||||
|
button3.setSizePolicy(size)
|
||||||
|
combobox1.setEditable(True)
|
||||||
|
combobox1.addItems(findApkHistory)
|
||||||
|
combobox1.setEditText("")
|
||||||
|
button2.clicked.connect(FindApk)
|
||||||
|
button3.clicked.connect(BuildDeb)
|
||||||
|
widgetLayout.addWidget(label1, 0, 0, 1, 1)
|
||||||
|
widgetLayout.addWidget(combobox1, 0, 1, 1, 1)
|
||||||
|
widgetLayout.addWidget(button2, 0, 2, 1, 1)
|
||||||
|
widgetLayout.addLayout(frame2, 1, 0, 1, 3)
|
||||||
|
widgetLayout.addWidget(textbox1, 2, 0, 1, 3)
|
||||||
|
# 菜单栏
|
||||||
|
menu = window.menuBar()
|
||||||
|
programmenu = menu.addMenu(langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Name"])
|
||||||
|
exitProgram = QtWidgets.QAction(langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Menu"][0])
|
||||||
|
exitProgram.triggered.connect(window.close)
|
||||||
|
programmenu.addAction(exitProgram)
|
||||||
|
#
|
||||||
|
frame2.addWidget(check)
|
||||||
|
frame2.addWidget(button3)
|
||||||
|
widget.setLayout(widgetLayout)
|
||||||
|
window.setWindowTitle(title)
|
||||||
|
window.setCentralWidget(widget)
|
||||||
|
window.setWindowIcon(QtGui.QIcon(iconPath))
|
||||||
|
window.resize(window.frameSize().width() * 1.3, window.frameSize().height() * 1.1)
|
||||||
|
window.show()
|
||||||
|
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()
|
qianZhui = tk.BooleanVar()
|
||||||
|
|
||||||
@@ -422,9 +510,6 @@ textbox1.config(foreground='white', background='black')
|
|||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
combobox1.set(sys.argv[1])
|
combobox1.set(sys.argv[1])
|
||||||
# 设置窗口
|
# 设置窗口
|
||||||
style = ttkthemes.ThemedStyle(win)
|
|
||||||
style.set_theme("breeze")
|
|
||||||
#win.attributes('-alpha', 0.5)
|
|
||||||
win.title(title)
|
win.title(title)
|
||||||
win.resizable(0, 0)
|
win.resizable(0, 0)
|
||||||
win.iconphoto(False, tk.PhotoImage(file=iconPath))
|
win.iconphoto(False, tk.PhotoImage(file=iconPath))
|
||||||
|
|||||||