@Phyx ...do you know if it's possible to do the bootstrapping steps (including dependency install) of an msys2 distribution on e.g. CI/release machine, tar up the result and unpack that on the users machine? Are there any caveats?
@maerwald that's not really advisable. Msys2 mirrors the user's host environment. At first run files and configurations are copied from the host machine into the unix environment, the keyring is created and the file permissions are set based on the user's uid [1].
So if you do this on a CI machine and package that you'll end up with a stale keyring, and wrong configs for the user machine and with wrong file owner. You'll also end up with an incorrect nssconfig cache, which will affect users on e.g. a corporate network with Active Directory and/or web proxies etc.
To do this you'd have to remove and undo all the configuration and initialization that the first start scripts do.
Do you think that's too excessive? The idea was to have a reasonable set of deps, so you can run some autoconf stuff, can compile GHC from source and have access to pkg-config.
Well, does the average user need to be able to compile ghc? I would just make a script setup-ghc-dev.sh they can call instead.
Also you really don't want the msys2 versions of binutils and pkgconf etc. You want the native versions, i.e prefixed with mingw-w64-x86_64-otherwise these programs will enforce posix behavior rather than native Windows. I.e. pkg-config will return posix paths and give libraries linked against the cygwin runtime instead of the native OS one.
Replace it with just installing mingw-w64-x86_64-pkgconf and curl (I believe this is the minimum)
Place a shell script somewhere to install mingw-w64-x86_64-binutils and the others and somehow inform users that this may be needed to use the ghcup compile ghc feature. There can probably be several ways to do this.
!105 (merged) which avoids installing expensive msys2 packages and places a desktop shortcut to install GHC dev dependencies, following @Phyx recommendations
Instead of asking questions throughout the whole installation process, we now ask them only at the beginning and then carry out downloads etc: !114 (merged)
Interactive installation is still the default, I believe this aligns with ghcup UX