Skip to content

feat(update): support in-app updates on macOS and Windows portable - #1698

Open
PramudithaN wants to merge 1 commit into
KnifeLemon:mainfrom
PramudithaN:feat/in-app-updates-mac-windows
Open

PramudithaN wants to merge 1 commit into
KnifeLemon:mainfrom
PramudithaN:feat/in-app-updates-mac-windows

Conversation

@PramudithaN

Copy link
Copy Markdown

What does this change?

Enables in-app updates to download and install in-place directly inside the app for macOS app bundles (Filee.app) and Windows Portable distributions (win-Portable.zip, win-arm64-Portable.zip), removing the need to redirect users to external browser download pages.

  • Windows Portable: Extracts and validates portable zip packages with Zip Slip and path traversal defenses, then safely swaps files via a background helper (update-portable.ps1) while preserving user settings (data/) and filee.portable marker.
  • macOS App Bundle: Detects the running .app bundle, verifies SHA-256 and checksum signature (.sig), extracts the new payload, and swaps bundles via a detached helper using /usr/bin/ditto (preserving signatures and bundle metadata), clears quarantine attributes, updates the CLI symlink, and restarts with automatic rollback on error.
  • UI Update Notice: Updates UpdateTexts and UpdateNoticeWindow to present the "Update" button (update.install) across all self-updating platforms.

Type of change

  • New feature or improvement
  • Bug fix
  • New format or engine
  • Translation
  • Documentation
  • Build, CI or dependencies

How was it tested?

  • Unit tests in tests/Filee.App.Tests/UpdateServiceTests.cs:
    • Mac_takes_its_own_files_next_to_windows_and_linux_builds (osx-arm64, osx-x64)
    • Windows_portable_takes_portable_zip_and_shared_windows_checksums (win-portable, win-arm64-portable)
    • The_macos_target_follows_the_process_architecture (GetMacOsRid)
    • GetMacAppBundlePath_locates_bundle_from_nested_or_direct_path
    • ExtractZipArchive_valid_payload_extracts_and_returns_folder
    • ExtractZipArchive_nested_payload_extracts_and_returns_nested_folder
    • ExtractZipArchive_rejects_path_traversal (Zip Slip defense)
    • ExtractZipArchive_rejects_missing_filee_exe
    • ExtractMacArchive_valid_payload_extracts_and_returns_app_bundle
    • ExtractMacArchive_rejects_missing_executable
    • UpdateAsync_on_windows_portable_downloads_extracts_and_spawns_powershell_helper
    • UpdateAsync_on_windows_portable_handles_helper_start_failure
    • UpdateAsync_on_macos_downloads_extracts_and_delegates_to_detached_helper
    • UpdateAsync_on_macos_handles_helper_start_failure

Screenshots (UI changes)

N/A (Uses existing in-app update progress modal and notification components)

Checklist

  • New UI strings are in all src/Filee.App/Assets/i18n/*.json files (reused existing update.install / update.notice_text)
  • New third-party code or binaries are listed in THIRD-PARTY-NOTICES.md (no external dependencies added)
  • The PR does one thing (unrelated changes go in a separate PR)

- Enable in-place self updating for macOS app bundles and Windows portable distributions

- Extract and validate portable zip packages with Zip Slip and traversal defenses

- Extract and validate macOS app bundles preserving permissions and signatures

- Implement detached background helpers for safe process shutdown, file replacement, and restart

- Add comprehensive unit tests covering target detection, archive extraction, and update flows
@github-actions github-actions Bot added the feature New features label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant