From 08b01d272faedb50c6121019415f5b117739870e Mon Sep 17 00:00:00 2001 From: Divinesoumyadip Date: Wed, 4 Mar 2026 13:19:27 +0530 Subject: [PATCH 1/4] Fix encoding issues and typo in Windows development guide --- devel/Develop_on_Windows.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel/Develop_on_Windows.md b/devel/Develop_on_Windows.md index 353b90613f..f328898b72 100644 --- a/devel/Develop_on_Windows.md +++ b/devel/Develop_on_Windows.md @@ -21,14 +21,14 @@ - **chocolatey**: ```powershell - choco install xmake + choco install xmake ``` - Verify: ```powershell xmake --version ``` ## Step 2: Get Source Code, Compile and Run -### Chose your working directory, for example E:\TestFile: +### Choose your working directory, for example E:\TestFile: ```powershell cd E:\TestFile From 3804ec175385191759466b204723409d857f5db3 Mon Sep 17 00:00:00 2001 From: Divinesoumyadip Date: Wed, 4 Mar 2026 13:24:37 +0530 Subject: [PATCH 2/4] Fix code block formatting in macOS development guide --- devel/Develop_on_macOS.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/devel/Develop_on_macOS.md b/devel/Develop_on_macOS.md index c0087cedbb..8efc088670 100644 --- a/devel/Develop_on_macOS.md +++ b/devel/Develop_on_macOS.md @@ -3,34 +3,34 @@ This development guide is written for Mogan Research. Other components can also ## Step 1: Install xmake and xrepo For Homebrew users: -``` bash +```bash brew install xmake qt brew install pkg-config ``` Keep xrepo updated: -``` bash +```bash xrepo update-repo ``` ## Step 2: Configuration -``` bash +```bash xmake config -vD --yes ``` If you encounter Qt dependency issues, you can use this command to delete xmake's Qt global cache: -``` bash +```bash rm -rf ~/.xmake/cache ~/.xmake/packages/qt ``` If Qt cannot be found, you can manually specify the Qt path, for example: -``` bash +```bash xmake config --qt=/opt/homebrew/share/qt ``` Please adjust the Qt-related directory as needed; it may not necessarily be `/opt/homebrew/share/qt`. ## Step 3: Build -``` bash +```bash xmake build stem ``` @@ -38,9 +38,9 @@ xmake build stem Refer to [How to Test](Test_EN.md) ## Step 5: Launch Mogan STEM -``` bash +```bash xmake run stem ``` ## Please format code before committing -[Formatting Guide](Format_EN.md) \ No newline at end of file +[Formatting Guide](Format_EN.md) From c5a1d76b9297ab474e9dbb2b13cf8403feea6430 Mon Sep 17 00:00:00 2001 From: Divinesoumyadip Date: Wed, 4 Mar 2026 13:26:43 +0530 Subject: [PATCH 3/4] Fix code block formatting in Linux development guide --- devel/Develop_on_Linux.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/devel/Develop_on_Linux.md b/devel/Develop_on_Linux.md index 5555709bef..7a4c0239ea 100644 --- a/devel/Develop_on_Linux.md +++ b/devel/Develop_on_Linux.md @@ -5,17 +5,17 @@ On Debian or Debian derivatives: Since the project uses xmake to manage Qt, you need to remove the local Qt installation: -``` bash +```bash sudo apt remove qt6-base-dev qt6-base-dev-tools qmake6 ``` If you encounter Qt dependency issues, you can use this command to delete xmake's Qt global cache: -``` bash +```bash rm -rf ~/.xmake/cache ~/.xmake/packages/qt ``` Install xmake and related dependencies: -``` bash +```bash sudo apt install xmake sudo apt update @@ -23,14 +23,14 @@ sudo apt install -y gcc git 7zip unzip curl build-essential fonts-noto-cjk libcu ``` Keep xrepo updated: -``` bash +```bash xrepo update-repo ``` ### Step 2: Compile -vD shows detailed debug logs. Qt installation cache is located at: /home/username/.xmake/packages For example: /home/jiadong/.xmake/packages/q/qt6base/6.8.3/7c1ea54729db483fa6eee7744bd4a333 -``` bash +```bash xmake config --yes -vD xmake build stem ``` @@ -39,27 +39,27 @@ xmake build stem Refer to [How to Test](Test_EN.md) ### Step 4: Launch Mogan STEM -``` bash +```bash xmake run stem ``` ### In some case, clearing the cache may be necessary (eg., when manu bar disappears, etc.) Cache directory: -``` bash +```bash rm -rf ~/.cache/MoganLab ``` Runtime cache: -``` bash +```bash rm -rf ~/.local/share/moganlab ``` ### Using VSCode for code completion assistance Install VSCode, Clangd, and the Clangd extension for VSCode. Then execute the following command in the mogan folder: -``` bash +```bash xmake project -k compile_commands ``` This command will generate a compile_commands.json file in the mogan folder. Clangd reads this file to understand the project's structure, thereby avoiding errors related to missing header files. ## Please format code before committing -[Formatting Guide](Format_EN.md) \ No newline at end of file +[Formatting Guide](Format_EN.md) From 8bbb0de157b7e9d44780ab73e3672694df93a82e Mon Sep 17 00:00:00 2001 From: Divinesoumyadip Date: Wed, 4 Mar 2026 13:32:13 +0530 Subject: [PATCH 4/4] Fix code block formatting in code formatting guide --- devel/Format_EN.md | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/devel/Format_EN.md b/devel/Format_EN.md index cf8099d955..51cd42372b 100644 --- a/devel/Format_EN.md +++ b/devel/Format_EN.md @@ -1,46 +1,56 @@ # Code Formatting Guide ## Environment Setup + Requires clang-format version 19.1.x. ### Linux + Install via apt: -``` +```bash sudo apt install clang-format-19 ``` + After restarting the terminal, verify: -``` +```bash clang-format-19 --version ``` ### macOS + Note: should match LLVM 19. + Install via Homebrew: -``` +```bash brew install llvm@19 ``` + Add to your ~/.zshrc: -``` +```bash # set clang-format to version 19 export PATH="$(brew --prefix llvm@19)/bin:$PATH" ``` + Restart the terminal and verify: -``` +```bash clang-format --version ``` ### Windows + Install via scoop: -``` +```bash scoop install llvm@19.1.0 ``` + Restart the terminal and verify: -``` +```bash clang-format --version ``` ## Using the script + From the repository root, run: -``` +```shell elvish bin/format -``` \ No newline at end of file +```