mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #282] [MERGED] fix(launcher): unblock pre-#277 users + auto-repair icon path #4544
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#4544
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/282
Author: @LukaTheHero
Created: 4/28/2026
Status: ✅ Merged
Merged: 4/28/2026
Merged by: @LukaTheHero
Base:
main← Head:fix/launcher-migration-pathing-and-conflict📝 Commits (2)
e39471cfix(launcher): correct installDir resolution and unblock auto-updatebf46632fix(launcher): unblock stuck pre-#277 users by removing root app-icon.ico📊 Changes
3 files changed (+52 additions, -3 deletions)
View changed files
➖
app-icon.ico(+0 -0)📝
packages/server/src/app.ts(+2 -1)📝
packages/server/src/services/setup/taskbar-shortcut-migration.ts(+50 -2)📄 Description
Summary
Follow-up to #277 — fixes two bugs that are stranding existing users at pre-#277 HEAD with no manual labor required for any user category.
The two bugs
installDiroff-by-one inapp.ts(silent migration skip). Resolving the install root walked 4 levels up fromdist/instead of 3, so the migration looked forMarinaraLauncher.exeone directory too high, didn't find it, and silently skipped. Fixed by using 3 levels.Tracked
app-icon.icoat repo root collides with the installer's untracked copy. The original installer wrote a byte-identicalapp-icon.icointo$INSTDIRas an untracked file. #277 then committedapp-icon.icoat the repo root, sogit merge --ff-onlyinstart.batrefuses to overwrite it and the auto-update silently fails — every existing user is stranded on the pre-#277 commit forever (their OLDstart.batalso lacks any cleanup, so they can't even pull a fix). This is the core problem.The cure (and why it works for everyone)
This PR removes
app-icon.icofrom the repo root entirely and points the migration atinstaller/app-icon.icoinstead — the installer subfolder is always tracked, but at a path the original installer never touched, so no collision is possible.For a user stranded at pre-#277 HEAD:
app-icon.icoat the root.git merge --ff-onlyonly diffsold-tree → new-tree, sees no change at that path, leaves the untracked file alone, FF succeeds. (Verified in a synthetic git repo before opening this PR.)For a user who already pulled #277 / #278 successfully: their
app-icon.icois tracked in HEAD, so the FF will delete it. Their already-migrated.lnkwould then have a brokenIconLocation. Self-heal added — if a.lnkalready targets the launcher but itsIconLocationfile no longer exists, the migration auto-repairs it on the next server boot. No user action.For brand-new installer installs: the existing installer still writes
$INSTDIR\app-icon.ico(untracked, byte-identical) so the pre-migration shortcut shows the right icon immediately, and the migration sources frominstaller/app-icon.icoso future updates never collide. No installer change needed.What's in this PR
packages/server/src/app.ts: 4→3 levels resolvinginstallDir.packages/server/src/services/setup/taskbar-shortcut-migration.ts: source icon frominstaller/app-icon.ico, add self-heal for broken IconLocation on already-migrated shortcuts.start.bat: drop the (now-redundant)app-icon.icocleanup block — with the file no longer tracked at root, no collision can occur.app-icon.ico: removed from repo root.Manual verification
$INSTDIR\app-icon.icopresent, runstart.bat→git merge --ff-onlysucceeds → server boots → migration runs → Start Menu shortcut now targetsMarinaraLauncher.exewithIconLocation = ...\installer\app-icon.ico,0.$INSTDIR\app-icon.ico), pull this PR →app-icon.icois removed from working tree → re-launch via shortcut → migration self-heals the IconLocation toinstaller/app-icon.ico→ icon renders correctly.start.battwice in a row — second run is a no-op (idempotent).No linked issue. Recommend treating as a hotfix — the bug shipped in #277 is currently silently breaking auto-update for the entire existing user base.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.