]> vilimpoc.org git repositories - dotfiles/blobdiff - README.md
setup-windows: Msys2 step - MSYS2 with MinGW-w64 GCC, per-user, no elevation
[dotfiles] / README.md
index 67e6a3b38c50f1f35a74545f72f8a59384cccb7f..8c4d631ac8edd4d3e86c95570b374e7a60f3f36b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -145,6 +145,7 @@ missing or out of date.
 | winget packages | `winget install` on a package winget can see is installed upgrades it when a newer version exists and otherwise does nothing — winget's own default. `--force`, which would install regardless, is never used. |
 | `ClaudeCode` | Anthropic's installer always downloads and reinstalls, so `setup-windows-current.ps1` asks first: is `%USERPROFILE%\.local\bin\claude.exe` the latest release — the version the installer's own endpoint names — and the build for this host? Only both skip it. |
 | `NASM` | Its per-user fallback install registers nothing, so winget cannot see it and would rerun the installer every time. `setup-windows-current.ps1` compares that `nasm.exe` with the version winget offers. A machine-wide NASM is left to winget. |
 | winget packages | `winget install` on a package winget can see is installed upgrades it when a newer version exists and otherwise does nothing — winget's own default. `--force`, which would install regardless, is never used. |
 | `ClaudeCode` | Anthropic's installer always downloads and reinstalls, so `setup-windows-current.ps1` asks first: is `%USERPROFILE%\.local\bin\claude.exe` the latest release — the version the installer's own endpoint names — and the build for this host? Only both skip it. |
 | `NASM` | Its per-user fallback install registers nothing, so winget cannot see it and would rerun the installer every time. `setup-windows-current.ps1` compares that `nasm.exe` with the version winget offers. A machine-wide NASM is left to winget. |
+| `Msys2` | The base archive is downloaded only when `%LOCALAPPDATA%\msys64\usr\bin\pacman.exe` is missing. Otherwise `pacman -Syuu` updates what is there, and `pacman -S --needed` leaves the GCC packages alone when they are already installed. |
 | `Rustup` | Needs no help: rustup registers itself under the manifest's product code and rewrites its version when it updates itself, so winget sees what is really there. |
 | `AndroidStudio` | Installed only when it is missing. Studio updates itself in the app, and winget's package is marked never to upgrade it; the check keeps winget from installing over a Studio it cannot match to its package, as on a box where Studio was installed some other way. |
 | `WiX` | Skipped when 5.0.2 is already in the .NET global tool store. |
 | `Rustup` | Needs no help: rustup registers itself under the manifest's product code and rewrites its version when it updates itself, so winget sees what is really there. |
 | `AndroidStudio` | Installed only when it is missing. Studio updates itself in the app, and winget's package is marked never to upgrade it; the check keeps winget from installing over a Studio it cannot match to its package, as on a box where Studio was installed some other way. |
 | `WiX` | Skipped when 5.0.2 is already in the .NET global tool store. |
@@ -390,6 +391,16 @@ missing or out of date.
   emulation on ARM64, which every Windows on Arm has; the audit lists it as
   expected. It stays on ARM64 for the same reason `iperf3` does: it is bound by
   the link to the device, not by the CPU.
   emulation on ARM64, which every Windows on Arm has; the audit lists it as
   expected. It stays on ARM64 for the same reason `iperf3` does: it is bound by
   the link to the device, not by the CPU.
+- **MSYS2 and MinGW-w64 GCC** (`Msys2`) go into `%LOCALAPPDATA%\msys64`, per-user,
+  with no elevation: the MSYS2 base self-extracting archive unpacks wherever it
+  is pointed, whereas the winget package runs the installer machine-wide into
+  `C:\msys64`. Two environments get GCC: `ucrt64` (x86_64, links the UCRT) and
+  `mingw32` (i686, links `msvcrt.dll`, the one that can still target Windows XP).
+  These are the same toolchains GitHub's `windows-latest` runner carries, so a
+  build that works here works there. Nothing is added to the `PATH`: the
+  environments' `bin` directories hold same-named `gcc`, `ld` and `windres`, so a
+  project names the one it wants by full path, e.g.
+  `%LOCALAPPDATA%\msys64\mingw32\bin`.
 - **Android Studio and the Android SDK** are separate steps. Studio
   (`Google.AndroidStudio`) is machine-wide — its installer elevates itself — and
   is installed only when missing, since it updates itself. The SDK is per-user,
 - **Android Studio and the Android SDK** are separate steps. Studio
   (`Google.AndroidStudio`) is machine-wide — its installer elevates itself — and
   is installed only when missing, since it updates itself. The SDK is per-user,
@@ -495,6 +506,7 @@ duplicates it or that exists only as an x64 binary.**
 | `WinMerge.WinMerge` | `setup-windows.bat` | ARM64 ships as a **machine-scope** installer only, so an unelevated `winget` can install nothing but the emulated x64 build |
 | `LLVM.LLVM` | `setup-windows.bat` | second Clang, dropped along with VS's `clang-cl` |
 | `NASM.NASM` | `setup-windows.bat` | x86/x86-64 assembler with no ARM64 target; MSVC's `armasm64.exe` is the native one |
 | `WinMerge.WinMerge` | `setup-windows.bat` | ARM64 ships as a **machine-scope** installer only, so an unelevated `winget` can install nothing but the emulated x64 build |
 | `LLVM.LLVM` | `setup-windows.bat` | second Clang, dropped along with VS's `clang-cl` |
 | `NASM.NASM` | `setup-windows.bat` | x86/x86-64 assembler with no ARM64 target; MSVC's `armasm64.exe` is the native one |
+| MSYS2 (`Msys2`) | `setup-windows.bat` | its base system is x86_64 and would run emulated, and the Windows XP target it is installed for is x64-box work |
 | `Google.AndroidGPUInspector` | `setup-windows.bat` | x64-only, and it profiles Android devices rather than anything compiled here |
 | `OpenCppCoverage` | `setup-windows.bat` | collects coverage by stepping x86/x64 instructions, so it cannot instrument an ARM64 binary at all |
 | VS Clang/LLVM component | `setup-windows-with-uac.ps1` | see below |
 | `Google.AndroidGPUInspector` | `setup-windows.bat` | x64-only, and it profiles Android devices rather than anything compiled here |
 | `OpenCppCoverage` | `setup-windows.bat` | collects coverage by stepping x86/x64 instructions, so it cannot instrument an ARM64 binary at all |
 | VS Clang/LLVM component | `setup-windows-with-uac.ps1` | see below |