Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support linglong(玲珑) #187

Merged
merged 4 commits into from
Dec 26, 2024
Merged

Conversation

jbwfu
Copy link
Collaborator

@jbwfu jbwfu commented Dec 26, 2024

close #184

Summary by Sourcery

在安装脚本中添加对Linglong包管理器的支持,以增强LiteLoaderQQNT的脚本,使其更稳健地处理多种安装方法。

新功能:

  • 添加使用Linglong包管理器安装LiteLoaderQQNT的支持。

增强功能:

  • 改进安装脚本,以更稳健地处理不同的安装方法,包括Linglong、Flatpak和AUR。
Original summary in English

Summary by Sourcery

Add support for Linglong package manager in the installation script for LiteLoaderQQNT, enhancing the script to handle multiple installation methods more robustly.

New Features:

  • Add support for installing LiteLoaderQQNT using the Linglong package manager.

Enhancements:

  • Improve the installation script to handle different installation methods more robustly, including Linglong, Flatpak, and AUR.

Copy link
Contributor

sourcery-ai bot commented Dec 26, 2024

审核指南由 Sourcery 提供

此拉取请求增加了对 Linglong 安装方法的支持,增强了路径处理和补丁逻辑,改进了日志记录,并重构了安装脚本以提高清晰度和效率。

Linglong QQ 安装过程的序列图

sequenceDiagram
    participant User
    participant Script
    participant LingLong
    participant QQ

    User->>Script: 运行安装脚本
    Script->>LingLong: 检查 ll-cli 命令
    LingLong-->>Script: 命令存在
    Script->>LingLong: 获取 QQ 版本信息
    LingLong-->>Script: 返回版本
    Script->>Script: 设置 QQ_PATH 和路径
    Script->>Script: 安装 LiteLoaderQQNT
    Script->>Script: 补丁资源
    Script->>Script: 安装插件商店
    Script-->>User: 安装完成
Loading

安装路径检测和补丁的状态图

stateDiagram-v2
    [*] --> CheckInstallMethod
    CheckInstallMethod --> AUR: 是 AUR
    CheckInstallMethod --> Flatpak: 是 Flatpak
    CheckInstallMethod --> Linglong: 是 Linglong
    CheckInstallMethod --> Traditional: 是传统方法

    AUR --> PathDetection
    Flatpak --> PathDetection
    Linglong --> PathDetection
    Traditional --> PathDetection

    PathDetection --> AlreadyPatched: 路径在 patched_paths 中
    PathDetection --> NeedsPatching: 路径未补丁

    NeedsPatching --> InstallAndPatch
    InstallAndPatch --> [*]
    AlreadyPatched --> [*]
Loading

文件级别更改

更改 详情 文件
增加对 Linglong 安装方法的支持
  • 引入了一个新函数 install_for_linglong_qq 来处理 Linglong 安装
  • 修改了 get_liteloaderqqnt_path 以适应 Linglong 路径结构
  • 更新了安装流程以包括 Linglong 方法
install.sh
增强路径处理和补丁逻辑
  • 添加了 check_path_is_patched 函数以避免冗余补丁
  • 更新了设置 LITELOADERQQNT_DIR 和处理默认路径的逻辑
install.sh
改进日志记录和安装反馈
  • 更改了成功安装的日志消息
  • 添加了跳过已补丁路径的日志消息
install.sh
重构和清理安装脚本
  • 移除了冗余的 unset 命令
  • 重新组织了安装步骤以提高清晰度
install.sh

针对关联问题的评估

问题 目标 是否解决 解释
#184 增加对在 Deepin Linux 上通过 Linglong 包管理器安装的 QQ 的支持

提示和命令

