Installer: versioned folder layout with Current junction#2028
Draft
tyrielv wants to merge 2 commits into
Draft
Conversation
15beccb to
8181c35
Compare
8181c35 to
344af6c
Compare
Replaces flat {app}\ deployment with versioned Versions\<ver>\ + Current junction.
Eliminates PendingUpgrade staging flow — new version goes to new folder, junction
swaps atomically, mounts continue running from old version until unmounted.
Changes:
- [Files]: Deploy to {app}\Versions\{version}\ instead of {app}\
- [Registry]: PATH points to {app}\Current (junction) instead of {app}\
- [Dirs]: ProgramData under versioned folder
- [Code]: Add CreateOrUpdateCurrentJunction() — creates/updates junction post-install
- [Code]: Add GarbageCollectOldVersions() — keeps 1 most recent old version, deletes older
(skips versions with running mounts detected via Get-Process gvfs.mount | .Path)
- [Code]: Remove KeepMountsRunning variable, IsNormalInstall/IsStagingInstall checks
- [Code]: Remove StagingUpdateService, ShowMountChoiceDialog (no longer needed)
- [Code]: Simplify PrepareToInstall — no mount detection, no staging, just stop service
- [Code]: Update InstallGVFSService to reference {app}\Current\GVFS.Service.exe
- [Code]: Update MountRepos, MigrateConfigAndStatusCacheFiles, WriteOnDiskVersion16CapableFile
to use Current junction paths
- CurStepChanged: Remove staging logic, call CreateOrUpdateCurrentJunction + GarbageCollectOldVersions
- CurUninstallStepChanged: Remove {app}\Current from PATH instead of {app}
Flat-layout migration stub added (detects {app}\GVFS.exe, logs version) but defers
actual file move to future PR to reduce complexity.
Assisted-by: Claude Sonnet 4.5
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
344af6c to
ab2195f
Compare
Fixes 5 critical issues in the Phase 2 versioned-layout installer:
1. Forward reference violation - Move CreateOrUpdateCurrentJunction,
GetFileVersion, IsProcessRunningFromPath, and GarbageCollectOldVersions
before CurStepChanged. Inno Setup Pascal does not allow forward refs.
2. Service starts before junction exists - Create Current junction in
CurStepChanged(ssInstall) BEFORE file extraction, ensuring the junction
exists when InstallGVFSService runs (AfterInstall callback during file
copy). Service binPath references {app}\Current\GVFS.Service.exe.
3. Old PATH entry not cleaned up - On upgrade from flat to versioned layout,
remove legacy {app} PATH entry in CurStepChanged(ssPostInstall). New
entry points to {app}\Current.
4. Non-atomic junction swap - Use Current.new temporary: create junction at
Current.new, rmdir old Current (check ResultCode), rename Current.new to
Current. Eliminates window where Current doesn't exist.
5. Add upgrade test scenarios - Add versioned-fresh-install,
versioned-upgrade, and flat-to-versioned-upgrade scenarios to
.github/workflows/upgrade-tests.yaml with full test implementations.
Assisted-by: Claude Sonnet 4.5
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
ab2195f to
410f0d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches the installer from flat binary deployment to a versioned folder structure:
Changes
{app}\Versions\{version}with aCurrentjunction{app}\Current\instead of flat{app}; cleans up legacy entry on upgradeCurrent.new+ rename strategy to minimize unavailable windowMotivation
With versioned folders, upgrades become zero-downtime: new version goes in a new folder, junction swaps immediately, running mounts continue from their old version folder until remounted. This eliminates the PendingUpgrade complexity and will enable simplifying the GVFS service to reduce elevation surface
Part of Plan UAC-Free Install Modernization (Phase 1)