基本完工
This commit is contained in:
@@ -298,7 +298,7 @@ class UEngine:
|
||||
if not os.path.exists:
|
||||
os.mkdir("/tmp/uengine-runner")
|
||||
File("/tmp/uengine-runner/install.sh").write("sudo dpkg -i /tmp/uengine-runner/u*.deb\nsudo apt install -f")
|
||||
os.system("wget -P '/tmp/uengine-runner' 'https://hub.fastgit.org/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'")
|
||||
os.system("wget -P '/tmp/uengine-runner' 'https://hub.fastgit.xyz/gfdgd-xi/uengine-runner/releases/download/U1.2.15/uengine-android-image_1.2.15_amd64.deb' && pkexec bash '/tmp/uengine-runner/install.sh'")
|
||||
class Services:
|
||||
def Open():
|
||||
os.system("pkexec systemctl enable uengine-container uengine-session && systemctl start uengine-container uengine-session")
|
||||
@@ -319,6 +319,12 @@ class UEngine:
|
||||
os.system("pkexec uengine-bridge.sh force-reload")
|
||||
|
||||
class Adb:
|
||||
def __init__(self, ip=""):
|
||||
self.ip = ip
|
||||
|
||||
def connect(self):
|
||||
os.system(f"adb connect {self.ip}")
|
||||
|
||||
class Service:
|
||||
def Open():
|
||||
os.system("adb start-server")
|
||||
@@ -327,6 +333,12 @@ class Adb:
|
||||
def Kill():
|
||||
os.system("killall adb")
|
||||
|
||||
def boolAndroidInstallOtherAppSetting(self):
|
||||
return subprocess.getoutput(f"adb -s {self.ip} shell settings get secure install_non_market_apps").replace(" ", "") == "1"
|
||||
|
||||
def setAndroidInstallOtherAppSetting(self, op: bool):
|
||||
os.system(f"adb -s {self.ip} shell settings put secure install_non_market_apps {int(op)}")
|
||||
|
||||
class File:
|
||||
def __init__(self, filePath):
|
||||
self.filePath = filePath
|
||||
@@ -350,7 +362,11 @@ class UengineRunner:
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("本 API 不支持直接运行,请通过引入的方式使用此 API")
|
||||
quit()
|
||||
#adb = Adb("192.168.250.2:5555")
|
||||
#print(adb.boolAndroidInstallOtherAppSetting())
|
||||
|
||||
#quit()
|
||||
|
||||
if not ROOT.GetRoot():
|
||||
print("请获取 ROOT 权限以便更好的使用该 API")
|
||||
pass
|
||||
#print("请获取 ROOT 权限以便更好的使用该 API")
|
||||
Binary file not shown.
@@ -28,6 +28,7 @@
|
||||
"※3、新增加了 UEngine 的 Ubuntu 安装程序",
|
||||
"※4、双包合一,只保留了UOS打包标准,可以从旧标准无缝升级(推荐使用本程序的升级程序进行升级)",
|
||||
"5、修复了本程序在 Ubuntu 上安装和卸载报错而无法继续的问题",
|
||||
"6、优化帮助/关于窗口在高分辨率电脑上显示不全的问题",
|
||||
"V1.6.1:",
|
||||
"※1、修复了打包 deb 包在 APK 的包名有大写时无法启动的问题",
|
||||
"※2、提供新版本的 UEngine Root 镜像",
|
||||
@@ -164,6 +165,6 @@
|
||||
"柚子<https://gitee.com/Limexb>",
|
||||
"为什么您不喜欢熊出没和阿布呢<https://weibo.com/u/7755040136>",
|
||||
"星空露光<https://gitee.com/Cynorkyle>",
|
||||
"shenmo"
|
||||
"shenmo<jifengshenmo@outlook.com>"
|
||||
]
|
||||
}
|
||||
@@ -28,6 +28,7 @@ cp /tmp/uengine/run_daemon.sh $HOME/uengine-launch
|
||||
cp /tmp/uengine/launch_uengine.sh $HOME/uengine-launch
|
||||
cd /tmp/uengine
|
||||
/tmp/uengine/install.sh
|
||||
sudo apt install -y libkf5globalaccel5 libqt5multimedia5 libqt5sensors5 libegl1-mesa-dev
|
||||
echo "重启后在$HOME/uengine-launch执行launch_uengine.sh即可打开uengine守护进程。随后即可安装和使用安卓应用"
|
||||
echo "你需要在每次启动安卓应用之前打开这个脚本。打开后可安全关闭"
|
||||
echo "按回车重启"
|
||||
|
||||
@@ -1351,7 +1351,7 @@ if not os.path.exists("/usr/bin/uengine"):
|
||||
sys.exit(0)
|
||||
# 非 Deepin/UOS 用户
|
||||
else:
|
||||
if messagebox.askyesno(title="提示", message="您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会使用 shenmo 提供的脚本进行安装\n安装完后重新启动该程序即可"):
|
||||
if messagebox.askyesno(title="提示", message="您的电脑没有安装 UEngine,是否安装 UEngine 以便更好的使用\n这里将会使用 shenmo 提供的脚本进行安装\n安装完后重新启动该程序即可\n提示:无法保证此安装脚本安装的 UEngine 可以使用"):
|
||||
os.system(f"deepin-terminal -C \"bash '{programPath}/uengine-installer'\"")
|
||||
sys.exit(0)
|
||||
# 重新显示窗口
|
||||
|
||||
@@ -16,8 +16,8 @@ else
|
||||
deepin-terminal -C "pkexec apt install uengine"
|
||||
fi
|
||||
else
|
||||
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装"
|
||||
zenity --question --text="您还未安装 UEngine,是否现在安装?\n将会使用 shenmo 提供的脚本进行安装" --no-wrap
|
||||
echo "非 Deepin/UOS 系统,使用 shenmo 提供的脚本安装\n暂未保证此安装脚本一定安装成功"
|
||||
zenity --question --text="您还未安装 UEngine,是否现在安装?\n将会使用 shenmo 提供的脚本进行安装\n暂未保证此安装脚本一定安装成功" --no-wrap
|
||||
if [[ $? = 0 ]]; then
|
||||
deepin-terminal -C "bash /opt/apps/com.gitee.uengine.runner.spark/files/uengine-installer"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user