vault backup: 2025-05-05 10:27:11
Affected files: 21.02. Windows/msys2.md 22.01. 軟體工具、設定/Visual Stuio Code + Msys2.md attachments/20250505_101259_SystemPropertiesAdvanced_839x208.png attachments/20250505_101427_SystemPropertiesAdvanced_677x633.png attachments/20250505_101709_chrome_844x478.png attachments/20250505_101809_Obsidian_267x313.png
This commit is contained in:
@@ -6,7 +6,34 @@ time: 10:08:21
|
|||||||
description:
|
description:
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# Install Msys2
|
||||||
|
根據[MSYS2](https://www.msys2.org/)官方頁面來下載並安裝最新的版本。
|
||||||
|
基本上都只要下一步即可。
|
||||||
|
|
||||||
|
## 設定 `MSYS2_HOME` 環境變數
|
||||||
|
把 Msys2 的 安裝路徑設為環境變數可以讓以後的設定更有彈性。如下:
|
||||||
|
![[20250505_101259_SystemPropertiesAdvanced_839x208.png]]
|
||||||
|
|
||||||
|
## 設定 `path` 環境變數
|
||||||
|
在 `path` 環境變數中新增 Msys2 的 bin 路徑,如下:
|
||||||
|
![[20250505_101427_SystemPropertiesAdvanced_677x633.png]]
|
||||||
|
|
||||||
# 參考來源
|
# 用 Msys2 安裝開發工具
|
||||||
|
根據[Environments - MSYS2](https://www.msys2.org/docs/environments/#__tabbed_1_1),Msys2 提供多種開發環境。我們使用 UCRT64。
|
||||||
|
![[20250505_101709_chrome_844x478.png]]
|
||||||
|
|
||||||
|
## 安裝 UCRT64 開發環境
|
||||||
|
打開 UCRT64 terminal
|
||||||
|
![[20250505_101809_Obsidian_267x313.png]]
|
||||||
|
然後輸入`pacman -Syy --needed base-devel mingw-w64-ucrt-x86_64-toolchain`,之後都輸入`Y`來接受所有安裝。
|
||||||
|
|
||||||
|
# 用 Msys2 安裝工具
|
||||||
|
用 `pacman -Syy <TOOL_NAME>` 就可以安裝工具,例如:
|
||||||
|
```shell
|
||||||
|
pacman -Syy zsh git
|
||||||
|
```
|
||||||
|
|
||||||
|
# 參考來源
|
||||||
|
- [Windows 命令行相关配置之 msys2+zsh+zi](https://sansui233.github.io/posts/windows-zsh-conf)
|
||||||
|
- [在Windows上使用Fish替换cmd在日常开发过程中,我们也需要常常和命令行打交道,而Windows自带的cmd或者 - 掘金](https://juejin.cn/post/7362743871979749391)
|
||||||
|
- [Msys2+VSCode配置Windows下C或C++环境在使用Windows开发C或者C++项目时,大多数人通常会选择 - 掘金](https://juejin.cn/post/7369903157646229556)
|
||||||
|
|||||||
10
22.01. 軟體工具、設定/Visual Stuio Code + Msys2.md
Normal file
10
22.01. 軟體工具、設定/Visual Stuio Code + Msys2.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
tags:
|
||||||
|
aliases:
|
||||||
|
date: 2025-05-05
|
||||||
|
time: 10:24:09
|
||||||
|
description:
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
# 參考來源
|
||||||
BIN
attachments/20250505_101259_SystemPropertiesAdvanced_839x208.png
Normal file
BIN
attachments/20250505_101259_SystemPropertiesAdvanced_839x208.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
attachments/20250505_101427_SystemPropertiesAdvanced_677x633.png
Normal file
BIN
attachments/20250505_101427_SystemPropertiesAdvanced_677x633.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
BIN
attachments/20250505_101709_chrome_844x478.png
Normal file
BIN
attachments/20250505_101709_chrome_844x478.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
BIN
attachments/20250505_101809_Obsidian_267x313.png
Normal file
BIN
attachments/20250505_101809_Obsidian_267x313.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Reference in New Issue
Block a user