Skip to content

fix(installer): stop using the Vintage Story installed on the machine in the legacy scripts - #718

Merged
Zaldaryon merged 1 commit into
mainfrom
fix/legacy-installers-no-installed-game
Nov 20, 2026
Merged

Zaldaryon merged 1 commit into
mainfrom
fix/legacy-installers-no-installed-game

Conversation

@Zaldaryon

@Zaldaryon Zaldaryon commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two legacy scripts took the Vintage Story installed on the machine as their source:

  • scripts/install-windows.ps1 required an installed game, linked it (or copied it with robocopy) to .vanilla\win-x64\vintagestory in the build folder, ran bootstrap.ps1 -ClientArchive __skip__ and packaged with -VanillaDir $VsPath.
  • scripts/install-macos.sh copied the installed game into the Optimum folder.

A modified, outdated or already patched game therefore ended up in the result. The installer, the bootstrap scripts and the launcher now verify the client against the pins in forks.json (#716 and #717), so these two scripts should not bypass that.

Change

  • install-windows.ps1 lets bootstrap.ps1 download, verify and extract the official client into the build folder and packages from that extraction (-VanillaDir $vanillaDir). The archive is kept in the source tree's .vanilla\archives, which the build copy leaves out, so it is downloaded once and not for every install; bootstrap.ps1 verifies it and downloads it again if it does not match.
  • The installed game is only looked up, best effort, to keep the install and data folders away from it (Assert-SafeInstallerPaths). The wizard no longer requires it, browses for it or reads its version, and the version is no longer picked from it. The state and helpers that only served that (Resolve-EffectiveVersion, Get-SupportedVsVersions, the browse button, detectedVsPath) are removed. -VsPath stays as an optional hint for the folder guard.
  • install-macos.sh keeps --uninstall, so an install made by an older version of the script can still be removed, and refuses to install with a message that points to dotnet run --project Optimum.Installer -c Release or scripts/package-macos.sh.
  • The README says that the client is always downloaded and checked against the pinned checksums, and that an installed copy is never used as a source.
  • The test that asserted the old behavior (Install Vintage Story $requiredVer before Optimum, -VanillaDir $VsPath) now asserts the new one and also that __skip__ and a junction are gone.

Evidence

I ran install-windows.ps1 -Silent on an earlier revision of this branch, before the archive cache and the removal of the dead wizard code, which I checked by parsing under Windows PowerShell 5.1 and 7 and by reading. It downloaded the 598 MB client, bootstrap.ps1 accepted it, extracted it and checked the library, the build and packaging finished, and the log has no reference to an installed Vintage Story. The installed Optimum.exe then launched with an empty patch cache and its patch loop and validation passed. install-windows.ps1 parses under Windows PowerShell 5.1 and PowerShell 7, and the 45 installer related tests in Optimum.Tests pass.

Not covered

I could not run the WinForms wizard, so the changed wizard code is checked by parsing and by reading only. RiftLauncher and optimum patch still patch a player's game in place on purpose, and install-linux.sh only detects the data folder, so neither is touched.

… in the legacy scripts

scripts/install-windows.ps1 required a Vintage Story install, linked it (or
copied it) into the build folder and packaged from it. scripts/install-macos.sh
copied the installed game into the Optimum folder. Both took whatever was on the
machine as the source, so a modified, outdated or already patched game ended up
in the result.

install-windows.ps1 now lets bootstrap.ps1 download, verify and extract the
official client into the build folder, and packages from that extraction. The
archive is kept in the source tree's .vanilla\archives, which the build copy
leaves out, so it is downloaded once and not for every install. The installed
game is only looked up, best effort, to keep the install and data folders away
from it. The wizard no longer requires, browses for or checks the version of an
installed game, and the version is no longer picked from it. The dead state and
the version helpers that only served that are gone, and the -Version help says
that a version without pins is not verified.

install-macos.sh keeps --uninstall, which removes an install that an older
version of the script made, and refuses to install with a message that points to
the Optimum installer or the .dmg build. The README says that the client is
always downloaded and verified and that an installed copy is never a source.
@Zaldaryon
Zaldaryon merged commit 6975f7c into main Nov 20, 2026
51 checks passed
@Zaldaryon
Zaldaryon deleted the fix/legacy-installers-no-installed-game branch November 20, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant