#!/bin/sh 
# 使用 pip 安装所需库
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
# 建立软链接
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-app-uninstall            /usr/bin/uengine-app-uninstall
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-app-install              /usr/bin/uengine-app-install
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-clean                    /usr/bin/uengine-clean
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-about             /usr/bin/uengine-runner-about
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-keyboard                 /usr/bin/uengine-keyboard
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-useadb                   /usr/bin/uengine-useadb
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-launch.sh         /usr/bin/uengine-runner-launch.sh
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug        /usr/bin/uengine-runner-update-bug
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/root-uengine                     /usr/bin/uengine-root
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-applist-launch.sh /usr/bin/uengine-runner-applist-launch.sh
# 刷新图标缓存
# 因为 Ubuntu 的问题，省略
gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true
# 向服务器返回安装数加1（不显示内容且忽略错误）
curl https://304626p927.goho.co/uengine-runner/Install.php?Version=1.8.1-1 -s > /dev/null | true
