Skip to content

fix(windows): update the current installation and preserve shortcuts - #137

Merged
alan7383 merged 3 commits into
alan7383:masterfrom
ilgiova237:fix/windows-update-installation
Nov 19, 2026
Merged

alan7383 merged 3 commits into
alan7383:masterfrom
ilgiova237:fix/windows-update-installation

Conversation

@ilgiova237

@ilgiova237 ilgiova237 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

the windows updater was reading jpackage.app.path, but the launcher sets jpackage.app-path. a portable/custom installation could therefore update or relaunch another copy. the helper also relaunched the existing exe after installer failure without checking which version was actually installed.

this keeps the update in the current folder, passes INSTALLDIR on every MSI attempt, and forces file replacement with REINSTALLMODE=amus so an existing launcher config cannot keep pointing at an older jar. it snapshots matching desktop, start menu and taskbar shortcuts and restores their original bytes afterward, including custom icons and arguments.

before relaunching, the helper checks the installed launcher version against the requested release and checks that its classpath files exist. failed or incomplete installs are logged instead of silently reopening the old app. reboot-required exit codes stop retries and defer relaunch until Windows restarts. helper scripts use a UTF-8 BOM for Windows PowerShell 5.1, and process cleanup is limited to the selected executable path.

Windows MSI and portable images now contain version.txt beside KittyTune.exe. the portable CI check compares it with the launcher's actual version.

validation:

  • the five initial regression cases failed before the fix. the expanded set of eight tests passes with the real helper under Windows PowerShell, using mocked installer/relaunch processes and isolated app fixtures.
  • the shortcut test creates real .lnk files, deletes a matching link to simulate installer removal, then verifies byte-for-byte restoration and that an unrelated link stays unchanged.
  • paths include spaces, an apostrophe, square brackets and a non-ASCII character. both 3010 and 1641 are covered, alongside installer failure, a stale config and a missing application jar.
  • MSI version metadata was read from an existing package without installing it.
  • the full local headlessTest run passed: 341 tests, 0 failures, 0 errors, 3 skipped. the native Widevine/CDM build tasks were excluded from this run.
  • a Gradle fixture check executed both image tasks' version-writing actions, checked the file contents, and verified that both MSI tasks consume those prepared images.

no live MSI upgrade was performed on the user's installation. all four GitHub checks passed, including the Windows portable build, its version-file content check and the transparent-window renderer regression. the MSI + portable task graph also passed a local dry run.

@ilgiova237
ilgiova237 marked this pull request as ready for review November 16, 2026 06:11
@alan7383
alan7383 merged commit 98cbe4e into alan7383:master Nov 19, 2026
4 checks passed
@alan7383

Copy link
Copy Markdown
Owner

:)

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.

2 participants