feat(installer): .NET 10 prerequisite auto-install; fix Suite folder reuse across install modes

- Installer: when the .NET 10 Desktop Runtime (x86) is missing, an
  "installdotnet" task (on by default) downloads it from Microsoft
  (aka.ms permalink) and runs /install /quiet /norestart before the file copy;
  silent installs do it in PrepareToInstall. Failures are logged and shown,
  never fatal (RynthCore is self-contained). Skip with /MERGETASKS="!installdotnet".
- Build-Installer.ps1: checks for a .NET 10 SDK; when missing, installs it
  per-user via Microsoft's dotnet-install.ps1 after verifying its Authenticode
  signature (-NoDotNetInstall to fail instead)
- Fix: the Suite folder page only pre-fills from the current install mode's
  hive (HKA). A per-user install used to adopt an all-users install's
  RynthSuite folder, and its uninstall then deleted the shared files.
- Releases 2026.10.4.4 and 2026.10.4.5 (previous 2026.10.4.3)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BlankenshipG 2026-10-04 15:10:19 -04:00
commit 460a9d2f49
5 changed files with 285 additions and 6 deletions

View file

@ -0,0 +1,50 @@
# RynthCore 2026.10.4.4: .NET 10 check with automatic download and install
**Release date:** 2026-10-04
**Installer:** `installer\Output\RynthCore-Setup-2026.10.4.4.exe` (also copied to `RynthCore-Setup.exe`)
**Previous release:** `2026.10.4.3` (archived to `installer\previous-release\RynthCore-Setup-2026.10.4.3.exe`)
**Branch:** `feat/full-installer` (local test build, not on `main`)
## Installer: .NET 10 Desktop Runtime (x86)
- **Detection:** setup looks for a 10.x `Microsoft.WindowsDesktop.App` under `Program Files (x86)\dotnet\shared\`, or its
registration in `HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\sharedfx\Microsoft.WindowsDesktop.App` (32-bit view).
x86 matches RynthCore's x86 launcher and tools. The Desktop Runtime also contains the base .NET runtime.
- **When it's missing,** the Tasks page shows a **Prerequisites** task, checked by default: *Download and install the
Microsoft .NET 10 Desktop Runtime (x86)*. When the runtime is already there, the task is not shown at all.
- **Install:** on leaving the Ready page, setup downloads the latest 10.x runtime from Microsoft
(`https://aka.ms/dotnet/10.0/windowsdesktop-runtime-win-x86.exe`, about 55 MB) with a progress page, then runs it
with `/install /quiet /norestart`. The runtime's own installer asks for administrator approval (UAC) when setup
isn't elevated.
- **Silent installs** run the same step just before the files are copied, without a progress page. Skip it with
`/MERGETASKS="!installdotnet"`. That's useful offline, or for the launcher's silent self-update when no one is
there to approve UAC.
- **Never blocking:** exit codes 0, 3010, 1641 and 1638 (a newer runtime is already installed) count as success. A
failed download, a cancelled UAC prompt (1602) or any other error is logged and shown in a message box with the
manual download link, and the RynthCore install carries on.
Why it isn't required: the launcher, Loot Editor and Monster Editor are self-contained (they bundle .NET 10.0.5), and the
engine, loader and plugins are NativeAOT. The shared runtime is a safety net for framework-dependent add-ons and tools.
Earlier blocking .NET pages (0.4.x) had to be made advisory for exactly this reason.
## Build script: .NET 10 SDK
`Build-Installer.ps1` needs a .NET 10 SDK to publish, so before building (skipped with `-SkipBuild`) it:
1. uses the `dotnet` on PATH if it lists a 10.x SDK;
2. otherwise reuses an earlier per-user install in `%LOCALAPPDATA%\Microsoft\dotnet`;
3. otherwise downloads Microsoft's `dotnet-install.ps1`, **checks its Authenticode signature** (must be valid and signed
by Microsoft Corporation), and installs the latest 10.0 SDK per-user. No admin is needed. Then it uses that SDK for the
rest of the build (`DOTNET_ROOT` and `PATH` are set for this session only).
Pass `-NoDotNetInstall` to fail with a download link instead of installing.
**Tested:** in an isolated session with no `dotnet` on PATH, the script verified the signature, installed SDK 10.0.401 to
a scratch folder and found it again on a second run without re-downloading.
NativeAOT publishing also needs the Visual Studio C++ build tools ("Desktop development with C++"). The script doesn't
install those.
## Not tested end to end
The runtime download and install path in the installer was compiled but not run on the build machine. That machine already
has the x86 Desktop Runtime 10.0.7, so the task stays hidden there. Running it would have meant installing 10.0.12
machine-wide.

View file

@ -0,0 +1,31 @@
# RynthCore 2026.10.4.5: installer only reuses a RynthSuite folder from the same install mode
**Release date:** 2026-10-04
**Installer:** `installer\Output\RynthCore-Setup-2026.10.4.5.exe` (also copied to `RynthCore-Setup.exe`)
**Previous release:** `2026.10.4.4` (archived to `installer\previous-release\RynthCore-Setup-2026.10.4.4.exe`). Don't
use 2026.10.4.4 for a per-user install on a machine that also has an all-users install (see below).
**Branch:** `feat/full-installer` (local test build, not on `main`)
## Fix
To pre-fill the **Select RynthSuite Location** page, the installer used to read `Software\Rynth\SuiteDir` from HKCU **and
then HKLM**. A per-user install on a machine that already had an all-users install therefore adopted the all-users
RynthSuite folder. The two installs then shared those files, and **uninstalling the per-user install deleted the
all-users install's RynthAi DLL and Monster Editor.**
The lookup now reads only the hive of the current install mode (Inno's `HKA`: HKCU for per-user, HKLM for all-users),
matching how `GetPreviousData` and `UsePreviousAppDir` already behave. A per-user install with no per-user history
defaults to a `RynthSuite` folder next to its RynthCore folder again.
The runtime resolver (`RynthInstallPaths`: HKCU, then HKLM) is unchanged. A per-user install's own values still
take precedence for that user.
## Found by
A per-user test install of 2026.10.4.4 into a scratch folder on the build machine, which had an all-users 2026.10.4.3
install in `C:\Games`. The test install wrote into `C:\Games\RynthSuite` and its uninstall removed
`RynthAi\RynthCore.Plugin.RynthAi.dll` and the Monster Editor. Both were restored right away from the same-source build
(RynthAi 0.5.3, 217 Monster Editor files). User data folders, the experimental plugins and `C:\Games\RynthCore` were not affected.
## Also in this build
Everything from 2026.10.4.4: the .NET 10 Desktop Runtime check with automatic download and install in the installer,
and the .NET 10 SDK check with per-user auto-install in `Build-Installer.ps1`.