diff --git a/.gitignore b/.gitignore index 7eb65e7..5c5e954 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ _build/ dist/ +artifacts/ *.msi *.wixpdb *.cab diff --git a/README.md b/README.md index 79657be..78dc4e5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ more than that zip layout. rbmanager is a small version manager in the spirit of Python's install manager (PEP 773): it fetches a binary-package zip, extracts it under `%LOCALAPPDATA%\Ruby\rubies\`, and makes it available on PATH. No -elevation is required at any point. Both names mirror pymanager: the +elevation is required for rbmanager itself or for the per-user rubies; +see below for the one exception. Both names mirror pymanager: the command is `rb` as pymanager's is `py`, and the data directory is named after the language (`%LOCALAPPDATA%\Ruby`, like `%LocalAppData%\Python`) rather than after the tool. rbmanager remains the product name. @@ -41,6 +42,17 @@ it (signature-verified, elevated); `--yes` skips the consent prompt. C extension gems with MSVC; see [docs/devkit-enable.md](docs/devkit-enable.md). +The official mswin packages deliberately do not bundle +vcruntime140.dll (https://bugs.ruby-lang.org/issues/22180) and expect +the machine-wide Microsoft Visual C++ Redistributable instead. That +component installs per-machine, which is the one exception to the +no-elevation rule: when it is missing, `rb setup` offers to download +and install it through a single UAC prompt. Declining the consent +question or the UAC prompt leaves rbmanager and the installed rubies +intact; `rb setup` prints the installer URL so an administrator can +install it manually, and `rb install` / `rb use` merely warn that +ruby.exe cannot start until the runtime is present. + The active ruby is exposed through an NTFS directory junction `%LOCALAPPDATA%\Ruby\current`, and `install` appends `%LOCALAPPDATA%\Ruby\current\bin` to the user PATH once; switching diff --git a/src/rbmanager/VcRedist.cs b/src/rbmanager/VcRedist.cs index c636611..03bbc81 100644 --- a/src/rbmanager/VcRedist.cs +++ b/src/rbmanager/VcRedist.cs @@ -76,11 +76,12 @@ public static async Task Ensure(bool assumeYes) return 0; } - Console.WriteLine(""" + Console.WriteLine($""" The Microsoft Visual C++ Redistributable (x64) is not installed. Ruby's official Windows packages rely on it; without vcruntime140.dll ruby.exe cannot start. Installing it affects the whole machine and - prompts for administrator approval (UAC). + prompts for administrator approval (UAC). Without administrator + rights, ask an administrator to install {InstallerUrl} instead. """); if (!assumeYes) {