Skip to content

Commit

Permalink
Fix: <details> not being rendered, solved it with gettalong/kramdown#…
Browse files Browse the repository at this point in the history
  • Loading branch information
RemRemRemRe authored and RemRemRemRe committed Dec 7, 2024
1 parent dcfd474 commit 020332e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ finish
> Because only subdirectories can be specified in the `.uprojectdirs` file, if you want projects in external directories to be included in the solution file, you can use the `symbol-link` functionality provided by the system
{: .prompt-tip }

<details>
<summary>Deprecated</summary>
<details markdown=1>

<summary markdown="span">Deprecated</summary>

## Original intention

Expand All @@ -26,36 +27,49 @@ For working and studying purpose, I have multiple Unreal Projects on my computer
By default, each project file is a stand-alone solution file generated by **UBT(Unreal Build Tool)**

This brings me some problems:

- Due to the high cost of opening a solution, the waiting time and memory footprint may get multiplied when opening multiple solutions at the same time

- When the IDE is bugged, or the engine code is updated and triggering "**symbol reparsing**", It takes at least 15 minutes to boot up, which is really a torture

I think that different project solutions should treat the project with same physical path as **the same project**, the Unreal Engine project file should not be re-parsed in each solution

But both of the `Rider` and `Visual Studio` (the most powerful IDE of the universe;) will get it re-parsed in every solution. It is very tortuous and makes me confused, hoping some expert could explain the reason behind this

## Demand

So I was thinking: since these IDEs are "stupid" and unreliable, could I find a way to manually combine multiple solutions into one?

## Steps

I am sharing the steps to accomplish the job using `Rider`:

1. Among the solutions that you want to open together, choose the one you like as the **main solution**, open it up

2. Add other project files

- In `Explorer`, the solution browser, right-click any project folder, such as`Games`, select `Add`, `Add Existing Project...`, and choose the relative project file

- Assuming we are adding the `LyraStarterGame` project, then these files should locate at `LyraStarterGame_Folder\\Intermediate\\ProjectFiles\\LyraStarterGame.vcxproj`

3. **In "Solution Configuration", modify the configuration of the project just added**

- in the toolbar of the upper right corner, click `DebugGameEditor | Win64` button (this is my `Solution Configuration`, the text of the button would be different according to your configuration), and select `Edit Solution Configurations...`

- find the project just added, you should notice that they are default configured as something like `DebugClient | Arm64`, change it to what you need, generally it should be the same as `Solution Configuration`

4. **Modify the project file parameter**

- back to `Explorer`, the solution browser

- right-click the project just added (again, using `LyraStarterGame` as an example), select `Edit`, `Edit LyraStarterGame.vcxproj`

- replace all the `$(SolutionDir)` with `$(ProjectDir)..\\..\\` in `LyraStarterGame.vcxproj` (`$(SolutionDir)` is **the root path of current solution**, `$(ProjectDir)` is **the root path of current project file**, which is `LyraStarterGame_Folder\\Intermediate\\ProjectFiles\\`, using `..\\` twice, we get **the root path of current project**)

- if you don't want to replace all of them at once, searching your "`build configuration`" such as `DebugGame_Editor|x64`, find the relevant configuration, you can only replace the text within the three `NMake` command lines, **but probably encounter some problems because of can not parse the project file correctly**: for example `Switch Header/Source` is not working, grammar coloring is broken. If so, do a full replacement should solve the problem

## Limitation

Every time the project file is regenerated, the relative file would be overriden and the steps above need to be re-done. If any IDE could support this or having a tool to automated this, life would be much easier

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ lang: zh_CN
> 因为`.uprojectdirs`文件中只支持指定子目录,若想要外部目录的工程也被包含进解决方案文件,可以使用系统提供的`symbol-link`功能
{: .prompt-tip }

<details>
<summary>已废弃方法</summary>
<details markdown=1>

<summary markdown="span">已废弃方法</summary>

## 初衷

Expand All @@ -26,7 +27,9 @@ lang: zh_CN
它们的工程文件默认都是由**UBT(Unreal Build Tool)**生成的,独立的解决方案文件

这给我带来的一些问题:

- 由于打开解决方案的成本较高,同时打开多个解决方案时的等待时间,内存占用可能都是成倍增加的

- 在IDE抽风,或者引擎代码更新而触发符号**重新解析**的时候,等待时间少则15分钟起步,那叫一个折磨

我认为不同解决方案中,物理路径相同的工程,应该视为**同一个工程**,虚幻引擎的工程不应该在每个解决方案都重新解析一遍
Expand All @@ -44,17 +47,25 @@ lang: zh_CN
1. 在想要多开的解决方案中,随意选择一个作为"**主解决方案**",并打开

2. 添加其它工程文件

-`Explorer`解决方案浏览器中,右键任意工程文件夹,比如`Games`,选择`Add`,`Add Existing Project...`,然后选择相关的工程文件

- 假如要添加的工程是`LyraStarterGame`,那么它的工程文件应该位于`LyraStarterGame_Folder\\Intermediate\\ProjectFiles\\LyraStarterGame.vcxproj`

3. **在"解决方案配置"中,修改刚刚添加的工程的配置**

- 点击右上角的工具栏中的`DebugGameEditor | Win64`按钮(这是我的``解决方案编译配置``,根据你的实际情况,文字会有所不同),然后选择`Edit Solution Comfigurations...`

- 找到刚刚添加的工程,可以看到它们当前都是默认的配置,可能是`DebugClient | Arm64`什么的,把它改成你需要的配置,一般是与`解决方案编译配置`一致

4. **修改工程文件参数**

- 回到`Explorer`解决方案浏览器

- 右键刚刚添加的工程(这里我拿`LyraStarterGame`举例),选择`Edit`,`Edit LyraStarterGame.vcxproj`

-`LyraStarterGame.vcxproj`文件中所有`$(SolutionDir)`替换为`$(ProjectDir)..\\..\\` (`$(SolutionDir)`**当前解决方案的根目录**,`$(ProjectDir)`**当前工程的工程文件所在目录**,即`LyraStarterGame_Folder\\Intermediate\\ProjectFiles\\`,所以这里使用两次`..\\`,获得了**当前工程的根目录**)

- 如果不想一次性全都替换,也可以搜索你的"`编译配置`",比如 `DebugGame_Editor|x64`,找到对应编译配置的相关配置,只替换三个`NMake`相关的命令行中的文本,**但可能会存在工程文件无法正常解析符号的问题**:比如`Switch Header/Source`功能无法使用,语法着色失效等,如遇到问题,进行全量替换即可

## 不足
Expand Down

0 comments on commit 020332e

Please sign in to comment.