[PR #281] [MERGED] fix(launcher): correct installDir resolution and unblock auto-update #4541

Closed
opened 2026-10-22 04:08:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/281
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 (1)

  • e39471c fix(launcher): correct installDir resolution and unblock auto-update

📊 Changes

2 files changed (+12 additions, -1 deletions)

View changed files

📝 packages/server/src/app.ts (+2 -1)
📝 start.bat (+10 -0)

📄 Description

Two bugs in the taskbar-launcher migration shipped in #277:

  1. installDir off-by-one. app.ts resolved the install root by walking 4 levels up from dist/, which lands one directory too high (e.g. AppData\Local instead of AppData\Local\MarinaraEngine). The migration then couldn't find MarinaraLauncher.exe and silently skipped, leaving the Start Menu shortcut still targeting start.bat. Three levels up is correct — <INSTDIR>/packages/server/dist → 3 → <INSTDIR>.

  2. app-icon.ico collision blocks git pull. The original installer wrote app-icon.ico into $INSTDIR as an untracked file. #277 added app-icon.ico to the repo at the same path, so git merge --ff-only in start.bat refuses to overwrite the untracked copy and the auto-update silently fails (user stays at the previous commit forever). start.bat now drops the untracked app-icon.ico before merging if (and only if) it's not yet tracked locally — the repo copy is byte-identical to what the installer wrote, so this is non-destructive. Once a user has pulled successfully, the file becomes tracked and the cleanup is a permanent no-op.

Currently-stuck users on pre-#277 HEAD need a one-time manual fix before their start.bat will pick up the patch:

cd $env:LOCALAPPDATA\MarinaraEngine
Remove-Item app-icon.ico
git pull origin main

Linked issue

Closes #

Why this change

What changed

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed taskbar shortcut migration to properly align with runtime installation location.
    • Improved installation merge process by preventing conflicts with leftover files from previous installer versions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/281 **Author:** [@LukaTheHero](https://github.com/LukaTheHero) **Created:** 4/28/2026 **Status:** ✅ Merged **Merged:** 4/28/2026 **Merged by:** [@LukaTheHero](https://github.com/LukaTheHero) **Base:** `main` ← **Head:** `fix/launcher-migration-pathing-and-conflict` --- ### 📝 Commits (1) - [`e39471c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e39471c77555c417d0cecaa1dceaf0e9695a4fce) fix(launcher): correct installDir resolution and unblock auto-update ### 📊 Changes **2 files changed** (+12 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/app.ts` (+2 -1) 📝 `start.bat` (+10 -0) </details> ### 📄 Description Two bugs in the taskbar-launcher migration shipped in #277: 1. **installDir off-by-one.** `app.ts` resolved the install root by walking 4 levels up from `dist/`, which lands one directory too high (e.g. `AppData\Local` instead of `AppData\Local\MarinaraEngine`). The migration then couldn't find `MarinaraLauncher.exe` and silently skipped, leaving the Start Menu shortcut still targeting `start.bat`. Three levels up is correct — `<INSTDIR>/packages/server/dist` → 3 → `<INSTDIR>`. 2. **`app-icon.ico` collision blocks `git pull`.** The original installer wrote `app-icon.ico` into `$INSTDIR` as an untracked file. #277 added `app-icon.ico` to the repo at the same path, so `git merge --ff-only` in `start.bat` refuses to overwrite the untracked copy and the auto-update silently fails (user stays at the previous commit forever). `start.bat` now drops the untracked `app-icon.ico` before merging if (and only if) it's not yet tracked locally — the repo copy is byte-identical to what the installer wrote, so this is non-destructive. Once a user has pulled successfully, the file becomes tracked and the cleanup is a permanent no-op. Currently-stuck users on pre-#277 HEAD need a one-time manual fix before their `start.bat` will pick up the patch: cd $env:LOCALAPPDATA\MarinaraEngine Remove-Item app-icon.ico git pull origin main ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes # ## Why this change <!-- What user problem, bug, or goal does this solve? --> - ## What changed <!-- List the key changes in this PR --> - ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed taskbar shortcut migration to properly align with runtime installation location. * Improved installation merge process by preventing conflicts with leftover files from previous installer versions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:08:34 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4541
No description provided.