Skip to content

fix(bootstrap): extract the Windows client under a short path - #188

Merged
Zaldaryon merged 1 commit into
mainfrom
fix/issue-187-windows-extract-stage-path
Oct 30, 2026
Merged

Zaldaryon merged 1 commit into
mainfrom
fix/issue-187-windows-extract-stage-path

Conversation

@Zaldaryon

Copy link
Copy Markdown
Collaborator

Fixes #187

On Windows, bootstrap.ps1 staged the innoextract output at <src>\.vanilla\win-x64\.innoextract-stage-<guid>. innoextract has no long path manifest, so the 260 character limit applies to it even with LongPathsEnabled. That prefix adds about 115 characters before the deepest installer entry (129 characters), which put some installs over the limit. The reporter's log shows 244 characters with the user name as pasted, so I could not confirm the limit as the cause from the logs alone; the change shortens the path by roughly 60 characters either way.

What changed:

  • scripts/extract-stage-root.ps1 adds New-ExtractStageRoot. It creates a short directory (optimum-ix-<8 hex>) under the temp folder, then the drive root, then the old location, and skips any candidate where the deepest entry would pass 240 characters.
  • bootstrap.ps1 uses it on Windows. Other platforms keep the staging folder beside the target, so the final move stays a rename. The existing robocopy move into .vanilla\win-x64\vintagestory is unchanged.
  • A failed extraction now appends the staging path, its length and, when it is long, a note about the Windows limit with the -VanillaDir workaround.
  • scripts/tests/extract-stage-root.ps1 covers candidate order, skipping long candidates, the fallback, unique directories, the hint text and that bootstrap.ps1 uses the helper. A new Shell scripts job runs it under Windows PowerShell 5.1.

Testing:

  • The new test passes under PowerShell 7 on Linux. The Windows job is the first run on Windows PowerShell 5.1.
  • bootstrap.ps1 parses without errors. Bootstrap.Core (220), Installer (104) and Cli (25) tests and bootstrap-git-repository.sh pass.
  • I did not run a real extraction on Windows, and Optimum.Tests was not run because this checkout is not bootstrapped. The reporter needs to retry on their machine after the next release.

innoextract has no long path support, so staging the extraction beside
the target put the deepest asset (129 characters) over the 260 character
limit on some installs. Stage under the temp folder instead, fall back to
the drive root, and report the staging path length when extraction fails.
@Zaldaryon
Zaldaryon merged commit eed15e3 into main Oct 30, 2026
14 checks passed
@Zaldaryon
Zaldaryon deleted the fix/issue-187-windows-extract-stage-path branch October 30, 2026 15:49
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.

[Windows] Installer fails extracting Vintage Story: innoextract cannot open deepest asset path

1 participant