Skip to content

Patch CLI file argument handling to bypass broken codepath#45

Open
noahc3 wants to merge 2 commits intodevfrom
fix-document-path-cli-arg-handler
Open

Patch CLI file argument handling to bypass broken codepath#45
noahc3 wants to merge 2 commits intodevfrom
fix-document-path-cli-arg-handler

Conversation

@noahc3
Copy link
Copy Markdown
Owner

@noahc3 noahc3 commented Apr 12, 2026

  • Add WineFix patch for ProcessCommandLineArguments WinRT silent failure/crash
    • Affinity's method references SharedStorageAccessManager which isn't available in Wine and causes a TypeLoadException that silently prevents CLI file paths from being processed.
    • The patch hooks OnMainWindowLoaded to open files via IDocumentViewService directly, and replaces SingleInstanceThread to fix the crash when sending files to an already-running instance.
  • Fix argument quoting in AffinityHook
    • string.Join(" ", args) didn't quote paths containing spaces, breaking file paths with spaces when forwarding to Affinity.exe.
  • Add "Command-line file opening fix" toggle to WineFix settings (enabled by default, restart required).

@noahc3 noahc3 changed the title Replace CLI file argument handling to bypass broken codepath Patch CLI file argument handling to bypass broken codepath Apr 12, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 12, 2026

🚀 Build Artifacts Ready

Commit: 19ef922
Build Timestamp: April 12, 2026 at 01:32 UTC
Build Workflow: View Run

📦 Direct Downloads (via nightly.link):

@noahc3 noahc3 self-assigned this Apr 12, 2026
@Novaryn42-glitch
Copy link
Copy Markdown

Thank you so much for this patch !

I have an issue with the new AffinityPluginLoader.dll though :

  • It tries to open the licence web page and fails :
    Initialization failed: Couldn't find a compatible Webview2 Runtime installation to host WebViews.

The previous AffinityPluginLoader.dll was working

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