与 Sourcery 互动

  • 触发新审核: 在拉取请求上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审核评论。
  • 从审核评论生成 GitHub 问题: 通过回复审核评论请求 Sourcery 从中创建问题。
  • 生成拉取请求标题: 在拉取请求标题的任何地方写 @sourcery-ai 以随时生成标题。
  • 生成拉取请求摘要: 在拉取请求正文的任何地方写 @sourcery-ai summary 以随时生成 PR 摘要。您也可以使用此命令指定摘要应插入的位置。

自定义您的体验

访问您的仪表板以:

  • 启用或禁用审核功能,如 Sourcery 生成的拉取请求摘要、审核指南等。
  • 更改审核语言。
  • 添加、删除或编辑自定义审核说明。
  • 调整其他审核设置。

获取帮助

Original review guide in English

Reviewer's Guide by Sourcery

This pull request adds support for the Linglong installation method, enhances path handling and patching logic, improves logging, and refactors the installation script for better clarity and efficiency.

Sequence diagram for Linglong QQ installation process

sequenceDiagram
    participant User
    participant Script
    participant LingLong
    participant QQ

    User->>Script: Run install script
    Script->>LingLong: Check ll-cli command
    LingLong-->>Script: Command exists
    Script->>LingLong: Get QQ version info
    LingLong-->>Script: Return version
    Script->>Script: Set QQ_PATH and paths
    Script->>Script: Install LiteLoaderQQNT
    Script->>Script: Patch resources
    Script->>Script: Install plugin store
    Script-->>User: Installation complete
Loading

State diagram for installation path detection and patching

stateDiagram-v2
    [*] --> CheckInstallMethod
    CheckInstallMethod --> AUR: is AUR
    CheckInstallMethod --> Flatpak: is Flatpak
    CheckInstallMethod --> Linglong: is Linglong
    CheckInstallMethod --> Traditional: is Traditional

    AUR --> PathDetection
    Flatpak --> PathDetection
    Linglong --> PathDetection
    Traditional --> PathDetection

    PathDetection --> AlreadyPatched: path in patched_paths
    PathDetection --> NeedsPatching: path not patched

    NeedsPatching --> InstallAndPatch
    InstallAndPatch --> [*]
    AlreadyPatched --> [*]
Loading

File-Level Changes

Change Details Files
Added support for Linglong installation method
  • Introduced a new function install_for_linglong_qq to handle Linglong installation
  • Modified get_liteloaderqqnt_path to accommodate Linglong path structure
  • Updated installation flow to include Linglong method
install.sh
Enhanced path handling and patching logic
  • Added check_path_is_patched function to avoid redundant patching
  • Updated logic to set LITELOADERQQNT_DIR and handle default paths
install.sh
Improved logging and installation feedback
  • Changed log message for successful installation
  • Added log messages for skipping already patched paths
install.sh
Refactored and cleaned up installation script
  • Removed redundant unset commands
  • Reorganized installation steps for clarity
install.sh

Assessment against linked issues

Issue Objective Addressed Explanation
#184 Add support for QQ installed via Linglong package manager on Deepin Linux

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbwfu - 我已经审查了你的更改,它们看起来很棒!

这是我在审查期间查看的内容
  • 🟢 一般问题:一切看起来都很好
  • 🟢 安全性:一切看起来都很好
  • 🟢 测试:一切看起来都很好
  • 🟢 复杂性:一切看起来都很好
  • 🟢 文档:一切看起来都很好

Sourcery 对开源项目免费 - 如果你喜欢我们的审查,请考虑分享它们 ✨
帮助我变得更有用!请在每条评论上点击 👍 或 👎,我将使用反馈来改进你的审查。
Original comment in English

Hey @jbwfu - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@8MiYile
Copy link
Contributor

8MiYile commented Dec 26, 2024

我嘞个大牛啊

@jbwfu jbwfu merged commit d2e3663 into Mzdyl:main Dec 26, 2024
5 checks passed
@jbwfu jbwfu deleted the feature/support-linglong branch December 26, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deepin Linux 玲珑打包的QQ问题
2 participants