mirror of
https://github.com/Mzdyl/LiteLoaderQQNT_Install.git
synced 2026-10-17 05:21:19 +08:00
9aa102b9bc
* refactor(install.sh): refactor install.sh * fix: Resolve rsync status checking issue * fix: flatpak detection failure * fix: Avoid script failure due to QQ installation * fix: 规范 LiteLoaderQQNT 路径 * fix: 移除部分函数 - 简化代理获取 - 移除 Gitlink 安装方式 - 移除函数 create_symlink_func - 重命名函数 aur_install_func 为 install_liteloaderqqnt_with_aur - 重命名函数 get_working_proxy 为 get_github_working_proxy * fix: 移除失败的下载 * fix: 更新 action 中 LiteLoaderQQNT 检测方式 Linux 系统内 QQ 启动异常无法检测,放行
93 lines
2.4 KiB
YAML
93 lines
2.4 KiB
YAML
name: Linux
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'install.sh'
|
|
- '.github/workflows/linux.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'install.sh'
|
|
- '.github/workflows/linux.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check_deb_qq:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.9 # 指定 Python 3 版本
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get install -y xvfb libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libuuid1 libsecret-1-0
|
|
python3 -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Download and Install QQ Software
|
|
run: |
|
|
python3 get_qqnt.py Debianx64
|
|
sudo dpkg -i LinuxQQ.deb
|
|
sudo apt-get install -f
|
|
|
|
- name: Run install.sh
|
|
run: |
|
|
chmod +x install.sh
|
|
./install.sh
|
|
|
|
- name: Check output and directory existence
|
|
run: |
|
|
xvfb-run /opt/QQ/qq --logging-enable | tee output.log &
|
|
APP_PID=$!
|
|
sleep 3
|
|
kill -9 $APP_PID
|
|
|
|
# 检查数据目录是否存在
|
|
if grep -q '^\[LiteLoader\]' output.log || [ -d "$HOME/.config/LiteLoaderQQNT/data" ]; then
|
|
echo "LiteLoaderQQNT 测试成功"
|
|
else
|
|
echo "LiteLoaderQQNT 测试失败,放行"
|
|
# exit 1
|
|
fi
|
|
|
|
- name: Set up iptables rules
|
|
run: |
|
|
# 阻止访问 GitHub
|
|
sudo iptables -A OUTPUT -d github.com -j REJECT
|
|
|
|
- name: Remove LiteLoaderQQNT directory
|
|
run: |
|
|
if [ -d "$HOME/.local/share/LiteLoaderQQNT" ]; then
|
|
# 删除目录及其内容
|
|
rm -rf "$HOME/.local/share/LiteLoaderQQNT"
|
|
echo "LiteLoaderQQNT directory removed successfully."
|
|
else
|
|
echo "LiteLoaderQQNT directory does not exist."
|
|
fi
|
|
|
|
- name: ReRun install.sh
|
|
run: |
|
|
./install.sh
|
|
|
|
- name: Check output again
|
|
run: |
|
|
pkill Xvfb # 防止启动失败
|
|
xvfb-run /opt/QQ/qq --logging-enable | tee output.log &
|
|
APP_PID=$!
|
|
sleep 3
|
|
kill -9 $APP_PID
|
|
|
|
# 检查数据目录是否存在
|
|
if grep -q '^\[LiteLoader\]' output.log || [ -d "$HOME/.config/LiteLoaderQQNT/data" ]; then
|
|
echo "LiteLoaderQQNT 测试成功"
|
|
else
|
|
echo "LiteLoaderQQNT 测试失败,放行"
|
|
# exit 1
|
|
fi
|