Skip to content

Conversation

@Cyrillya
Copy link
Collaborator

@Cyrillya Cyrillya commented Nov 2, 2025

概述

通过git的submodule功能来管理SilkyUIFramework和SilkyUIAnalyzer引用

对于已克隆并配置好平行目录下的SilkyUIFramework和SilkyUIAnalyzer项目的开发者来说,并不需要作出任何更改

对于该仓库的克隆和配置依旧可以使用之前的方法,即分别克隆ImproveGame、SilkyUIFramework和SilkyUIAnalyzer,但该PR提供了一种更方便的配置方案:

在Git Bash或终端中运行以下命令:

git clone --recurse-submodules https://github.com/ForOne-Club/ImproveGame.git
cd ImproveGame
.\CreateLinks.bat

即通过 --recurse-submodules 克隆该仓库以及连接到的子仓库,并通过 CreateLinks.bat 批处理文件创建文件链接。以上命令执行后,可以直接打开 .sln 文件编译

有什么好处?

使初次克隆更加方便,因为不再需要分别克隆三个仓库,且自动连接到SilkyUIFramework的preview分支,不用自己选了

对于任何想要克隆仓库下来用于学习的(如果有的话?),他们不会被搞得一头雾水了

有什么坏处?

由于把SilkyUIFramework和SilkyUIAnalyzer都放到了ImproveGame下,这两个文件夹里的fx文件也会被紫幽ModBuilder识别并编译成xnb文件,导致一些重名fx冲突。解决方法或许只有fork紫幽的ModBuilder项目,然后添加一个“排除某些文件夹下的资源文件”的功能

@Cyrillya Cyrillya marked this pull request as draft November 2, 2025 07:57
@Cyrillya Cyrillya requested a review from Copilot November 2, 2025 09:11
@Cyrillya Cyrillya marked this pull request as ready for review November 2, 2025 09:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces Git submodule management for the SilkyUIFramework and SilkyUIAnalyzer dependencies, simplifying the initial repository setup process. Instead of manually cloning three separate repositories, developers can now use a single command with --recurse-submodules to clone everything at once.

Key Changes:

  • Added Git submodules for SilkyUIFramework and SilkyUIAnalyzer with automated cloning
  • Created CreateLinks.bat script to establish symbolic links between submodules and parent directory
  • Updated asset references from ModAsset.SDFRectangle to ModAsset.UIFramework_SDFRectangle and similar naming changes

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.gitmodules Configures Git submodules for SilkyUIFramework (preview branch) and SilkyUIAnalyzer
CreateLinks.bat Batch script to create symbolic links from submodules to parent directory
README.md Added Chinese documentation for cloning with submodules
README-en.md Added English documentation for cloning with submodules
ImproveGame.csproj Excluded submodule directories from build process
UIFramework/Graphics2D/SDFRectangle.cs Updated asset reference naming convention
UIFramework/Graphics2D/SDFGraphics.Utils.cs Updated asset reference naming convention
UIFramework/BlurHelper.cs Updated asset reference naming convention
SilkyUIFramework Added submodule at commit d35a648
SilkyUIAnalyzer Added submodule at commit 660ac5b
Comments suppressed due to low confidence (1)

CreateLinks.bat:1

  • The batch script lacks error handling. If symbolic links already exist, mklink will fail but the script continues without informing the user of the problem. Consider adding checks to verify if links already exist before attempting creation, and provide appropriate feedback messages.
@echo off

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@487666123
Copy link
Owner

  • 项目构建此前已经编写了教程,且提供可直接复制的命令
  • SilkyUI 的两个项目位于平行文件夹下可以方便其他模组引用,他并不是为 qot 单独设计的
  • 虽然确实简单了点,但是只方便了首次,如果其他模组引用,还需要使用相同方式,或者依旧需要平行目录下克隆一份,并且后续开发体验 VS、Rider、VSCode 几乎没有差别。

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.

3 participants