Skip to content

Avalonia cross-platform port: Windows + macOS Context Menu app - #1

Merged
YodasMyDad merged 2 commits into
masterfrom
avalonia-port
Apr 18, 2026
Merged

Avalonia cross-platform port: Windows + macOS Context Menu app#1
YodasMyDad merged 2 commits into
masterfrom
avalonia-port

Conversation

@YodasMyDad

Copy link
Copy Markdown
Owner

Summary

  • Completes the WPF → Avalonia port of ImageResize.ContextMenu. Same Explorer right-click experience on Windows, plus a native macOS build surfaced through Finder's Services menu.
  • Restores the single-instance + arg-forwarding behaviour that was stripped during the POC, now behind an ISingleInstance abstraction with Windows (named pipe + mutex) and Unix (domain socket + exclusive lockfile) implementations.
  • Ships a universal macOS .app + .dmg via build-macos.sh (arm64 + x86_64 merged with lipo), plus an Automator Quick Action so right-click → Services → Resize Images works in Finder. CI builds the DMG on every PR.
  • Pins Tmds.DBus.Protocol to 0.92.0 to clear GHSA-xrw6-gwf8-vvr9.

Test plan

  • dotnet build ImageResize.ContextMenu -c Release — clean, 0 warnings.
  • dotnet test — 42/42 passing.
  • Windows smoke test: launch with a sample image, launch a second instance with a different image, confirm IPC forwards over named pipe and the primary receives it (verified via log).
  • macOS end-to-end: drag ImageResize.app to Applications, install Resize Images.workflow, right-click an image in Finder, confirm Services → Resize Images opens the app with the selection.
  • macOS single-instance forward: open app, right-click another image, confirm it appears in the existing window (not a new one).
  • First-launch Gatekeeper bypass steps from the README work (right-click → Open, or xattr -dr com.apple.quarantine).

Known gaps

  • No .icns icon yet — Mac app will use the default Finder icon. Drop ImageResize.ContextMenu/macos/icon.icns in and the build script picks it up automatically.
  • The document.wflow Automator file is hand-written from the reverse-engineered format. If Finder doesn't show "Resize Images" under Services after install, open it in Automator.app, hit Save, and re-commit to regenerate canonical metadata.

🤖 Generated with Claude Code

YodasMyDad and others added 2 commits April 18, 2026 13:11
…ging, CI

Restore the single-instance + arg-forwarding behaviour that was stripped
for the POC, now behind an ISingleInstance abstraction with Windows
(named pipe + mutex) and Unix (domain socket + exclusive lockfile)
implementations. Wire Avalonia's Dispatcher.UIThread.UnhandledException
through MessageBox.Avalonia for parity with the old WPF error dialog.

Pin Tmds.DBus.Protocol to 0.92.0 to clear GHSA-xrw6-gwf8-vvr9 pulled
transitively by Avalonia's Linux stack.

Add build-macos.sh producing a universal (arm64 + x86_64 via lipo)
ImageResize.app bundle and DMG, plus a hand-rolled Automator Quick
Action so macOS users get a Finder right-click -> Services -> Resize
Images entry. CI gains a macos-latest job that produces the DMG as an
artefact on every PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@YodasMyDad
YodasMyDad merged commit bce9af4 into master Apr 18, 2026
2 of 4 checks passed
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.

1 participant