scripts/install-ctl.sh installs reims-ctl into CARGO_INSTALL_ROOT's bin
where that is set, else Cargo's home's, but its closing advice, where the
user's shell does not run that reims-ctl first, always said to open a new
terminal or run . "$HOME/.cargo/env": rustup's env file for the default
Cargo home, which puts neither CARGO_INSTALL_ROOT's bin nor another
CARGO_HOME's on PATH. On Windows both the script and scripts/install.ps1
said to open a new window and run reims-ctl, which finds no reims-ctl in
CARGO_INSTALL_ROOT's bin, since rustup put only Cargo's own bin on the
user's PATH.
The advice is now the script's check_note, and says, for Cargo's home's
bin, ". "$HOME/.cargo/env"" or that CARGO_HOME's env file; for
CARGO_INSTALL_ROOT's, "DIR, CARGO_INSTALL_ROOT's bin, is not first on your
PATH, and a new terminal won't put it there: add it in your shell's
profile, as with: export PATH="DIR:$PATH"". On Windows, with
CARGO_INSTALL_ROOT set, the check line runs reims-ctl by its full path
and a warning says to add that bin to the PATH; install.ps1's last line
names the folder and says the same. Without CARGO_INSTALL_ROOT, Windows'
lines are as they were.
The owner asked for an environment variable that skips the installers'
checks of the host, in install-ctl.sh and in its Windows equivalent alike.
Set to 1, install-ctl.sh skips its checks of the host for the VMs it runs,
with the changes they offer to make through sudo: on Linux KVM, /dev/udmabuf
and its group, vm.max_map_count, MGLRU's min_ttl_ms, the USB udev rule and
the kvm group; on Windows the Windows Hypervisor Platform. install.ps1 skips
its step 2, the platform's check and its turning on as an administrator, and
the variable reaches install-ctl.sh in CLANG64's shell. Each script says once
what it skipped. Neither skips what the build needs or refuses: the host's
OS and architecture, the CLANG64 shell, paths with a space, the
dependencies, rustup, vendor/qemu and --skip-qemu's installed QEMU.
Unset, or anything but 1, both scripts do what they did. On a Mac the
variable changes nothing: the one check there for VMs, of the macOS release,
decides whether mesa, a dependency, is installed. Both scripts' headers
document it, and docs/qemu.md's Windows install section names it.
A Windows user's folder can hold a space (C:\Users\First Last), and QEMU's
configure refuses a source or build directory with one ("main directory
cannot contain spaces nor colons"). With the library fixed, a user's install
would stop there next: install-ctl.sh builds QEMU in ~/.cache/reims-ctl, in
that folder. With the checkout in the folder too, as install.ps1 clones by
default, sdl3-sys stops first: it finds no SDL3, as a space splits the -L
path of the pkg-config file it reads. Both measured on the mini with a profile
named "Test User". No alias keeps the space out: meson takes realpath of its
directories, which turns an 8.3 short name back into the long one, and a volume
can have no short names (the mini's P: has none).
install.ps1 now clones into C:\reims-vgpu where the user's folder has a space,
saying so, and stops on a -Checkout with one. install-ctl.sh on Windows builds
and stages QEMU in the target directory where the cache directory has a space,
and stops before any download or build on a checkout or CARGO_TARGET_DIR with
one, naming the folder to use.
A new MSYS2 holds the package lists of the day its archive was made, and its
base archive ships them, so the check for a missing list found one and
skipped the update; packages its mirrors drop would then not install.
install.ps1 now runs pacman -Syuu twice before install-ctl.sh, as MSYS2
asks before any install. A stop throws rather than exits, which under
irm | iex would close the window, and a declined elevation leaves the
hypervisor platform off with a warning rather than stopping.
It installs what scripts/install-ctl.sh needs that Windows lacks, MSYS2 and
Git for Windows with winget, turns on the Windows Hypervisor Platform where
it is off (that step alone as an administrator, saying a restart is needed),
clones the repository where it does not run from a checkout, and runs
install-ctl.sh in MSYS2's CLANG64 shell. Each step is skipped where its
work is done, so a second run changes nothing it need not. -DryRun says what
each step finds and would do.