mirror of
https://github.com/Mzdyl/LiteLoaderQQNT_Install.git
synced 2026-10-21 00:46:15 +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 启动异常无法检测,放行
96 lines
2.8 KiB
YAML
96 lines
2.8 KiB
YAML
name: macOS
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'install.sh'
|
|
- '.github/workflows/macOS.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'install.sh'
|
|
- '.github/workflows/macOS.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
check_macos_qq:
|
|
runs-on: macos-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: |
|
|
python3 -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Download and Install QQ Software
|
|
run: |
|
|
python3 get_qqnt.py Macos
|
|
hdiutil attach QQ.dmg
|
|
cp -R /Volumes/QQ/QQ.app /Applications
|
|
hdiutil detach /Volumes/QQ
|
|
open /Applications/QQ.app/ &
|
|
|
|
- name: Run install.sh
|
|
run: |
|
|
chmod +x install.sh
|
|
./install.sh
|
|
|
|
- name: Run QQ on macOS, wait, and check LiteLoaderQQNT
|
|
run: |
|
|
/Applications/QQ.app/Contents/MacOS/QQ & # 启动 QQ,放入后台
|
|
sleep 3 # 等待 3 秒
|
|
|
|
# 关闭 QQ 应用程序,这里使用 pkill 假设 QQ 进程的名字为 QQ
|
|
pkill QQ
|
|
|
|
# 检查 LiteLoaderQQNT 插件是否存在
|
|
if [ -d "$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT/data" ]; then
|
|
echo "LiteLoaderQQNT data folder exists. Test succeeded."
|
|
else
|
|
echo "LiteLoaderQQNT data folder does not exist. Test failed."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Set up iptables rules
|
|
run: |
|
|
# 阻止访问 GitHub
|
|
echo "127.0.0.1 github.com" | sudo tee -a /etc/hosts
|
|
echo "127.0.0.1 api.github.com" | sudo tee -a /etc/hosts
|
|
|
|
- name: Remove LiteLoaderQQNT directory
|
|
run: |
|
|
if [ -d "$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT" ]; then
|
|
# 删除目录及其内容
|
|
rm -rf "$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT"
|
|
echo "LiteLoaderQQNT directory removed successfully."
|
|
else
|
|
echo "LiteLoaderQQNT directory does not exist."
|
|
fi
|
|
|
|
- name: ReRun install.sh
|
|
run: |
|
|
./install.sh
|
|
|
|
- name: Check LiteLoader
|
|
run: |
|
|
/Applications/QQ.app/Contents/MacOS/QQ & # 启动 QQ,放入后台
|
|
sleep 3 # 等待 3 秒
|
|
|
|
# 关闭 QQ 应用程序,这里使用 pkill 假设 QQ 进程的名字为 QQ
|
|
pkill QQ
|
|
|
|
# 检查 LiteLoaderQQNT 插件是否存在
|
|
if [ -d "$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT/data" ]; then
|
|
echo "LiteLoaderQQNT data folder exists. Test succeeded."
|
|
else
|
|
echo "LiteLoaderQQNT data folder does not exist. Test failed."
|
|
exit 1
|
|
fi
|